Magnus BenngÄrd
2009-Dec-14 18:21 UTC
[asterisk-users] Rewrite calling number of incoming call
Hi! Trying to figure out how to rewrite calling number of an incoming call... A cell phone (0733025975) dials a X-Lite (977). X-Lite "shows" 733025975 at the display, but I want it to be 0317998975. I thought i could do something like: exten => 977/733025975,1,Set(CALLERID(number)=0317998975) exten => 977,n,Dial(SIP/0317998977) [Dec 14 19:07:43] NOTICE[20731]: chan_h323.c:2272 answer_call: Dropping call because extensions '977', 's' and 'i' doesn't exists in context [inputinterior.se] Rewriting of outgoing is working... snip exten => _0X!/0317998975,1,Set(CALLERID(number)=317998975) exten => _0X!/0317998977,1,Set(CALLERID(number)=317998977) exten => _0X!/0317998978,1,Set(CALLERID(number)=317998978) exten => _0X!/0317998985,1,Set(CALLERID(number)=317998985) exten => _0X!/0317998987,1,Set(CALLERID(number)=317998987) exten => _0X!,n,Dial(H323/0${EXTEN}@Avaya) Can someone guide me on the correct track? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091214/64f7bbb3/attachment.htm
Steve Johnson
2009-Dec-15 17:32 UTC
[asterisk-users] Rewrite calling number of incoming call
How about: exten => 977,1,ExecIf($[${CALLERID(num)} 733025975]?Set(CALLERID(num)=0317998975)) exten => 977,n,ExecIf($[${CALLERID(num)} = 1234]?Set(CALLERID(num)=317998977)) exten => 977,n,ExecIf($[${CALLERID(num)} = 5678]?Set(CALLERID(num)=317998978)) [..] exten => 977,n,Dial(SIP/0317998977) On Mon, Dec 14, 2009 at 12:21 PM, Magnus Benng?rd <magnus.b at inputinterior.se> wrote:> Hi! > > Trying to figure out how to rewrite calling number of an incoming call... > > A cell phone (0733025975) dials a X-Lite (977). > X-Lite "shows" 733025975 at the display, but I want it to be 0317998975. > I thought i could do something like: > > exten => 977/733025975,1,Set(CALLERID(number)=0317998975) > exten => 977,n,Dial(SIP/0317998977) > > [Dec 14 19:07:43] NOTICE[20731]: chan_h323.c:2272 answer_call: Dropping call > because extensions '977', 's' and 'i' doesn't exists in context > [inputinterior.se] > > Rewriting of outgoing is working... snip > > exten => _0X!/0317998975,1,Set(CALLERID(number)=317998975) > exten => _0X!/0317998977,1,Set(CALLERID(number)=317998977) > exten => _0X!/0317998978,1,Set(CALLERID(number)=317998978) > exten => _0X!/0317998985,1,Set(CALLERID(number)=317998985) > exten => _0X!/0317998987,1,Set(CALLERID(number)=317998987) > exten => _0X!,n,Dial(H323/0${EXTEN}@Avaya) > > Can someone guide me on the correct track? > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > ? http://lists.digium.com/mailman/listinfo/asterisk-users >