Did you tried this?

Comment on Asterisk tips call through
jedaustin
Joined: Wed 23 of Mar, 2005

One question

Posted:Fri 01 of Apr, 2005 (07:15 UTC)
When I reach the dialed number, if I hit the * key it hangs up,
any way to prevent that?

JD
jedaustin
Joined: Wed 23 of Mar, 2005

Re: Re: Did you tried this?

Posted:Fri 01 of Apr, 2005 (07:10 UTC)
I finally got this to work with broadvoice, here's my setup.

Note, you need to put the 500 thing somewhere that it will get seen.
If you start out with a menu, you need to put the code in the menu.
Look in extensions_additional.conf to see what your trunk is called mine is OUT_2.

I put this in the first line of my main menu:
exten => _*888,1,Goto(callthrough-auth,s,1);

[callthrough-auth] ; note brackets around this
exten => s,1,Background(vm-password)
exten => s,2,ResponseTimeout(10)
exten => s,3,WaitExten
exten => s,4,WaitExten

exten => 1234,1,Goto(callthrough,s,1)
exten => 1225,1,Goto(callthrough,s,1)
exten => 6373,1,Goto(callthrough,s,1)

exten => *,1,Goto(s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,HangUp 

[callthrough] ; note brackets around this
exten => s,1,SetVar(NR=)
exten => s,2,Background(privacy-prompt)
exten => s,3,ResponseTimeout(10)
exten => s,4,WaitExten

exten => _X,1,SetVar(NR=${NR}${EXTEN})
exten => _X,2,Goto(s,3)

exten => *,1,Goto(s,1)

exten => #,1,Dial(${OUT_2}/${NR},30,H|g)
exten => #,3,GotoIf($[${DIALSTATUS} = NOANSWER]?4)
exten => #,4,GotoIf($[${DIALSTATUS} = CONGESTION]?4:5)
exten => #,5,Playback(vm-nobodyavail)
exten => #,6,Goto(s,1)
exten => #,102,Playback(tt-allbusy)

exten => t,1,Playback(vm-goodbye)
exten => t,2,HangUp

Anonymous

password auth

Posted:Fri 11 of Feb, 2005 (00:54 UTC)
Just posted this on IRC to someone, thought it may be useful (this is not tested).. for adding password protection:

change the exten 500 line to:
exten => 500,1,Goto(callthrough-auth,s,1)

and add:

[callthrough-auth]
exten => s,1,Background(vm-password)
exten => s,2,ResponseTimeout(10)
exten => s,3,WaitExten

exten => 4253,1,Goto(callthrough,s,1)
exten => 1225,1,Goto(callthrough,s,1)
exten => 6373,1,Goto(callthrough,s,1)

exten => *,1,Goto(s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,HangUp 



"4253", "1225" and "6373" are 3 PIN's that could be used to access the system. you could add as many as you like.

another idea would be to write an agi that checked voicemail.conf, and did the goto only if it matched a password in there (or even prompt for both extension and password).
Anonymous

Re: Did you tried this?

Posted:Fri 24 of Dec, 2004 (12:57 UTC)
Yes, its work fine (:razz:)
but, only if you will put in one more line:
s,4,WaitExten
(:mrgreen:)
Boris
Joined: Fri 19 of Nov, 2004

Re: Did you tried this?

Posted:Fri 10 of Dec, 2004 (11:58 UTC)
I have tried it in a test system with a capi device (therefore the colon...) and it works. Maybe you have to adjust it a little bit to make it more comfortable and test it more intensiv.
Anonymous

Did you tried this?

Posted:Fri 10 of Dec, 2004 (01:18 UTC)
Hi: Is this example a proof of concept, or you tried it in a working system?
exten => #,1,Dial(${TRUNK}:${NR},30,H|g)
The colon (:) doesn't appears to be correct and when hangup is issued
the channel is killed, the idea is great and we would appreciated ,if it is working for you, to have additional details....