Rich Sias wrote:
> Below is chunk from extensions.conf file.
> I am attempting to get some kind of authorizaiton set for and extension.
> I have tried several methods and none have worked sufficiently. See
> Read(acc_code .. asterisk drops out and stops processing at this line.
> Do I have syntax wrong ? I first thought it was due to my running with
> 0.3.0 code. But I have just upgraded to 0.4.3 code and it still stops
> the process with an "UNKNOWN" error.
>
> Further down are two lines that try to run some scripts. Both exit with
> "0", I suspect because they don't really run. At present they are both
> commented out. One of them is a perl script or maybe both are.... How
> can I tell that the scripts are really executing ? I tried to change
> the direction in an if condition and the results remained the same. That
> made me susptect that there is NO execution of scripts.
>
> Rich Sias
>
> PS the scripts just extract from text file the vm extn and pwd.
>
> 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
> _______________________________________________
> 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]
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()
--
Kristian Kielhofner
_______________________________________________
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]