Just a note for anyone else who may have run into this problem.
I used Telephone successfully for years (aside from having to restart it when my audio device configuration changed, which seems like it's being worked on) but about a month ago it stopped working. I hadn't changed my hardware, OS (10.10) or SIP configuration that I was aware of. Other UAs on my Mac still worked when connecting to the same account — but they're so ugly…
I could register fine, and my Mac would ring, but when I click "Answer" nothing happened, and if I made an outgoing call it sat there "calling…" until I eventually get "Request Timeout".
Same thing happened with 1.1.4 and a version I built from GitHub.
I discovered packets were getting mangled between my Mac and the SIP server. pjsip leaves room in a packet for a Content-Length of at most 5 digits, so it can fill it back in before by padding with spaces (e.g., "Content-Length: 295"). I think my landlord's router was "upgraded" and now modifies SIP packets, but it fails to support this and overwrites it with "Content-Length: 3010" regardless of the actual length.
The SIP specification allows arbitrary amounts of space on either side of the colon, but also states "implementations should avoid spaces between the field name and the colon and use a single space (SP) between the colon and the field-value." So what pjsip is doing is valid but not really recommended.
Given the body of my SIP messages all end up as 100-999 bytes, I just did this:
Index: pjsip/src/pjsip/sip_msg.c
===================================================================
--- pjsip/src/pjsip/sip_msg.c (revision 5233)
+++ pjsip/src/pjsip/sip_msg.c (working copy)
@@ -476,7 +476,7 @@
/* Process message body. */
if (msg->body) {
- enum { CLEN_SPACE = 5 };
+ enum { CLEN_SPACE = 3 };
char *clen_pos = NULL;
/* Automaticly adds Content-Type and Content-Length headers, only
which is horrible, but does at least stop the mangling. I'm not suggesting this change actually be incorporated, just for anyone's reference until this can be fixed a better way.
--Nicholas