PJSIP Contact Header vs Chan_sip on Asterisk 13

Hi, I was tasked with testing out Asterisk 13’s features for my company. We currently are running on Asterisk 1.8 with chan_sip, and hopefully will be migrating to Asterisk 13 once the testing is done.

My plan is to switch over to PJSIP with the realtime configuration, along some other things set to realtime where possible.

I have ran in to a road block when testing directed pickups using a BLF on a Cisco SPA 504G. When I hit the BLF it does nothing. The one difference I had seen in the sip messages was the fact chan_sip sets the contact header to sip:Extension@IP-Address. Where extension is the monitored extension and the IP being the server’s IP. PJSIP is setting the contact header to just sip:IP-ADDR.

Here are my debugs and various settings. I had to keep them in a link dump on pastebin due to the new user restriction:

http://pastebin.com/UsC20xTs - This contains examples of the sip messages I am seeing, my debugs with both chan_sip and PJSIP. As well as a pastebin with my sorcery.conf and extconfig.conf for both set ups.

From what it seems during testing the Cisco is reading the contact header to decide what number to dial with *8 for directed call pickup. So with chan_sip saying 106@IP it dials *8106 (or so I am lead to believe). While when I do PJSIP it doesn’t see an extension/user and just the IP so it does nothing.

Thanks in advance

The only thing anything should do with a Contact header address is to send it back to its source unchanged.

To refine the question a bit, does PJSIP do anything
different with the contact header, such as only doing sip:SERVER-IP
instead of sip:Ext@SERVER-IP. Or do you believe that PJSIP and chan_sip
should be returning the same contact header.

As that is the only difference I see in the sip messages I linked to
was the contact header format. It wouldn’t make much sense for Cisco to
read that instead of the xml asterisk sends that list the extension to
update the blf for.

The issue you are experiencing is being tracked at https://issues.asterisk.org/jira/browse/ASTERISK-24601 and has a patch attached.

Looking at the issue tracker report, this is about the payload not about the headers. However, as long as the domain part of the contact header points to the right machine, it is totally irrelevant what is in the user part, or whether it is present, as only the issuer of the header cares about those.

It works if you configure the Cisco phones this way: