Outbound CID in GUI works, Setting CALLERID in Dialplan doesn't

If I set the Outbound CID for an extension in the FreePBX GUI and place a call with that extension the CID is passed through. If I set the CALLERID value in a dialplan the trunk caller id is sent instead.

Here is the dialplan:
exten => amiAgentToClient2,1,Answer()
same => n,NoOp(clientNumber=‘${clientNumber}’)
same => n,Set(CALLERID(all)=XXXXXXXXXXX)
same => n,Dial(Local/${clientNumber}@from-internal)
same => n,Hangup()

I’ve tried several variations including:

same => n,Set(CALLERID(num)=XXXXXXXXXXX)
and
same => n,Set(CALLERID(all)= XXXXXXXXXXX)
and
same => n,Set(CALLERID(num)=XXXXXXXXXXX)
same => n,Set(CALLERID(name)=“”)

Also tried setting it in the Dial application:

same => n,Dial(Local/${clientNumber}@from-internal,f(XXXXXXXXXXX))

Turning on sip logging I see the successful caller id (when set in GUI and called from the extension) sets the From: section with the custom calller id (i.e. From sip:[email protected])

When call from the dialplan I see CALLERID set in the asterisk messages (like in macro-dialout-trunk) but the From: section in the sip messages has the trunk caller id (i.e. From sip:[email protected])

I suspect this has something to do with Dial call from the Local channel but can’t figure out how to get it to accept the custom caller id. Is there special configuration on the Local channel I need to set? Any help is appreciated.

FYI Asterisk version 16.30.0, FreePBX version 16.0.40.7

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.