Using Freepbx v15. My provider is requiring me to set RPID header on the trunk to include only phone number for valid number presentation. Currently my RPID looks like this: Remote-Party-ID: <sip:[email protected]>;privacy=off;screen=no
and I need to change it to: Remote-Party-ID: <sip:48123456789>;privacy=off;screen=no
How can I remove domain part from the RPID? I have tried to unset “from domain” setting, but without it the trunk stops working.
There is no support for doing such a thing inside of Asterisk itself. The only way would be to not use the Asterisk part and use the PJSIP_HEADER Dialplan function to just add a generic header. That being said, I’m greatly surprised they want that because it’s probably… wrong… of them to want that. “sip:48123456789” would mean a SIP address with a hostname of “48123456789”.
Thanks, already figured out how to inject the header. I have used Admin / Config Edit menu option and then I have added this line to the extensions_custom.conf file in the [macro-dialout-trunk-predial-hook] section: exten => s,n,GoSub(func-set-sipheader,s,1(Remote-Party-ID,<sip:${CALLERID(num)}>))
But… you were right. It didn’t help and even broke outgoing connections at all. Probably I’ve been misinformed. Will talk to the provider again.
Thanks for help.