[Asterisk-Users] If one extension is busy...
Robert Hajime Lanning
lanning+asterisk at monsoonwind.com
Sat Feb 28 20:45:19 MST 2004
<quote who="Jim Sneeringer">
> How can I program it to go directly to voicemail if her primary line is
> busy?
>
> I could start out by testing to see if the line is busy using GotoIf, if I
> knew how to test for busy. Alternately, I could ring her primary line for 1
> second and go to voicemail if it is busy. Then I could ring both lines
> together for a longer period of time. However, I'm afraid it might not work
> if she picked up just as the one second was up.
>
ChanIsAvail()
You must make sure CallWaiting is turned off.
I have a few twoline phones on a channelbank. I turned off CallWaiting, then
I test the primary and secondary lines and ring the first one available.
You send ChanIsAvail() a list of channels. It will iterate down the list and
return the first one available. There is a side effect, it returns in
$AVAILCHAN the channel that succeded in makeing a call, but it also has the
channel's session ID tagged on. If you are going to use the value of AVAILCHAN,
you need to strip the session ID off. I have an AGI perl script to do this with
ZAP and SIP channels, but currently does not work with IAX channels. (The
session ID delimiter is different.)
--
END OF LINE
-MCP
More information about the asterisk-users
mailing list