[Asterisk-Users] Calling SIP

info-lists at robertc.de info-lists at robertc.de
Mon Feb 9 14:51:21 MST 2004


Tim Sailer said:
> I've looked, poked, and hoped, but I can't seem to make * understand
> the difference between a SIP channel being busy or not being there.
> Both come up as 'busy'. I would expect the unregistered SIP to be seen
> as unavailable. Am I just missing something obvious, again?
>
> Tim
> ^
Tim,
I use the following in my dialplan to distinguish between Unavailable (ie:
did not answer), Busy and  Channel doesn't exist.  ChanisAvail goes to
n+101 if the channel is NOT avail.  There is probably a better way to exit
the sequence but that is what works for me.

exten => 11,1,Macro(stdexten,11,SIP/11)

Below is the macro for the above... Have tested it with IAX2, SIP and MGCP.
The first argument is the macro name, 2nd is the voicemailbox, 3rd is the
Channel to dial.

[macro-stdexten]
exten => s,1,ChanisAvail(${ARG2})
exten => s,2,Dial(${ARG2},20,Ttr)
exten => s,102,Voicemail2(u${ARG1})
exten => s,103,Hangup
exten => s,104,Voicemail2(b${ARG1})
exten => s,105,Hangup

LIke I said.. its messy but does work.

Robert
Friedrichshafen, Germany




More information about the asterisk-users mailing list