I would appreciate any help or idea how to solve this.
I have FreepBXv17 and a PJSIP trunk to the provider is set up.
This provider wants me to send the phone number he assigned to me and the IP address of my FPBX in the From header when making outgoing calls.
So for example: From: "111222333" <sip:[email protected]>;tag=XXXYYYY
However, when transferring a call to an external number, I send him the phone number that called me on the FPBX in the user part of the From header.
Example:
I’m getting a call from number 222222222 → FPBX → IP TEL → call transfer to 333333333
So, in the From header I have number 222222222, but I would need to have the Outbound CID number there, which I set for a specific extension, for example 111222333.
I tried using
[macro-dialout-trunk-predial-hook]
exten => s,1,Set(Desired_NUMBER=${DB(AMPUSER/${PICKUPMARK}/outboundcid)})
same => n, Set(CALLERID(num) = ${DESIRED_NUMBER})
same => n,MacroExit()
or same => n, Set(PJSIP_HEADER(update,From)=<sip:${DESIRED_NUMBER}@10.1.1.2>))
But without success.
I always end up seeing the From header number 222222222
I can’t use the From User field in the PJSIP trunk settings. This would solve the problem, but then I would always call from this number and I get 3 numbers from the provider (11122233[345])
Can I think of a combination in the PJSIP trunk settings Outbound CallerID and CID Options and From user?
Point is, as I mentioned before, I have multiple numbers given by provider and in Outbound CallerID in trunk settings I have one, let’s say default outgoing number for me 555555555.
And in this scenario, on my cellphone I see that this number 555555555 calls me, but Extension which is doing this transfer has set other public number 111222333.
Also in SIP message for that Transfering call I sending INVITE with:
From: 555555555 (because it is set in trunk Outbound CID)
To: 333333333 (OK)
P-Asserted-Identity:555555555 (ehh? I supposed there should be 222222222)
Remote-Party-ID: 555555555 (same ehh…)
So maybe I should now refill PAI/RPI header? Is it possible to set this in GUI somewhere?
Nobody knows how to send my outbound number in From header and in P-Asserted-Identity:header or Remote-Party-ID header number of caller?
Or why it is not happening by default?
Are you forcing the Outbound Route CallerID or the Trunk CallerID? By default the incoming CID is not touched when being routed back out via Outbound Routes.
Hello,
Neither.
I have set in trunk settings Outbound callerID to one of given number from provider and Block Foreign CID
and in Outbound route have nothing in Route CID and override extension set to NO