[asterisk-users] dialplan tips

Philipp Kempgen philipp.kempgen at amooma.de
Thu Aug 6 04:49:30 CDT 2009


harry R schrieb:

> But as someone else wrote before, you can do a dialplan like this
> exten => 101,1,Ringing
> exten => 101,n,Answer()
> exten => 101,n,Dial(SIP/quentin,10)
> exten => 101,n,Goto(101-${DIALSTATUS},1)
> exten => 101-NOANSWER,1,VoiceMail(101 at default,u)
> exten => 101-NOANSWER,n,Playback(vm-goodbye)
> exten => 101-NOANSWER,n,Hangup()
> exten => 101-BUSY,1,Playback(busy)
> exten => 101-BUSY,n,Wait(3)
> exten => 101-BUSY,n,VoiceMail(101 at default,b)
> exten => 101-BUSY,n,Playback(vm-goodbye)
> exten => 101-BUSY,n,Hangup()
> exten => _101-.,1,Goto(101-NOANSWER,1)

Such a dialplan is potentially dangerous.
Someone could call 101-BUSY directly and leave a voicemail message
even if you are available.
Please don't jump to extensions. Use labels (priorities) instead.
Or use the switch(){} statement in AEL (:-) so you don't have to
worry about the implementation details.


    Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
-- 



More information about the asterisk-users mailing list