Hello,
I’m trying to update the caller ID on the callee channel using Asterisk 20.2 with PJSIP. This is to emulate a DID-based environment that goes as follows:
- Caller XXX dials DID (12345)
- DID directs the call towards my Asterisk box
- Asterisk then dials a new B number (78910)
- Asterisk should not show the original caller ID XXX to the new B number, but rather the DID (12345) only
So far, I’ve tried setting this in a pre-dial handler, but it fails.
The pre-dial handler:
[handler]
exten => updatefrom,1,Set(${CALLERID(num)}=1000)
The Dial() application:
[context]
exten => 12345,n,Dial(PJSIP/1234567890@mytrunk,b(handler^updatefrom^1))
I read somewhere that the CALLERID variables cannot be changed, but I’m not sure and I can’t find it again either.
In short, I’d like to all references of the original caller ID on the outbound call to the new callee on Asterisk.
Appreciate the help.