Hello, I am trying to alter the outbound callerID for extensions within a context I have created.
I wrote the following: exten => _9.,2,ExecIf($[$["${REALCALLERIDNUM}" = "360"] | $["$ {REALCALLERIDNUM}" = "670"]]|Set|CALLERID(num)=581560) exten => _9.,3,ExecIf($[$["${REALCALLERIDNUM}" = "361"] | $["$ {REALCALLERIDNUM}" = "671"]]|Set|CALLERID(num)=581561) exten => _9.,4,ExecIf($[$["${REALCALLERIDNUM}" = "362"] | $["$ {REALCALLERIDNUM}" = "672"]]|Set|CALLERID(num)=581562) exten => _9.,5,ExecIf($[$["${REALCALLERIDNUM}" = "363"] | $["$ {REALCALLERIDNUM}" = "673"]]|Set|CALLERID(num)=581563) exten => _9.,6,ExecIf($[$["${REALCALLERIDNUM}" = "364"] | $["$ {REALCALLERIDNUM}" = "674"]]|Set|CALLERID(num)=581564) exten => _9.,7,ExecIf($[$["${REALCALLERIDNUM}" = "365"] | $["$ {REALCALLERIDNUM}" = "675"]]|Set|CALLERID(num)=581565) exten => _9.,8,ExecIf($[$["${REALCALLERIDNUM}" = "366"] | $["$ {REALCALLERIDNUM}" = "676"]]|Set|CALLERID(num)=581566) exten => _9.,9,ExecIf($[$["${REALCALLERIDNUM}" = "367"] | $["$ {REALCALLERIDNUM}" = "677"]]|Set|CALLERID(num)=581567) exten => _9.,10,ExecIf($[$["${REALCALLERIDNUM}" = "368"] | $["$ {REALCALLERIDNUM}" = "678"]]|Set|CALLERID(num)=581568) exten => _9.,11,ExecIf($[$["${REALCALLERIDNUM}" = "369"] | $["$ {REALCALLERIDNUM}" = "679"]]|Set|CALLERID(num)=581569) exten => _9.,12,ExecIf($[$["${REALCALLERIDNUM}" = "700"] | $["$ {REALCALLERIDNUM}" = "701"]]|Set|CALLERID(num)=581557) exten => _9.,13,ExecIf($[$["${REALCALLERIDNUM}" = "100"] | $["$ {REALCALLERIDNUM}" = "101"]]|Set|CALLERID(num)=581500) This *should* change the callerID for (for example) 700 and 701 to be 581557, and any extensions not listed above, it should leave them alone. If I call from extension 666, I get the correct outbound number (as it does exist), but the rules above are not being followed. I have tried to use Set(CALLERID(num)=581500) which works okay slightly further down. I am aiming for any numbers starting with a 9 to follow the rules above, and then to follow a further rule (eg if the number starts 901, or 907) I'm stuck.. If anyone could help, I would be eternally grateful.. Thanks! Andy _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2008 - September 22 - 25 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users