On 9/14/06, Kristian Kielhofner <[EMAIL PROTECTED]> wrote:
> Rich Sias wrote:
> > Below is chunk from extensions.conf file.
> > exten => _10XX,n,saydigits(345)
> > ;exten => _10XX,n,VMAuthenticate([EMAIL PROTECTED]|aj)
> > ;exten => 10XX,1,Answer                     ; Answer the line
> > exten => 10XX,n,Read(acc_code,custom/access-code,4)
> > exten => 10XX,n,set(passkey=${DB(auth_user/${acc_code})})
> > exten => 10XX,n,Authenticate(${passkey})
> > exten => 10XX,n,set(db_context=${DB(acc_cont/${acc_code})})
> > exten => 10XX,n,SetAccount(${acc_code})
> > exten => 10XX,n,DISA(no-password|${db_context})
> > ;exten => _10XX,n,AGI(vm-pw.agi,[EMAIL PROTECTED])
> > ;exten =>
> > _10XX,n,agi,chk_vm_pwd.agi|/etc/asterisk/voicemail.conf|${ext_num}|${ext_pwd}
> >
> > exten => _10XX,n,Background(custom/if-you-know-ext)
> > ;exten => _10XX,n,WaitExten(3)
> > exten => _10XX,n,Read($(EXTEN})
> > exten => _10XX,n,Goto(home,${EXTEN},1)
> > exten => _10XX,n+101,Background(tt-weasels)
> > exten => _10XX,n,hangup
>
> Rich,
>
> 1 - You need to call Answer() before saydigits or read
> 2 - An extension always needs to start with a defined "1" priority, you
> can use "n" after that.
> 3 - You need to make sure that your AGIs are supported in AstLinux.  If
> it is perl, it needs to work with microperl and use the proper pathname.
> 4 - There is no such priority "n+101".  That is used in docs for an
> example, you are supposed to replace "n" with the priority of the
> extension you are at:
>
> exten => s,1,Dial()
>
> exten => s,102,DoSomething()
>
>         In this case, Dial would jump to 102.  Note that this kind of syntax
> has been deprecated as of 1.2 and is slated for removal in 1.4.  You
> should really be using Goto, GotoIf, etc based on variables:
>
> exten => s,1,Dial()
> exten => s,2,Goto(s-${DIALSTATUS},1)
>
> exten => s-BUSY,1,DoSomething()
>
> exten => s-CONGESTION,1,DoSomethingElse()

Just an extra note here to expand upon what Kristian said:

If you want to use the +101, then you need to use priority labels like so

exten => s,1,Answer()
exten => s,n(dialing),Dial(...)
exten => s,dialing+101,Voicemail(101|b)

And as Kris said, anything to do with priority jumping will be removed
in the 1.4 release, so you're best off using the Goto() example as
Kristian demonstrated above. Its the better way to do it, plus you can
handle each situation different if you wish.

If you don't want to have to create ALL the different values, you
could add something like this (in conjunction with what Kris created
above):

exten => _s-.,1,Goto(s-BUSY,1)

Notice the little dot . after the _s-     that is a catch all. The
underscore means we're pattern matching.

Hope that helps!

-- 
Leif Madsen.
http://www.leifmadsen.com
http://www.oreilly.com/catalog/asterisk
_______________________________________________
Astlinux-users mailing list
[email protected]
http://lists.kriscompanies.com/mailman/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to