Daniel,
I had posted this question earlier on asterisk-users, but didn't receive any reply, so I'm posting on sr-users in the hope that someone can provide guidance on how to debug this problem.
Our setup involves a Sip softphone registering with a fresh install of Asterisk v1.6.0.5 through an outbound proxy (Kamailio v3.1.1).
We observe that about 80% of the time, immediately after startup of the softphone, when the softphone sends a REGISTER message, Asterisk replies with a "500 Server error". However, subsequent REGISTER messages are replied to appropriately (with a 401 Unauthorized).
you should set sip debug on for asterisk in order to get more verbose output related to the 503 case. I couldn't spot something wrong for register that got 503. Next ones have two contact headers, but that is fine in SIP.
Cheers, Daniel
I have recently had the chance to do some more debug and here is more information. It appears that the 500 Server Error is generated by Asterisk as a response to an offending REGISTER request from the softphone that has an invalid CSeq number. I have attached an excerpt of a sip trace that shows these messages. The offending REGISTER message has a CSeq that is lower than that of the earlier REGISTER message with the same Call-ID.
My questions are
1) Is the response from Asterisk (500 Server Error) valid ? Wouldn't a 4xx Client Failure response be more appropriate ?
2)The source of this error would probably be a bug in the SIP stack of the soft phone (PJSIP), correct ?
Thanks and Regards, Vikram.