Fix Hlint Suggestions

I basically just did what it asked me to, besides adjusting their
suggestions to our formatting.
Fix GHC Warnings

We have warnings turned on, so we may as well get to a clean base-state.
All of these type signatures came from the compiler's warning text
Similarly, the imports were listed as redundant.

Then there were a few name shadowings, mostly "s" and "init".

Finally, there were some unused variables from the pattern matches.
Update Base

The version of base specified isn't available on my system, so when I
updated it (and a few other libraries when they also errored) it now
seems to have built fine.

So it must be fine!
Use type=chat so that carbons will relay to all target resources

It turns out that the Carbons spec says you should only use carbons for "IM
like" things, such as messages of type=chat or with a body.  So there was a case
where if you had XEP0353-supporting clients connected but they had a lower
priority than other clients that were connected, the server would send those
clients the proposal message and carbons would not kick in and nothing would

So now we use type=chat. Even though it's not a chat, it's not in the context of
your chat, it's just an inbound phone call. But that's a moral question and in
practise this is also what Conversations does and it fixes the problem.

Thanks so much to psycotica0 for all of the investigation work that lead to this
Change Suggested Repo Name in README

Obviously the user can name their repo whatever they want, but I figured
we may as well suggest a more intuitive name ;)
Mention soprani.ca
Outbound calls work
Instead of crash on bad stanza, at least log it
Fallback to direct initiate when no Jingle Message Initation support

Check for a message initiation supporting resource, if none then send to the
most available resource.

TODO: Should only send to most available resource that supports jingle rtp audio.
Support inbound SIP MESSAGE
Log bad calls for fail2ban to find, fix default extensions
Use SIP From instead of raw SIPURI
Error payload is often last

Asterisk seems to care about the payload being <error/> and not just the
type="error", which is probably a bug in asterisk, but this whole thing is a
workaround for missing asterisk stuff so here we are.
Add Asterisk config
Initial commit

This code is garbage and will have to be rewritten.

When paired with the Asterisk setup, inbound calls to sip:some%40jid@server.tld
end up as working Jingle calls (tested only with Conversations) to the target

Declining the call, hanging up, and errors from calling bad JIDs all are handled.