I am using PJSIP for a SIP application and have the following problem. When I register via UDP with register URI “sip:email@example.com:5060” the register works fine. When a SipPhone calls via UDP it works fine but when the SoftPhone calls via TCP the application answers with a SIP OK where the “transport=tcp” param is missing in the contact of the SIP OK and so the Softphone declines the call. Does anybody knwos this problem and knows a easy solution? Thanks
You would need to provide your configuration, Asterisk version, and the SIP trace (pjsip set logger on).
Why does it not continue the session using UDP?
My application is able to use UDP or TCP. The SIP Client starts the call with TCP and send transport=TCP in his contact field. The client waits for a SIP OK with transport=TCP in the contact field. But this parameter is missing because my application (with pjsip) registered with UDP.
When the register is send with TCP it works fine but i have to support both.
It shouldn’t be matching the Contact header. That can legally change, and often does when people are running load balancing proxies.
Thanks for your help. The problem is solved. The PjSip uses the contact from the register message when a registrar exists otherwise he generates the contact new. I changed it that he always generates the contact to avoid the missing transport=tcp.