I have not been able to find documentation on how to do this.
I have an inbound PRI Asterisk server (1) which gets the callerid numbers just fine. I route(Dial) calls to another Asterisk server (2) via IAX2 on a remote LAN. On that LAN are Polycom501s. Everything works great except the callerid on the Polycoms shows the PRI number Asterisk server (1) and not the original callerid.
I’ve tried the zapata.conf useincomingcalleridonzaptransfer=yes parameter with no impact.
I had hopes for that o Dial setting, but it made no difference.
The CallerID seems stuck on the PRI number which is incorrect as I’m “forwarding” the call to another Asterisk server. I’m not really sure where that number is being Set either except that’s the Zap trunk/extension that’s being “Answered” on server (1)
It seems I just need to SetCallerID to the original inbound CID value before I Dial out to the Asterisk Server (2), but how??
Try adding a debugging output. Like exten => x, 1, Noop(CALLERID(num)) when you receive the call and watch the console output. It should display the original caller*id. If it doesn’t look at the zaptel config file. Otherwise you can just SetCallerID(CALLERID(num)) before Dial().
you need to assign the original callerid to a variable when the call first comes in. then SetCallerID equal to $origCallerID further along in the dial plan and you’re all set. i’m assuming you can look at the Wiki and docs to figure out the simple variable assignment commands…