edit: redaction on a screenshot
FreePBX Version 220.127.116.11
Asterisk Version 16.15.0
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:501358XXXX@providerdomain.com 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:
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
[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:PILOTNUMBER@providerdomain.com)
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: https://pastebin.freepbx.org/view/5511b643
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.