Dial Plan

nomattera
Joined: Mon 16 of Jul, 2012

Dial Plan

Posted:Thu 26 of Jul, 2012 (09:40 UTC)
Finaly got it to work thank you Sunnytheshine for the help:
this is how my dial plan looks like now, it works like magic.

[from_pstn]
exten => _X.,1,Set(test=${RAND(1,6)})
exten => _X.,n,Goto(option${test},s,1)


[option1]
exten => s,1,Answer()
exten => s,n,MusicOnHold()	

[option2]
exten => s,1,Answer()
exten => s,n,Busy(3)
exten => s,n,Hangup()
 
[option3]
exten => s,1,Answer()
exten => s,n,Congestion(3)
exten => s,n,Hangup()

[option4]
exten => s,1,Answer()
exten => s,n,Zapateller()
exten => s,n,Hangup()


[option5]
exten => s,1,Dial(SIP/7600,10)
exten => s,n,VoiceMail(1234@other)
exten => s,n,PlayBack(vm-goodbye)
exten => s,n,HangUp()

[option6]
exten => s,1,Dial(sip/7600,15)
exten => s,n,Hangup()

sunnytheshine
Joined: Mon 14 of May, 2012

Re: Dial Plan

Posted:Thu 26 of Jul, 2012 (08:29 UTC)
[from_pstn]
exten => _X.,1,Set(test=${RAND(1,6)})
exten => _X.,n,Goto(option${test},1,1)

[option1]
exten => 1,1,Answer()
exten => 1,n,Playback(cold_day)

[option2]
exten => 1,1,Playback(Busy)
exten => 1,n,Hangup()

[option3]
exten => 1,1,Playback(Congestion)
exten => 1,n,Hangup()

[option4]
exten => 1,1,Playback(Zapateller)
exten => 1,n,Hangup()


[option5]
exten => 1,1,Dial(sip/${test},10)
exten => 1,n,Voicemail(@default)
exten => 1,n,Hangup()


[option6]
exten => 1,1,Dial(sip/${test},15)
exten => 1,n,Hangup()

for step 5 and 6 u need to create sip account ... and for voicemail u have to configure voicemail in voicemail.conf


for more help
mail me @ sunnytheshine@hotmail.com
sunnytheshine
Joined: Mon 14 of May, 2012

Re: Dial Plan

Posted:Thu 26 of Jul, 2012 (08:25 UTC)
Hello nomattera,

you r doing to wrong....

[from_pstn]
exten => _X.,1,Set(test=${RAND(1,6)})
exten => _X.,n,Goto(option${test},1,1)

[option1]
exten => 1,1,Answer()
exten => 1,n,Playback(cold_day)	

[option2]
exten => 1,1,Playback(Busy)
exten => 1,n,Hangup()
 
[option3]
exten => 1,1,Playback(Congestion)
exten => 1,n,Hangup()

[option4]
exten => 1,1,Playback(Zapateller)
exten => 1,n,Hangup()


[option5]
exten => 1,1,Dial(sip/${test},10)
exten => 1,n,Voicemail(@default)
exten => 1,n,Hangup()


[option6]
exten => 1,1,Dial(sip/${test},15)
exten => 1,n,Hangup()

for step 5 and 6 u need to create sip account ... and for voicemail u have to configure voicemail in voicemail.conf


for more help
mail me @ sunnytheshine@hotmail.com
nomattera
Joined: Mon 16 of Jul, 2012

Dial Plan

Posted:Mon 16 of Jul, 2012 (10:08 UTC)
i want to create a dialplan in a context [from-pstn] that does the following. It should accept any number sent to it.Generates a random number from 1 to 6 and based on the number generated does the following thing to the inbound call 1. Answer immediately. Then play music on hold indefinitely.
2. Play Busy tone then hang up
3. Play Congestion tone then hang up
4. Play Zapateller then hang up
5. Ring for 10 seconds, then go to a voicemail box.
6. Ring for 15 seconds, then hangup
I am new to asterisk, and im stuck here...

[from_pstn]
exten => _X.,1,Set(test=${RAND(1,6)})
exten => _X.,n,Goto(option${test},${EXTEN},1)

[option1]
exten => 1,1,Answer()
exten => 1,n,Playback(cold_day)	

[option2]
exten => 2,1,Playback(Busy)
exten => 2,n,Hangup()
 
[option3]
exten => 3,1,Playback(Congestion)
exten => 3,n,Hangup()

[option4]
exten => 4,1,Playback(Zapateller)
exten => 4,n,Hangup()


[option5]
exten => 5,1,Dial(${test},10)
exten => 5,n,Hangup()


[option6]
exten => 6,1,Dial(${test},15)
exten => 6,n,Hangup()