FreePBX is adding an extra : followed by the dialled number.
With that extra information sent, my upstream provider is returning a 400 Bad Request with
Error-Info: sip:3333333333@provider;cause=“[line 013] SIP syntax error”
I wanna to know how to remove the extra :3333333333
I presume this is a bug, but because you are using an end of life version of Asterisk, and, at least an old version of FreePBX, I’d suggest upgrading before you try to debug.
Otherwise, I think we would want verbosity 3 or more full logs to understand why the wrong value is being used.
Incidentally, is there a reason that you are manually setting this header, rather than using the send PAI functionality, for caller ID. Normally Asterisk, itself, owns this header.
This is incorrect syntax. The call needs to be func-set-sipheader,s,1(P-Asserted-Identity, <sip:[email protected]>) there needs to be two arguments as ARG1 = header name and ARG2 = value of header. Your current syntax is just sending P-Asserted-Identity: <sip:[email protected]> as ARG1 which is going to make an incorrect header
We want to be able to send calls with different callerIDs name and number over this trunk. Normally our provider will allow outbound calls only for DIDs that are part of its network, unless calls are authorized with a PAI that contains a predefined DID. If calls are containing that predefined DID in the PAI field, the provider SBCs will accept outbound calls with any callerIDs.
The P-Asserted-Identity header field is used among trusted SIP entities (typically intermediaries) to carry the identity of the user sending a SIP message as it was verified by authentication .
Not sure why you think it’s just only for upstreams.
Well… I’m just following my provider’s support team, as they asked me to send a valid PAI with a local DID so outbound calls from our equipment can be accepted on their end with any other CallerIDs. My understanding of the PAI SIP extension is that it can be used to provide a sort of “trustines” within a private network, such as between an ITSP and their customers.
In the typical case it is the upstream one, as in the typical case Asterisk is the intermediary. PAI contains the true originator of the call, whereas From contains the identity of the immediate source, which is Asterisk. Asterisk own identity is not something that Asterisk would ever need to verify, so it makes no sense for that to be something that was verified by authentication.
What providers are doing is to make From: be the true originator, and PAI be that of the intermediary.