Dear Group, I have a scenario where I would like to change the caller ID based on the number dialled; For example; ;Outbound UK and London Calls exten=>_8.,1,Set(CALLERIDNAME=0207100XXXX) exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) exten=>_80039.,1,Set(CALLERIDNAME=0039024070XXXX) exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) exten=>_80034.,1,Set(CALLERIDNAME=003491187XXXX) exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) exten=>_80049.,1,Set(CALLERIDNAME=0049891214XXXX) exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) So for anything outside the Madrid, Milan, Munich extensions I would like to use the generic UK number or have a pieced of logic that goes; exten=>_800.,1,Set(CALLERIDNAME=440207100XXXX) exten=>_800.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) Unfortunately this does not work, every time I dial I get CALLERIDNAME=0207100XXXX. What am I missing? Many Thanks Shad Mortazavi -------------------- n|m Nexus Management
I think the problem is related to pattern matching your outbound numbers. You have _8. for your first one listed and it will match for any of the other 800 numbers you have so it goes there. Take a look at this webpage on voip-info.org: http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf +sorting It should help you solve this problem. Bobby> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Shad Mortazavi > Sent: Tuesday, June 12, 2007 8:57 AM > To: asterisk-users@lists.digium.com > Subject: [asterisk-users] Changing the Caller ID > > Dear Group, > > I have a scenario where I would like to change the caller ID based on > the number dialled; > > For example; > > ;Outbound UK and London Calls > exten=>_8.,1,Set(CALLERIDNAME=0207100XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > exten=>_80039.,1,Set(CALLERIDNAME=0039024070XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > exten=>_80034.,1,Set(CALLERIDNAME=003491187XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > exten=>_80049.,1,Set(CALLERIDNAME=0049891214XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > So for anything outside the Madrid, Milan, Munich extensions I would > like to use the generic UK number or have a pieced of logic that goes; > > exten=>_800.,1,Set(CALLERIDNAME=440207100XXXX) > exten=>_800.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > Unfortunately this does not work, every time I dial I get > CALLERIDNAME=0207100XXXX. > > What am I missing? > > Many Thanks > > Shad Mortazavi > -------------------- > n|m Nexus Management > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Am Dienstag, den 12.06.2007, 09:57 -0400 schrieb Shad Mortazavi:> Dear Group, > > I have a scenario where I would like to change the caller ID based on > the number dialled; > > For example; > > ;Outbound UK and London Calls > exten=>_8.,1,Set(CALLERIDNAME=0207100XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > exten=>_80039.,1,Set(CALLERIDNAME=0039024070XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > exten=>_80034.,1,Set(CALLERIDNAME=003491187XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > exten=>_80049.,1,Set(CALLERIDNAME=0049891214XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > So for anything outside the Madrid, Milan, Munich extensions I would > like to use the generic UK number or have a pieced of logic that goes; > > exten=>_800.,1,Set(CALLERIDNAME=440207100XXXX) > exten=>_800.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r) > > Unfortunately this does not work, every time I dial I get > CALLERIDNAME=0207100XXXX. > > What am I missing?a/ Your provider needs to support setting other CALLERID values than the numbers he assigned to you, and even allow for international numbers. As an example, sipgate.de allows to set any german number as CALLERID, but no international phone numbers will work. Providers often suppress wrongly set CALLERIDs, replacing with the "default" CALLERID assigned to the phone line / account. b/ Besides 440207... probably is wrong, should be 44207... c/ You have several _8.,2, lines (identical), one is enough. And then, I do not know wether that pattern matching will work correctly ;-) BR Anselm
Shad Mortazavi wrote:> Dear Group, > > I have a scenario where I would like to change the caller ID based on > the number dialled; > > For example; > > ;Outbound UK and London Calls > exten=>_8.,1,Set(CALLERIDNAME=0207100XXXX) > exten=>_8.,2,Dial(SIP/${EXTEN:1}@esms-out,30,r)You must have forgot to read README.upgrade. Asterisk 1.4 has changed the way callerid is set.