Callerid number forwarding

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.

Does anyone know how to do this?

Thanks in advance.

The “o” option in the Dial command may help you :wink:

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().

Stoyan

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…

I have the same problem with Asterisk 1.2.5 (and others)

The example below is not working. It gives extension 101 as number on the phones.

exten => 102,1,Set(CALLERID(name)=Name)
exten => 102,2,Set(CALLERID(number)=0123456789)
exten => 102,3,Dial(SIP/101,120,o)
exten => 102,4,Hangup

The “dial command” overwrites the set number for the call even though the “o”-option is set.

I’ve been struggling with this fo quite a while and have not been able to find a solution…
…but now I’m happy to find others with the same problem… :wink:

Have you set the “fromuser” in sip.conf? Take a look at voip-info.org/wiki-Asterisk+config+sip.conf

Stoyan

Thanks.

I would have never found it, streange no-one at the other forums I’ve tested haven’t mentioned this.

I guess I added fromuser since it was required from mu SIP-providers, but it isn’t internally…