[asterisk-dev] SIP behaviour

Konstantinos Arvanitis konstantinos.arvanitis at gmail.com
Thu Jul 26 09:06:06 CDT 2007


In my experimenting with fallback routes, I have come across the
following behaviour:

Setup: Asterisk PBX with 1 FXS and 1 FXO port, and 3 SIP phones. It
connects to a network with a bridge interface (br0) which bridges a
wifi interface and 4 normal ethernet intefaces. Connected to the
ethernet are a router and a DNS server.

(What I believe are the) relevant configuration parts:
extensions.conf:
[outbound]
exten => _9XXXXXXXXXX,1,Dial(SIP/0030${EXTEN:1}@sipprov1)
exten => _9XXXXXXXXXX,2,NoOp(${DIALSTATUS})
exten => _9XXXXXXXXXX,3,Dial(Zap/2/${EXTEN:1})

sip.conf:
[general]
registerattempts=0
srvlookup=no

register => username:password at sip.voipbuster.com

[sipprov1]
type=friend
username=username
host=sip.voipbuster.com
context=default
insecure=port,invite
secret=password

Case 1: No network connection (network interface exists (br0), but no
ethernet cable is plugged in. Thus we have no DNS and no actual access
to Internet.

FXS Try: Dialing from the FXS phone, I get a ~10 seconds before the
attempt over SIP fails.

Case 2: I am connected to the network, and just have bad
username/password for VoIPBuster. It show shows as registered in "sip
show registery"!

FXS Try: Dialing from the FXS phone, I get almost no time before SIP
fails with "CONGESTION". (Error 500 from voipbuster.com), and the call
goes on over Zap.

SIP Try: Calling from X-Lite and hanging-up before the called number
answers results in immediate hangup.

Case 3: While the network was working, I remove the ethernet cable.
Now the system has no connection, but doesn't know it at application
level. We were also registered with VoIPBuster before the cable was
removed.

FXS Try: Dialing from the FXS phone, I get a >100 seconds delay before
the first dial fails (with CHANUNAVAIL). This is the same even if the
"sipprov1" shows as "Unregistered" in "sip show registry"

SIP Try: Dialing from a SIP phone, I get the same >100 seconds delay
before the first dial fails, but now I have an extra problem. When the
call gets through to Zap, I press Hangup on the SIP phone (X-Lite) and
Asterisk takes the "Hangup" packet after 30 - 50 seconds.

The above suggest to me that there is something fishy with DNS
handling inside chan_sip, which forces all SIP handling to wait. Am I
doing something wrong (besides pulling the cable)? Has anyone else
observed this?



More information about the asterisk-dev mailing list