How to forward Caller ID over IAX trunk

I have one more question on the IAX trunk. When I dial extension 6789 from extension 3456. It will go through the trunk and on the phone 6789 will show CID of the trunk 6001. Can I forward the CID of 3456 to 6789 though the IAX trunk?


On the second server you can use SetCallerid to set the incoming callerid as outbound before you use Dial command to send out the call. Here is how to do it in dialplan.

exten => 2123456789,1,Answer
exten => 2123456789,n,Background(pls-hold-while-try)
exten => 2123456789,n,SetCallerID(${CALLERIDNUM})
exten => 2123456789,n,Dial(sip/[email protected],45,mtT)
exten => 2123456789,n,Hangup