I have unlimited local calling on my cell phone provider but not long distance; so I wanted to create authentication based on me calling in and authenticating based on the callerid of my cell phone. Here is what I tried based on the wiki: exten => s,1,answer exten => s,2,GotoIf($[${CALLERIDNUM}="xxxxxxxxxx"]?4 exten => s,3,hangup exten => s,4, ; here I am going create "please enter the number you want to dial"?then have * dial out on a sip or iax provider... But I keep getting the error?.. Apr 20 12:59:55 WARNING[4395]: pbx.c:1291 pbx_extension_helper: No application 'GotoIf($[${CALLERIDNUM}="xxxxxxxxxx"]?4' Has GotoIF been removed or something? -Mark -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.19 - Release Date: 4/20/2005
Try terminating the GotoIf statement with a ')' MARK. Mark Halverson wrote:>I have unlimited local calling on my cell phone provider but not long >distance; so I wanted to create authentication based on me calling in and >authenticating based on the callerid of my cell phone. > >Here is what I tried based on the wiki: >exten => s,1,answer >exten => s,2,GotoIf($[${CALLERIDNUM}="xxxxxxxxxx"]?4 >exten => s,3,hangup >exten => s,4, ; here I am going create "please enter the number you want to >dial"?then have * dial out on a sip or iax provider... > >But I keep getting the error?.. > >Apr 20 12:59:55 WARNING[4395]: pbx.c:1291 pbx_extension_helper: No >application 'GotoIf($[${CALLERIDNUM}="xxxxxxxxxx"]?4' > >Has GotoIF been removed or something? > >-Mark > > >
Here is a working sample that I use for the same thing on my home box... note that I use AreskiCC so that I can easily and nicely track usage.. The SetAccount is used so that AreskiCC doesn't ask for the calling card number and directly prompts me to dial but if anyone else calls in it asks for a calling card. exten => 1,1,Answer exten => 1,2,Wait,2 exten => 1,3,GotoIf($[${CALLERIDNUM} = 5555551212]?1|100:1|500) exten => 1,100,SetAccount(1234567890) exten => 1,101,Goto(1|500) exten => 1,500,DeadAGI,areskicc.php exten => 1,501,Wait,2 exten => 1,502,Hangup
Hi Mark You need to close the "(" : exten => s,2,GotoIf($[${CALLERIDNUM} = "xxxxxxxxxx"]?4) Regards, Fred -----Message d'origine----- De?: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] De la part de Mark Halverson Envoy??: mercredi 20 avril 2005 21:59 ??: 'Asterisk Users Mailing List - Non-Commercial Discussion' Objet?: [Asterisk-Users] GotoIf in Stable 1.0.4 I have unlimited local calling on my cell phone provider but not long distance; so I wanted to create authentication based on me calling in and authenticating based on the callerid of my cell phone. Here is what I tried based on the wiki: exten => s,1,answer exten => s,2,GotoIf($[${CALLERIDNUM}="xxxxxxxxxx"]?4 exten => s,3,hangup exten => s,4, ; here I am going create "please enter the number you want to dial" then have * dial out on a sip or iax provider... But I keep getting the error .. Apr 20 12:59:55 WARNING[4395]: pbx.c:1291 pbx_extension_helper: No application 'GotoIf($[${CALLERIDNUM}="xxxxxxxxxx"]?4' Has GotoIF been removed or something? -Mark -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.19 - Release Date: 4/20/2005 _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users