[asterisk-dev] 1.4.0 SIP weirdness: possible clue?

Brian Capouch brianc at palaver.net
Wed Jan 3 01:09:00 MST 2007


Please forgive my lack of chops and also that this report is cursory. 
It's what I was able to do with the tools and time I had.

My test platform is MIPSEL; I can't reproduce the problem on my x86 box. 
  On the embedded box I can't easily use gdb etc.

After many hours of trial and error testing today, I was able to isolate 
a single factor that (so far) when toggled, completely solves the crash 
and weird behavior problems.

It is the use of "fromdomain=" in a sip.conf peer configuration stanza.

The peer in question is the Gizmo (sipphone), and I cannot use them with 
my NATted box without that clause included.  I also have a SIP account 
with Gafachi, which does *not* have to use "fromdomain" in the config in 
order to use their service.

Here's what happens, completely reproducibly: I boot up with this stanza 
in sip.conf:

[proxy01.sipphone.com]
type=friend
context=from-outside
disallow=all
allow=ulaw
dtmfmode=rfc2833
host=proxy01.sipphone.com
secret=mysecret
username=myusername
canreinvite=no
fromdomain=proxy01.sipphone.com
fromuser=myusername

I can sit and make IAX calls, receive calls, and make gafachi calls to 
my heart's content.

But when I make an outbound call using sipphone, the call terminates 
just fine, and I converse normally with the remote party.  The *instant* 
I hang up, however, I see the system load go sky high--99%, and the next 
time I try to do something, either I get horrid audio (for lack of CPU) 
or the server just bonks out.

If I avoid making any use of this peer, (so far) things work without 
problem.

An interesting SIDE NOTE is that the above stanza, coupled with a SIP 
register, allows me to originate incoming calls from the sipphone 
network, but only on 1.2.13 servers, not 1.4.0.  Both use the same exact 
configuration.  I'm appending below first the sip debug output of 1.4.0, 
and then 1.2.13.  This isn't overtly related to the 1.4.0 crash 
problems, but may provide a clue, who knows.

Perhaps all this will jingle a clue in someone's brain.

Thx.

b.

******** 1.4.0 Origination Doesn't work ****************

<--- SIP read from 198.65.166.131:5060 --->
INVITE sip:s at 12.176.248.3:19545 SIP/2.0
Record-Route: <sip:198.65.166.131;ftag=as0d2fe211;lr>
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK2fe1.ae8c43.0
Via: SIP/2.0/UDP 198.65.166.172:5060;branch=z9hG4bK5fcfda69;rport=5060
From: "+12192538181" <sip:+12192538181 at 198.65.166.172>;tag=as0d2fe211
To: <sip:19035678181 at 198.65.166.131>
Contact: <sip:+12192538181 at 198.65.166.172;nat=yes>
Call-ID: 48c4f34f5ff8aedc349494672eb30835 at 198.65.166.172
CSeq: 102 INVITE

User-Agent: SIPCallProxy1
Max-Forwards: 16
Date: Wed, 03 Jan 2007 07:48:08 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 334
RemoteIP: 198.65.166.172
P-hint: usrloc routed
P-RTP-Proxy: YES (1)
P-Behind-NAT: Yes (1)

v=0
o=root 22673 22673 IN IP4 198.65.166.172
s=session
c=IN IP4 198.65.166.131
t=0 0
m=audio 46952 RTP/AVP 18 97 3 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=nortpproxy:yes

<------------->
--- (19 headers 15 lines) ---
Sending to 198.65.166.131 : 5060 (no NAT)
Using INVITE request as basis request - 
48c4f34f5ff8aedc349494672eb30835 at 198.65.166.172
Found peer 'proxy01.sipphone.com'

<--- Reliably Transmitting (no NAT) to 198.65.166.131:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 
198.65.166.131;branch=z9hG4bK2fe1.ae8c43.0;received=198.65.166.131
Via: SIP/2.0/UDP 198.65.166.172:5060;branch=z9hG4bK5fcfda69;rport=5060
From: "+12192538181" <sip:+12192538181 at 198.65.166.172>;tag=as0d2fe211
To: <sip:19035678181 at 198.65.166.131>;tag=as04c59bea
Call-ID: 48c4f34f5ff8aedc349494672eb30835 at 198.65.166.172
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Proxy-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2d67db49"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 
'48c4f34f5ff8aedc349494672eb30835 at 198.65.166.172' in 32000 ms (Method: 
INVITE)

wrtnewWGT*CLI> sip set debug off
<--- SIP read from 198.65.166.131:5060 --->
ACK sip:s at 12.176.248.3:19545 SIP/2.0
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK2fe1.ae8c43.0
From: "+12192538181" <sip:+12192538181 at 198.65.166.172>;tag=as0d2fe211
Call-ID: 48c4f34f5ff8aedc349494672eb30835 at 198.65.166.172
To: <sip:19035678181 at 198.65.166.131>;tag=as04c59bea
CSeq: 102 ACK
Content-Length: 0


<------------->
--- (7 headers 0 lines) ---

********** 1.2.13 works just fine **************

<-- SIP read from 198.65.166.131:5060:
INVITE sip:s at 12.176.248.3:5060 SIP/2.0
Record-Route: <sip:198.65.166.131;ftag=as194f9a73;lr>
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK5329.ceb73995.0
Via: SIP/2.0/UDP 198.65.166.172:5060;branch=z9hG4bK35339844;rport=5060
From: "+12192538181" <sip:+12192538181 at 198.65.166.172>;tag=as194f9a73
To: <sip:19035678181 at 198.65.166.131>
Contact: <sip:+12192538181 at 198.65.166.172;nat=yes>
Call-ID: 2b85a0cc6d25ec3f4066936d3368454b at 198.65.166.172
CSeq: 102 INVITE
User-Agent: SIPCallProxy1
Max-Forwards: 16
Date: Wed, 03 Jan 2007 07:59:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 334
RemoteIP: 198.65.166.172
P-hint: usrloc routed
P-RTP-Proxy: YES (1)
P-Behind-NAT: Yes (1)

v=0
o=root 22673 22673 IN IP4 198.65.166.172
s=session
c=IN IP4 198.65.166.131
t=0 0
m=audio 47084 RTP/AVP 18 97 3 0 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=rtpmap:3 GSM/8000
a
=rtpmap:0 PCMU/8000debug
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=nortpproxy:yes

--- (19 headers 15 lines) ---
Using INVITE request as basis request - 
2b85a0cc6d25ec3f4066936d3368454b at 198.65.166.172
Sending to 198.65.166.131 : 5060 (non-NAT)
Found peer 'proxy01.sipphone.com'
Found RTP audio format 18
Found RTP audio format 97
Found RTP audio format 3
Found RTP audio format 0
Found RTP audio format 101
Peer audio RTP is at port 198.65.166.131:47084
Found description format G729
Found description format iLBC
Found description format GSM
Found description format PCMU
Found description format telephone-event

Capabilities: us - 0x4 (ulaw), peer - audio=0x506 
(gsm|ulaw|g729|ilbc)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 
(telephone-event), combined - 0x1 (telephone-event)
Looking for s in from-outside (domain 12.176.248.3)
list_route: hop: <sip:198.65.166.131;ftag=as194f9a73;lr>
Transmitting (no NAT) to 198.65.166.131:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 
198.65.166.131;branch=z9hG4bK5329.ceb73995.0;received=198.65.166.131
Via: SIP/2.0/UDP 198.65.166.172:5060;branch=z9hG4bK35339844;rport=5060
From: "+12192538181" <sip:+12192538181 at 198.65.166.172>;tag=as194f9a73
To: <sip:19035678181 at 198.65.166.131>
Call-ID: 2b85a0cc6d25ec3f4066936d3368454b at 198.65.166.172
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:s at 192.168.1.193>
Content-Length: 0


---

     -- Executing Wait("SIP/17476691704-1009bea8", "1") in new stack

     -- Executing Answer("SIP/17476691704-1009bea8", "") in new stack

We're at 192.168.1.193 port 18870

Adding codec 0x4 (ulaw) to SDP

Adding non-codec 0x1 (telephone-event) to SDP

Reliably Transmitting (no NAT) to 198.65.166.131:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
198.65.166.131;branch=z9hG4bK5329.ceb73995.0;received=198.65.166.131
Via: SIP/2.0/UDP 198.65.166.172:5060;branch=z9hG4bK35339844;rport=5060
Record-Route: <sip:198.65.166.131;ftag=as194f9a73;lr>
From: "+12192538181" <sip:+12192538181 at 198.65.166.172>;tag=as194f9a73
To: <sip:19035678181 at 198.65.166.131>;tag=as2837b9c5
Call-ID: 2b85a0cc6d25ec3f4066936d3368454b at 198.65.166.172
CSeq: 102 INVITE
User-Agent: Asterisk PBX

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:s at 192.168.1.193>
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 6121 6121 IN IP4 192.168.1.193
s=session
c=IN IP4 192.168.1.193
t=0 0
m=audio 18870 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

---

etc. I answer and the call proceeds normally.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the asterisk-dev mailing list