Ring group timeout and mailbox


I have a problem configuring a ring group with a timeout and a mailbox. A call should ring 2 phones simultaniously and after 20 seconds switch over to a Mailbox. There are 2 sites and an asterisk server with a phone on each site. When the number on the first server is called it should pass the call to the local phone and the remote phone on the other server. If no one picks up during the 20 seconds timeout the first server should go on and pass the call to the local mailbox. There is no mailbox on the second server. This looks very easy.

The first server has …

exten => 54321,1,Answer()
   same => n,Dial(SIP/3000&SIP/12345@sip_remote,20,t)
   same => n,VoiceMail(400@default,us)
   same => n,Hangup()

The second server has …

exten => 12345,1,Answer()
   same => n,Dial(SIP/4000,,t)
   same => n,Hangup()

Both phones ring as expected but the timeout is ignored and the VoiceMail extension is never reached. If the remote phone is removed from the Dial function everything works fine. Maybe the reason is that the remote site always answers the call even no one picks up. But how can I work around this.

Many thanks in advance

Remove the Answer calls, particularly that on the second site. Why did you think they were necessary (they rarely are)?

Note: the first site should stop ringing soon after the second one starts ringing.

Many thanks for your suggestions. It’s always said that it is more robust to place the Answer function at the beginning but I will try without it.

concerning your note: thats not what was intended, both phones on both sites should ring simultaneously and stop after 20 seconds. So there is only one Dial() calling both destinations at once.

Personally I think that explicitly answering is a bad habit. The only time it might make a difference is with voice announcements, although they are supposed to force an early answer.

Once the response from the remote call’s Answer comes back, the Dial application will connect the remote side and stop the timeout. It should also stop the local side ringing. If you want a timeout, the remote side must not answer unless it is really answered. If you want the local side to have a chance of answering, you must also not answer the remote side.