[Asterisk-Users] Re: Wrong usage of [] in the extension?

Rusty Dekema rdekema at gmail.com
Mon Nov 28 14:20:01 MST 2005


Sorry to reply to myself, but I need to add some information:

I have been informed (and now understand why) that the [] syntax does not do
what I had in mind here. Is there any syntax that will do it? If not, I will
just  create a separate pattern for each NPA, which is not a big deal, but I
am now curious as to whether there is such a syntax.

Thanks,
Rusty

On 11/28/05, Rusty Dekema <rdekema at gmail.com> wrote:
>
> Hello,
>
> I am trying to set up my dialplan in such a manner that calls to numbers
> in the form 1-NPA-NXX-XXXX will only go through if the NPA dialed is a
> geographical NPA in the continental United States.
>
> I have collected a list of all NPAs that I want to allow, and have made
> the following dialplan entries (below). Calls that match the pattern do go
> through, but for each digit that I dial, I get the following error on the
> Asterisk console:
>
> WARNING[7045]: pbx.c:718 ast_extension_close: Wrong usage of [] in the
> extension
>
> or
>
> WARNING[7045]: pbx.c:699 ast_extension_match: Wrong usage of [] in the
> extension
>
> If I comment out the three entries below, the errors stop (and of course
> the calls do not go through).
>
> I have checked that each dialplan entry is on one line in the file; there
> are no accidental carriage returns or newlines present.
>
> Does anyone know what I am doing wrong? I realize that I have a rather
> large pattern defined, but it seems to be using correct syntax as far as I
> can tell. If there is a better way to do this, or if someone sees what I am
> doing incorrectly, could you please let me know?
>
> Thanks very much,
> Rusty
>
>
>
> Extensions.conf excerpt:
>
>
> exten =
> _1[201|202|203|205|206|207|208|209|210|212|213|214|215|216|217|218|219|2
>
> 24|225|228|229|231|234|239|240|248|251|252|253|254|256|260|262|267|269|270|276|2
>
> 81|301|302|303|304|305|307|308|309|310|312|313|314|315|316|317|318|319|320|321|3
>
> 23|325|330|334|336|337|339|347|351|352|360|361|386|401|402|404|405|406|407|408|4
>
> 09|410|412|413|414|415|417|419|423|425|430|432|434|435|440|443|469|478|479|480|4
>
> 84|501|502|503|504|505|507|508|509|510|512|513|515|516|517|518|520|530|540|541|5
>
> 51|559|561|562|563|567|570|571|573|574|580|585|586|601|602|603|605|606|607|608|6
>
> 09|610|612|614|615|616|617|618|619|620|623|626|630|631|636|641|646|650|651|660|6
>
> 61|662|678|682|684|701|702|703|704|706|707|708|712|713|714|715|716|717|718|719|7
>
> 20|724|727|731|732|734|740|754|757|760|763|765|769|770|772|773|774|775|781|785|7
>
> 86|801|802|803|804|805|806|810|812|813|814|815|816|817|818|828|830|831|832|843|8
>
> 45|847|848|850|856|857|858|859|860|862|863|864|865|870|878|901|903|904|906|908|9
>
> 09|910|912|913|914|915|916|917|918|919|920|925|928|931|936|937|940|941|947|949|9
>
> 51|952|954|956|970|971|972|973|978|979|980|985|989]NXXXXXX,1,Playback(local/ding
> ding)
>
> exten =
> _1[201|202|203|205|206|207|208|209|210|212|213|214|215|216|217|218|219|2
>
> 24|225|228|229|231|234|239|240|248|251|252|253|254|256|260|262|267|269|270|276|2
>
> 81|301|302|303|304|305|307|308|309|310|312|313|314|315|316|317|318|319|320|321|3
>
> 23|325|330|334|336|337|339|347|351|352|360|361|386|401|402|404|405|406|407|408|4
>
> 09|410|412|413|414|415|417|419|423|425|430|432|434|435|440|443|469|478|479|480|4
>
> 84|501|502|503|504|505|507|508|509|510|512|513|515|516|517|518|520|530|540|541|5
>
> 51|559|561|562|563|567|570|571|573|574|580|585|586|601|602|603|605|606|607|608|6
>
> 09|610|612|614|615|616|617|618|619|620|623|626|630|631|636|641|646|650|651|660|6
>
> 61|662|678|682|684|701|702|703|704|706|707|708|712|713|714|715|716|717|718|719|7
>
> 20|724|727|731|732|734|740|754|757|760|763|765|769|770|772|773|774|775|781|785|7
>
> 86|801|802|803|804|805|806|810|812|813|814|815|816|817|818|828|830|831|832|843|8
>
> 45|847|848|850|856|857|858|859|860|862|863|864|865|870|878|901|903|904|906|908|9
>
> 09|910|912|913|914|915|916|917|918|919|920|925|928|931|936|937|940|941|947|949|9
> 51|952|954|956|970|971|972|973|978|979|980|985|989]NXXXXXX,n,Dial(
> IAX2/xxxx at voip
> jet/${EXTEN},60)
>
> exten =
> _1[201|202|203|205|206|207|208|209|210|212|213|214|215|216|217|218|219|2
>
> 24|225|228|229|231|234|239|240|248|251|252|253|254|256|260|262|267|269|270|276|2
>
> 81|301|302|303|304|305|307|308|309|310|312|313|314|315|316|317|318|319|320|321|3
>
> 23|325|330|334|336|337|339|347|351|352|360|361|386|401|402|404|405|406|407|408|4
>
> 09|410|412|413|414|415|417|419|423|425|430|432|434|435|440|443|469|478|479|480|4
>
> 84|501|502|503|504|505|507|508|509|510|512|513|515|516|517|518|520|530|540|541|5
>
> 51|559|561|562|563|567|570|571|573|574|580|585|586|601|602|603|605|606|607|608|6
>
> 09|610|612|614|615|616|617|618|619|620|623|626|630|631|636|641|646|650|651|660|6
>
> 61|662|678|682|684|701|702|703|704|706|707|708|712|713|714|715|716|717|718|719|7
>
> 20|724|727|731|732|734|740|754|757|760|763|765|769|770|772|773|774|775|781|785|7
>
> 86|801|802|803|804|805|806|810|812|813|814|815|816|817|818|828|830|831|832|843|8
>
> 45|847|848|850|856|857|858|859|860|862|863|864|865|870|878|901|903|904|906|908|9
>
> 09|910|912|913|914|915|916|917|918|919|920|925|928|931|936|937|940|941|947|949|9
>
> 51|952|954|956|970|971|972|973|978|979|980|985|989]NXXXXXX,n,Goto(call-dispositi
> on|s|1)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051128/879baa03/attachment.htm


More information about the asterisk-users mailing list