edit: redaction on a screenshot
FreePBX Version 15.0.16.81
Asterisk Version 16.15.0
PJSIP
I realize this topic has been covered multiple times. I also feel like my situation is unique because my sip trunk provider claims we are their first FreePBX system to use them. The provider is Momentum (US) via our local utility provider.
Original problem began when COVID hit the US and employees went to remote work. We turned on FM/FM for those employees and the complaints came rolling in that they only knew it was a work call because the caller ID was their office DID. They (rightfully so) wanted to know who the original caller was. I have been working with my provider to find a solution and they, unlike other providers, require the P-Asserted-Identity to be sent as sip:[email protected] and then it would pass the original CID. We spun up a new VM with a fresh install of FreePBX and configured it the same but with a test trunk and three DIDs.
That’s where I started down the rabbit hole of using various methods:
- https://community.freepbx.org/t/how-do-i-modify-the-p-asserted-identity/60665
- https://community.freepbx.org/t/p-asserted-identity-with-caller-withheld-hidden-calls/60529
Provider suggested the following:
In FreePBX system manually edit/create /etc/asterisk/extensions_override_freepbx.conf
in other asterisk systems edit/create /etc/asterisk/extensions_custom.conf
Add:
[macro-dialout-trunk-predial-hook]
exten => s,1,NoOp(Insert P-Assert Header for External DID CID)
exten => s,n,SipAddHeader(P-Asserted-Identity: sip:[email protected])
Based on reading a ton of threads on this, isn’t the code above an “easy” fix for Chan_sip but not a solution for PJSIP?
Here are my trunk settings:
Test call placed from external number to a DID. Inbound route sends to extension with FM/FM active using ringallV2-prim ring strategy. Call rings for two seconds before attempting my cell phone 733XXXX. The provider then rejects the call to my cell phone. This is with no additions to either conf file above. This is also with blank CID fields at the extension level so it should send the PAI using the main trunk…
Searchable strings that may help you in the pastebin (501358XXXX and 733XXXX).
Here is the pastebin from that test call: Automatic Pastebin from Sangoma OS 7 - FreePBX Pastebin
I’m sure I’m leaving something out but this community has helped me and my colleagues on multiple occasions so I know someone can again, this time on my post and not another person’s post.
TIA,
Sean