[asterisk-users] menu issue

khalid touati khalidtouati at gmail.com
Tue Jun 21 12:17:55 CDT 2011


Hi I wanted to help out with dial plan, but it's not obvious what you want
to achieve, also I do recommend to read the chapter that talks about
contexts and dialplan from future of asterisk book. but if you're in rush
just try to make clear how you want your system to behave and i'll be glad
to help.

On Tue, Jun 21, 2011 at 9:22 AM, salaheddine elharit <
salah.elharit200 at gmail.com> wrote:

>  Hello
>
>
>
> I have created the menu below, with this menu when I call 520460XXX I can
> hear the welcome message [home] context and when I press the # I can go to
> the [menu] context and hear the menu message
>
>
>
> When I press 1 in order to go to the [call] I can hear the call message
>
>
> Now I have 2 client sip 222 and 223 with x-lite, how can I do in order to
> receive the call in 223 with [call] and receive a call in 222 with [support]
>
> thanks and best regards
>
>
> exten => 520460XXX,1,Ringing()
> exten => 520460XXX,2,Wait(4)
> exten => 520460XXX,3,Goto(home,s,1)
>
> [home]
> exten => s,1,SetGlobalVar(sounds_path=/var/lib/asterisk/sounds/)
> exten => s,2,Background(${sounds_path}welcome)
> exten => s,3,WaitExten(10)
>
> exten => #,1,Goto(menu,s,1)
> exten => i,1,Playback(${sounds_path}error-key)
> exten => t,1,Goto(home,s,1)
>
> [menu]
> exten => s,1,Background(${sounds_path}menu)
>
> exten => 0,1,Goto(menu,s,1)
> exten => 1,1,Goto(call,s,1)
> exten => 2,1,Goto(support,s,1)
>
> exten => i,1,Playback(${sounds_path}error-key)
> exten => i,2,Goto(call,s,1)
> exten => t,1,Goto(call,s,1)
> [call]
> exten => s,1,Background(${sounds_path}call)
>
> exten => 0,1,Goto(menu,s,1)
> exten => 223,1,Dial(SIP/${EXTEN},20,tr)
>
> exten => i,1,Playback(${sounds_path}error-key)
> exten => t,1,Goto(appel,s,1)
>
>
> [support]
> exten => s,1,GoToIfTime(09:00-17:00|mon-fri|*|*?s,4)
> exten => s,2,Playback(${sounds_path}no-relation-support)
> exten => s,3,Goto(menu,s,1)
> exten => s,4,Playback(${sounds_path}relation-support)
> exten => s,5,Queue(default)
> exten => t,1,Hangup()
>
>
>  2011/6/20 Warren Selby <wcselby at selbytech.com>
>
>>   On Mon, Jun 20, 2011 at 12:17 PM, salaheddine elharit <
>> salah.elharit200 at gmail.com> wrote:
>>
>>> [home]
>>> exten => s,1,SetGlobalVar(sounds_path=/var/lib/asterisk/sounds/)
>>> exten => s,2,Background(${sounds_path}welcome)
>>> exten => #,1,Goto(menu,s,1)
>>> exten => i,1,Playback(${sounds_path}error-key)
>>> exten => t,1,Goto(home,s,1)
>>>
>>>
>> You need to add the following to the [home] context:
>>
>> exten => s,3,WaitExten(10)
>>
>> which will cause the call to wait 10 seconds for input, otherwise it will
>> timeout and go to the 't' extension.  The way you currently have it, the
>> call will end after the Background() app finishes playing because it has no
>> additional steps and nothing that will tell it to go to the 't' extension.
>>
>> Also, consider switching your dialplan priorities away from "1,2,3..." and
>> go to "1,n,n,n..." as this reduces headaches in the longrun.
>>
>> --
>> Thanks,
>> --Warren Selby, dCAP
>> http://www.SelbyTech.com <http://www.selbytech.com/>
>>
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>               http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Abdullah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110621/817422eb/attachment.htm>


More information about the asterisk-users mailing list