Sip to pjsip conversion issues

Hi All,

I’ve just recently converted from SIP trunks to PJSIP trunks and am running into issues left-and-right.

I have the system set up so that I can dial certain prefixes in order to manipulate the outbound CID. For example, 8* would show my cell number, 9* would show the number for a branch office, etc. The trunk definition has a defined CID on it as well. When dialing without specifying one of the X* prefixes, the trunk CID would be sent. Dialing an X* prefix simply overrode that and sent a different CID. This worked flawlessly with SIP trunks.

After the change to PJSIP, it appears as though the “Outbound Caller ID” string in the trunk definition is ignored unless I also set “Force Trunk CID” … unfortunately, doing that breaks the prefix model I described above… no matter the prefix, all calls show up with the trunk CID.

If I leave it set to “Allow any CID” (which is how it was set for SIP trunks), the CID sent appears to be the DID defined on the trunk by the provider (ie Flowroute). I would expect that if I hadn’t set an Outbound Caller ID on the trunk, but since I have that set, I would expect the defined CID to be sent.

What am I missing here? I can’t find any difference in the way the PJSIP trunk is configured with respect to these settings when compared to how I had the SIP trunk defined.

From a system with core, I tested what I believe is your case and it did not fail:

Called from an extension with Outbound CID left blank, via an Outbound Route with Route CID left blank and Override Extension set to No, to a Flowroute pjsip trunk with Outbound CallerID set to <15558675309> and Allow Any CID set.

AFAIK, my Flowroute portal has no such setting. Where do you see that?

If you want to troubleshoot further, paste a log for a failed call including SIP trace at and post the link.

However, your setup seems unusual. On most systems (especially those like yours with multiple branches), each extension has Outbound CID set for that user’s ‘normal’ calls. If you have an Outbound Route that uses a prefix to force a specific CID, it would have that Route CID with Override Extension set. The Outbound CallerID for the trunk would only be used in unusual circumstances e.g. when forwarding an external anonymous call, or because of a configuration error.

Well… you solved my problem in a round-about way. I was so focused on reconfiguring trunks that I completely forgot about routes having CID settings as well. When you mentioned the route CID, I went looking and that’s where the CID was being set.

I set this stuff up so long ago that I’ve forgotten some of the pieces of it. It’s just been running so reliably all these years that there are parts I haven’t looked at in so long I practically forgot they were there!

Anyway – thank you for nudging me in the right direction!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.