Need help removing leading "+1" from pjsip trunk CID

I recently setup FreePBX and it is overall working great. Thank you for a great open source product. I currently have two issues I am trying to resolve, so I have split them in to two separate posts for ease in addressing them and for future readers seeking solutions to the same or similar problems.

I am using a pjsip trunk with provider Flowroute. I can inbound and outbound just fine, but the CID for inbound callers contains a leading plus sign with the country code. As I am located in the United States, that is “+1”. I have found guides (I am not allowed to add the links) on how to remove that information from the CID for chan_sip configurations, but I have no idea how to do so on pjsip. Our CID superfecta configuration is not always working as expected due to the “+1” and its also visually less appealing on the phone CID. Does anyone know how to manipulate the CID information for a pjsip trunk in order to trim the leading “+1” data field?

CallerID is not a Chan_SIP or Chan_PJSIP thing. It’s the same functions for any driver tech on the system (DAHDi, IAX, etc).

Change the context on the trunk from “from-trunk” to “from-pstn-e164-us” it will strip the +1 from the CallerID and the actual DID. So that means your Inbound Routes would need to match on 10 digits not 11 or with the + in front.

Thank you so much. I made the change in context, and now I see how I “should” have been able to figure that out from the chan_sip guides I found. I am new to PBX systems, so still getting acclimated. I apologize for what is likely another novice question, but can you advise how I will need to adjust the the inbound routes or other changes required as a result of applying the “from-pstn-e164-us” change?

You just need to update the Inbound Routes. By the time the DID hits the Inbound Routes the DID has been modified from +1NXXNXXXXXX to NXXNXXXXXX so your Inbound Routes need to match that format. So if you have +13135551212 as a route now, you edit it to 3135551212.

You would also need an Outbound Route that matches NXXNXXXXXX and then Prepends +1 to the number. If you don’t have that Outbound Route using the “redial/call back” option in the phones call list won’t work.

I changed all inbound routes to NXXNXXXXXX. My outbound route dial patterns are:

1NXXNXXXXXX
(1) NXXNXXXXXX
(1405) NXXXXXX

However, when I now outbound I have one directional audio. I can speak out and the call recipient hears me, but I can’t hear them. No audio is making it back. Did I mess something else up or do I need to make changes to the outbound route dial patterns? Thank you for your continued assistance.

The context change should not have affected outbound calling at all – the new context gets executed on incoming calls only. I don’t know why your inbound audio stopped working, but suggest that you debug it as a separate problem.

PBX in cloud or on-site? If in cloud, who is cloud provider? If on-site, please describe networking between PBX and internet, including modem (if functioning as router or ‘gateway’), separate router if any, separate hardware firewall if any, virtualization platform (if PBX is a virtual machine).

Also, do calls between extensions have audio in both directions? Incoming calls?

I retraced all my changes and realized I committed the problem solving sin of working on too many things at one time. I had installed new SSL certificates and changed port settings. I didn’t realize a reboot was required for those to work properly. All is resolved now. Thank you @BlazeStudios and @Stewart1 for all your assistance. It appears I have fully resolved the original issue of this thread (while inadvertently creating a separate port problem…)

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