[Asterisk-Users] SIP extension "busy" when not available ??
info-lists at robertc.de
info-lists at robertc.de
Mon Feb 23 14:45:33 MST 2004
Soren Rathje said:
>>
>> I use ChanIsAvail() to check to see if the phone is connected at the
>> top
>> of the dialplan for that extension. This works for IAX2 and SIP channels
>> but not for MGCP.
>>
>> If you are interested in the actual code I can send it to you from home
>> tonight.
>>
>> Robert
>>
>
> Thank you, yes please...
>
> Well, I'm about three weeks into my very first * installation (that sort
> of
> works), so basically any info/tips/tricks/"word of advice" is accepted
> with
> appreciation...
>
> -- Soren
I use a macro to define the extensions. In this way I only have to enter 1
line per actual extension.
The Macro is:
[macro-stdexten]
exten => s,1,ChanisAvail(${ARG2})
exten => s,2,Dial(${ARG2},20,Ttr)
exten => s,102,GoTo(voicemail,s,1) <--Note A
exten => s,103,Hangup
exten => s,104,GoTo(voicemail,s,1) <--Note B
exten => s,105,Hangup
The extensions are defined as:
exten => 10,1,Macro(stdexten,10,MGCP/aaln/1 at 192.168.0.4)
exten => 11,1,Macro(stdexten,11,SIP/11)
exten => 12,1,Macro(stdexten,12,IAX2/12)
The 2nd argument in the () is the voicemailbox number, 3rd argument is the
Channel to dial.
Note A: If the Channel is not available then control comes here. You can
put a Voicemail2 statement here with the u option or whatever you want to
use.
Note B: This is where the Busy/Timeout comes from the Dial command.
In my case I have a voicemail context that handles the 2 mailboxes we use
here in the house. That is: an announcement is played and the caller
selects the mailbox to get the message.
Its not perfect and for sure can be improved.
Robert
More information about the asterisk-users
mailing list