[asterisk-users] Questions about extension.conf

Salman Zafar msalman212 at gmail.com
Thu Nov 29 10:47:40 CST 2012


It is self explanatory, for example:

exten =>  _X.,1, Noop("Let say we have allowed all numbers i.e. _X means
and . specifies any range")
same => n,NoOp("Here we have skipped mentioning dial-pattern again and
thats it")


Hope I have answered your question.



On Thu, Nov 29, 2012 at 8:40 AM, Shitian Long <longst.cn at gmail.com> wrote:

> Hello
>
> I have been reading the sample extension.conf
>
> ;#######################
>
>
> [outbound-freenum2]
> ; This is the handler which performs the dialing logic. It is called
> ; from the [outbound-freenum] context
> ;
> exten => _X!,1,Verbose(2,Performing ISN lookup for ${EXTEN})
> same => n,Set(SUFFIX=${CUT(EXTEN,*,2-)})                                ;
> make sure the suffix is all digits as well
> same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" !=
> "${SUFFIX}"]?fn-CONGESTION,1)
>                                                                         ;
> filter out bad characters per the README-SERIOUSLY.best-practices.txt
> document
> same => n,Set(TIMEOUT(absolute)=10800)
> same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)})     ;
> perform our lookup with freenum.org
> same => n,GotoIf($["${isnresult}" != ""]?from)
> same => n,Set(DIALSTATUS=CONGESTION)
> same => n,Goto(fn-CONGESTION,1)
> same => n(from),Set(__SIPFROMUSER=${CALLERID(num)})
> same => n,GotoIf($["${GLOBAL(FREENUMDOMAIN)}" = ""]?dial)               ;
> check if we set the FREENUMDOMAIN global variable in [global]
> same => n,Set(__SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)})                 ;
>    if we did set it, then we'll use it for our outbound dialing domain
> same => n(dial),Dial(SIP/${isnresult},40)
> same => n,Goto(fn-${DIALSTATUS},1)
>
> exten => fn-BUSY,1,Busy()
>
> exten => _f[n]-.,1,NoOp(ISN: ${DIALSTATUS})
> same => n,Congestion()
>
> ;##########################
>
>
> According to "
> http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf"
>
> "Syntax for defining a context: keywords *exten*, *include*, *ignorepat*
>  and *switch*." "same is not mentioned in this wiki."
>
> There is a part of dial plan from sample extension.conf above. My Question
> is  how "same =>" key word works .
>
> Thanks
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Regards

**************************
Muhammad Salman
***************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121129/9d3398eb/attachment.htm>


More information about the asterisk-users mailing list