Discussion:
[Asterisk-Users] Delay when ringing internal extensions on incoming zap call
Derek Lee-Wo
2006-05-16 19:28:51 UTC
Permalink
I have a TDM400P with 2 FXO cards and I'm using ***@Home 2.8

I noticed that when I place a call to the analog lines from outside,
Asterisk takes a while to actually ring the extension the call is
being sen to.

I've been doing some tests, calling from my cellphone and here is what I see...

- After the first ring on my cell, Asterisk logs to the CLI that is
has an incoming call
- After the second ring, it kicks off part of the incoming call context
- After the third ring, it does the rest which then causes my SIP
phone to start ringing.

As a result, the caller hears 3 full rings before I even hear my SIP phone ring.

How can I speed that up, or is this "normal"?

I'm using ***@Home 2.8 and I set the trunks to answer immediately
and I disabled fax detection in zapata.conf, but none of this helped.

If I call my Asterisk box via my BroadVoice VoIP number, my SIP phone
starts to ring even before I hear the first ring on my cellphone.
w***@loopfree.net
2006-05-16 21:12:23 UTC
Permalink
Post by Derek Lee-Wo
I noticed that when I place a call to the analog lines from outside,
Asterisk takes a while to actually ring the extension the call is
being sen to.
X100P and Asterisk 1.2.7.1 here;
simple config to ring SIP extension (ATA-186) on incoming call from the POTS line.

I experienced about a 1-ring lag between the SIP phone and the rining on the POTS line.
Post by Derek Lee-Wo
- After the first ring on my cell, Asterisk logs to the CLI that is
has an incoming call
- After the second ring, it kicks off part of the incoming call context
I fixed this by setting:
usecallerid=no
in zapata.conf

(I do not have callerID service on my POTS line anyway). I assume that Asterisk
is waiting to see the caller ID data between ring 1 and ring 2 in order to be
able to switch based on caller ID data (which never comes). Disabling it allows
it to not have to wait.
Post by Derek Lee-Wo
- After the third ring, it does the rest which then causes my SIP
phone to start ringing.
Not sure where this additional lag is coming from. Could be something inherent in
your SIP phone I guess (my only SIP experience is with Cisco ATA 186).
--
-Will :: AD6XL
Orton :: http://www.loopfree.net/
Derek Lee-Wo
2006-05-16 21:28:15 UTC
Permalink
Post by w***@loopfree.net
Post by Derek Lee-Wo
- After the first ring on my cell, Asterisk logs to the CLI that is
has an incoming call
- After the second ring, it kicks off part of the incoming call context
usecallerid=no
in zapata.conf
I made this change and it helped in that it reduced the number of
rings. So instead of taking 3 rings, it's taking 2.

I notice after the first ring, I see the following in the CLI:

-- Starting simple switch on 'Zap/4-1'
-- Executing Goto("Zap/4-1", "from-pstn|1347|1") in new stack
-- Goto (from-pstn,1347,1)
-- Executing Set("Zap/4-1", "FROM_DID=1347") in new stack
-- Executing Set("Zap/4-1", "FAX_RX=disabled") in new stack
-- Executing Answer("Zap/4-1", "") in new stack
-- Executing PlayTones("Zap/4-1", "ring") in new stack
-- Executing NVFaxDetect("Zap/4-1", "0") in new stack

I then get a pause andafter the second ring I then see:

-- Executing Goto("Zap/4-1", "ext-local|200|1") in new stack
-- Goto (ext-local,200,1)
-- Executing Macro("Zap/4-1", "exten-vm|200|200") in new stack
-- Executing Macro("Zap/4-1", "user-callerid") in new stack
-- Executing Set("Zap/4-1", "AMPUSER=") in new stack
-- Executing Set("Zap/4-1", "EMERGENCYCID=") in new stack
-- Executing Set("Zap/4-1", "AMPUSERCIDNAME=") in new stack
-- Executing GotoIf("Zap/4-1", "1?6") in new stack

[snip]

I wonder if the NvFaxDetect() call is causing the extra delay. I
guess I can manually edit the files (I foundi it in one file after my
cursury check) to remove that line, but I'm a bit reluctant to do that
since I use AMP within ***@Home to do my configuration.
w***@loopfree.net
2006-05-16 21:44:01 UTC
Permalink
Post by Derek Lee-Wo
I wonder if the NvFaxDetect() call is causing the extra delay. I
That sounds reasonable. * is answering the call, generating a ring back to the caller, and listening
for fax noises before ringing your SIP device.

I have simply:
-- Starting simple switch on 'Zap/1-1'
-- Executing Dial("Zap/1-1", "SIP/6001|60") in new stack
-- Called 6001
-- SIP/6001-39c2 is ringing

on incoming call from Zap/1, I just have an inbound context:
exten => s,1,Dial(SIP/6001,60)
[...]

Asterisk never "picks up" the Zap/1 line until I actually answer my SIP phone or the Dial command
times out and has explicit instruction to answer/go to voicemail. Think about what you really want to
do... In any case, removing the fax detect seems like it should help.
--
-Will :: AD6XL
Orton :: http://www.loopfree.net/
Derek Lee-Wo
2006-05-16 23:00:11 UTC
Permalink
Post by w***@loopfree.net
do... In any case, removing the fax detect seems like it should help.
I commented out the line and it works great. Two concerns though:

- I edited the extensions_additional.conf file, but my fear s that it
will get overwritten if I make further changes via AMP or upgrade. Is
there a way to remove the NVFaxDetect() by only editing *_custom.conf
files?

- According to the documentation I was able to find, the "0" in
NVFaxDetect(0) means to not wait, but obviously it still waits at
least one ring.

Derek
Francesco Peeters
2006-05-17 05:33:58 UTC
Permalink
Post by Derek Lee-Wo
Post by w***@loopfree.net
do... In any case, removing the fax detect seems like it should help.
- I edited the extensions_additional.conf file, but my fear s that it
will get overwritten if I make further changes via AMP or upgrade. Is
there a way to remove the NVFaxDetect() by only editing *_custom.conf
files?
- According to the documentation I was able to find, the "0" in
NVFaxDetect(0) means to not wait, but obviously it still waits at
least one ring.
Going to AMP, Setup - General -> Extension of fax machine for receiving
faxes = disabled *should* disable fax detection by causing it to use a
different branch of the AMP macro's...

HTH!
--
Francesco Peeters
Derek Lee-Wo
2006-05-17 12:34:40 UTC
Permalink
Post by Francesco Peeters
Going to AMP, Setup - General -> Extension of fax machine for receiving
faxes = disabled *should* disable fax detection by causing it to use a
different branch of the AMP macro's...
I did set it to "disabled", but it still called NVFaxDetect() with a
parameter of zero.

Loading...