My provider told me that I have to send the Outbound CID from my Extensions as “P-Prefered-Identity” in the SIP header. The same issue is with the Followme Option. To see the original callers ID I have to send that CID not in the “from” field, as the “Default” does, but I have to send that ID also as “P-Prefered-Identity”.
Can anybody help me to add the scripts for this matter?
That advanced setting only changes the default for new extensions. Also “pai” makes it send P-Asserted-Identity, not P-Preferred-Identity. To send the latter you will need to do some custom dialplan. Something like this in /etc/asterisk/extensions_custom.conf perhaps:
[font=Courier]
[macro-dialout-trunk-predial-hook]
exten => _X.,1,SipAddHeader(P-Preferred-Identity:sip:${CALLERID(num)})
[/font]
Sure, if it´s the FIRST line in context priority has to be “1”.
You have to modify your outgoing context (or alternatively incoming in case of CF) in extensions_override_freepbx.conf or extensions_custom.conf.
Between SipAddHeader parentheses add desired field, ie. what works with your SIP provider:
; P-Preferred-Identity: “Name” <sip:[email protected]>
or
; P-Asserted-Identity: “Name” <sip:[email protected]>
; P-Asserted-Identity: tel:+12345678901
Now i can set the Outgoing number in the User extension (Outbound CID).
I remarked that it makes no differents, if i change the following in "Settings->Advanced Settings"
SIP trustrpid
SIP sendrpid
yes, no, pai is possible.
I hope that someone can use this infos.
Thanks
I remarked that it makes no differents, if i change the following in “Settings->Advanced Settings”
SIP trustrpid
SIP sendrpid
yes, no, pai is possible.
I can confirm this in 6.12.65-26. I tried systematically all different options, also on extension level. I never got a P-Asserted-Identity String to be added to the header via any gui options / combinations.