Asterisk 1.4.17 - SIP Incoming Delay In Answering Call

Hello,

We are currently running Asterisk 1.4.17 with Kernel 2.6.18-92.1.22.el5 and was hoping you can assist in finding a solution for your PBX which is using only SIP trunks to not answer right away, as we have a client using Cisco SNR with our PBX number attached as one of the reciepients.

We would like to know if there is a way to change the “auto-answer” option on the Asterisk PBX to allow the incoming call to ring for sometime rather then answering it right away (auto-answer). The number on our PBX is set to a ring all group with muliple members.

Please let me know if you need any further information from me to assist in figuring this out.

Thank You All For Your Help!

Asterisk doesn’t have an auto-answer facility. Calls are answered when the downstream number answer, a queue agent is connected, you do something that normally cannot be done with early media (Playback with normal options), or you explicitly answer with the Answer application.

You can use the Wait application before one of the above, to impose an additional delay.

By “ring all (of a) group with multiple members”, do you mean a queue with a ringall strategy, or Dial with multiple devices addresses separated by &. In both cases, subject to nothing earlier in the dialplan forcing an answer, the incoming call should not be answered until one of the outgoing devices answers.

A lot of people seem to think that every dial plan should start by calling the Answer application, but that is basically an urban myth, and normally you should not need to explicitly call Answer.

Hello All,

Our call group is not setup as a queue. I made the following changes to my extensions.conf but still the same issue:

exten => s,1,Answer(1)
to
exten => s,1,Answer(30)

As I believe I didn’t explain myself properly previously, I have included logs from our SIP provider which I am sure will better explain our goal. According to the logs there is a 100 Trying then a 200 OK but we would like something like:

100 Trying
180 Ringing (will check for SIP phone and answer)
200 OK (Upon answer of an actual SIP phone, so i guess this could be conditional)

Here are the logs:

U 2012/05/23 12:31:19.135419 200.100.200.100:5060 -> 200.100.200.100:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 200.100.200.100:5060;branch=z9hG4bK409d8255eb08d6ffb48ae1b82a6a91dc;received=200.100.200.100.
From: “Active” sip:9050000000@200.100.200.100;tag=3546779479-118955.
To: "Corporation"
sip:14160000000@200.200.200.100:5060.
Call-ID: 14627978-3546779479-118951@sip.provider.net.
CSeq: 1 INVITE.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Supported: replaces.
Contact: sip:14160000000@200.100.200.30.
Content-Length: 0.

U 2012/05/23 12:31:19.135673 200.100.200.100:5060 -> 200.100.200.100:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 200.100.200.100:5060;branch=z9hG4bK409d8255eb08d6ffb48ae1b82a6a91dc;received=200.100.200.100.
From: “Active” sip:9050000000@200.200.200.100;tag=3546779479-118955.
To: “Corporation 3” sip:14160000000@200.200.200.100:5060;tag=as5f081136.
Call-ID: 14627978-3546779479-118951@sip.provider.net.
CSeq: 1 INVITE.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Supported: replaces.
Contact: sip:14160000000@200.100.200.30.
Content-Type: application/sdp.
Content-Length: 291.
.
v=0.
o=root 26805 26805 IN IP4 200.100.200.100.
s=session.
c=IN IP4 200.100.200.100.
t=0 0.
m=audio 10784 RTP/AVP 0 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.

Thank you everyone so far!

Replace the Answer by Noop, or provide enough of the dialplan to show why, exceptionally, you need to answer at that point. If you want a specific delay, move the Answer to step 2 and use Wait as step 1. As you say that the answer can be conditional, you should not be using answer at all.

The delay in your answer is applied after the call is answered.

Hello,

Once I moved the Answer to step two and added Wait to 30, the line stopped accepting calls.

exten => s,1,Answer
exten => s,2,Goto(CORPORATIONSupport,s,1)
exten => s,3,Hangup

and changed it to the followng

exten => s,1,Wait(30)
exten => s,2,Answer
exten => s,3,Goto(CORPORATIONSupport,s,1)
exten => s,4,Hangup

You mentioned using the “Noop” but I’ve never used this before.

Thanks again for all of this!

Try this:

exten => s,1,Goto(CORPORATIONSupport,s,1)
exten => s,2,Hangup

That seemed to work! Thank you all for your help!