One of my users has two extensions, both of which ring simultaneously when a call comes in for her. This works fine. If her primary extension is busy, then she is on the phone and there is no reason to ring the secondary extension. In this case, the call should go directly to voicemail, but it in fact rings the alternate extension before going to voicemail. This gives the caller the perception that she is available, but did not answer. 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. Can anyone suggest a solution? Thanks. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040228/396eb44e/attachment.htm
<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
have a look at the "ChanIsAvail" application. good luck, tad> 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. > > Can anyone suggest a solution? > > Thanks. > > Jim >