[Asterisk-Users] Why do calls go silent after 10 minutes

Tony asterisk at spam.t71.org
Sun Apr 10 07:06:25 MST 2005


I am currently having a problem with asterisk 1.0.7 where after exactly 10 
minutes of a call the inbound audio stops. My setup is fairly simple. I have 
a FreeBSD box running asterisk connected to the internet. It has a SIP or 
IAX client talking to it on a private network. The BSD box talks SIP to my 
PSTN gateway operated by a company called astratel.

softphone   <---->  FreeBSD asterisk  <-----> AstraTEL gateway  <------> 
PSTN Phone

The call establishes fine and works well. However, after exactly 600 seconds 
of the call the softphone user is unable to hear anything from PSTN phone 
user. I have verified that the RTP packets continue to flow both ways on the 
wire and I have tracked down the even that occurs at 600 seconds which seems 
to be the problem.

astratel    asterisksrv RTP     Payload type=ITU-T G.723, SSRC=384396275, 
Seq=18370, Time=1385593487
asterisksrv astratel    RTP     Payload type=ITU-T G.723, SSRC=515671647, 
Seq=9435, Time=4799696
astratel    asterisksrv RTP     Payload type=ITU-T G.723, SSRC=384396275, 
Seq=18371, Time=1385593727
asterisksrv astratel    RTP     Payload type=ITU-T G.723, SSRC=515671647, 
Seq=9436, Time=4799936
astratelctl asterisksrv SIP/SDP Request: INVITE 
sip:88888888 at asterisksrv:5060, with session description
asterisksrv astratelctl SIP/SDP Status: 200 OK, with session description
asterisksrv astratel    RTP     Payload type=ITU-T G.723, SSRC=515671647, 
Seq=9437, Time=4800176
astratel    asterisksrv RTP     Payload type=ITU-T G.723, SSRC=1762950467, 
Seq=43847, Time=265690106
astratel    asterisksrv RTCP    Sender Report
asterisksrv astratel    RTP     Payload type=ITU-T G.723, SSRC=515671647, 
Seq=9438, Time=4800416
astratelctl asterisksrv SIP     Request: ACK sip:9999999999 at astratelctl
astratel    asterisksrv RTP     Payload type=ITU-T G.723, SSRC=1762950467, 
Seq=43848, Time=265690346
asterisksrv astratel    RTP     Payload type=ITU-T G.723, SSRC=515671647, 
Seq=9439, Time=4800656
astratel    asterisksrv RTP     Payload type=ITU-T G.723, SSRC=1762950467, 
Seq=43849, Time=265690586
asterisksrv astratel    RTP     Payload type=ITU-T G.723, SSRC=515671647, 
Seq=9440, Time=4800896
astratel    asterisksrv RTP     Payload type=ITU-T G.723, SSRC=1762950467, 
Seq=43850, Time=265690826

asterisksrv = My FreeBSD box running asterisk
astratelctl = astratel sip server
astratel = IP that the RTP data comes from at astratel

A couple of weird things:

1. Even though the call was established from astrisksrv -> astractl the 
invite comes the other way. Is this normal?
2. After the INVITE is sent, the astratel server suddenly changes SSRC, 
Sequence number and Time offset. I believe this is what is stopping the 
audio stream.
3. The ACK that is sent has a "Content-Type: application/SDP" header. This 
confuses asterisk and gives this warning:

WARNING[34979]: chan_sip.c:2645 process_sdp: Insufficient information for 
SDP (m = '', c = '')

I have fixed this error by adding a line to chan_sip.c to also verify the 
Content-Length is not "0".

chan_sip.c, line 7730:
if (!ast_strlen_zero(get_header(req, "Content-Type"))
     && strcasecmp(get_header(req, "Content-Length"), "0")) {      <- added
     if (process_sdp(p, req))
           return -1;
}

My questions are as follows:

1. Is it normal to receive a (re)INVITE from the host that you originally 
called?
2. Where in the code does asterisk check/process SSRC and/or sequence 
numbers if at all?
3. Do the codec's use the Time field in the packet to reassemble the stream? 
Is this why the audio stops? Is this normal for a SIP stream?

Below is the "sip debug"

Sip read:
INVITE sip:88888888 at asterisksrv:5060 SIP/2.0
From: <sip:9999999999 at astratelctl>;tag=901f40a-13c4-4257498c-19278f18-197f
To: "iaxComm User"<sip:88880248 at astratelctl>;tag=as40722ded
Call-ID: 39826dda21fa20b52c795c8053a7ee4f at astratelctl
CSeq: 103 INVITE
Via: SIP/2.0/UDP astratelctl:5060;branch=z9hG4bK-68d22-19974e76-3c66ebf
Via: SIP/2.0/UDP asterisksrv:5060;branch=z9hG4bK148a3978
Contact: <sip:88888888 at asterisksrv>
User-Agent: Asterisk PBX
Date: Sat, 09 Apr 2005 00:23:19 GMT
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER
Content-Type: application/SDP
Content-Length: 142

v=0
o=GW5250-V5 36 0 IN IP4 xxx.xxx.127.13
s=SipCall
c=IN IP4 xxx.xxx.127.13
t=0 0
m=audio 4360 RTP/AVP 18 101
a=rtpmap:18 G729/8000/1

13 headers, 7 lines
Using latest request as basis request
Sending to astratelctl : 5060 (non-NAT)
We're at asterisksrv port 18620
Answering with capability 0x100 (g729)
Answering with non-codec capability 0x1 (telephone-event)
Reliably Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP astratelctl:5060;branch=z9hG4bK-68d22-19974e76-3c66ebf
Via: SIP/2.0/UDP asterisksrv:5060;branch=z9hG4bK148a3978
From: <sip:0733696964 at astratelctl>;tag=901f40a-13c4-4257498c-19278f18-197f
To: "iaxComm User"<sip:88888888 at astratelctl>;tag=as40722ded
Call-ID: 39826dda21fa20b52c795c8053a7ee4f at astratelctl
CSeq: 103 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:88880248 at asterisksrv>
Content-Type: application/sdp
Content-Length: 220

v=0
o=root 34979 34980 IN IP4 xxx.yyy.75.91
s=session
c=IN IP4 xxx.yyy.75.91
t=0 0
m=audio 18620 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

 to zzz.aa.148.162:5060
Sip read:

ACK sip:9999999999 at astratelctl SIP/2.0
From: <sip:9999999999 at astratelctl>;tag=901f40a-13c4-4257498c-19278f18-197f
To: "iaxComm User"<sip:88888888 at astratelctl>;tag=as40722ded
Call-ID: 39826dda21fa20b52c795c8053a7ee4f at astratelctl
CSeq: 103 ACK
Via: SIP/2.0/UDP astratelctl:5060;branch=z9hG4bK-68d22-19974e76-3c66ebf
Via: SIP/2.0/UDP asterisksrv:5060;branch=z9hG4bK148a3978
User-Agent: Asterisk PBX
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER
Contact: <sip:88888888 at asterisksrv>
Content-Type: application/SDP
Content-Length: 0


I have ethereal traces as well.

If someone could please help that would be great.


Tony 




More information about the asterisk-users mailing list