[Home]

Summary:ASTERISK-13242: Asterisk not sending out RTP packets
Reporter:Michel Belleau (malaiwah)Labels:
Date Opened:2008-12-18 11:43:47.000-0600Date Closed:2011-06-07 14:08:15
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) console+rtp+sip.log
( 1) playback-monkeys.log
( 2) tcpdump.log
Description:I have Kamailio with MediaProxy in front of Asterisk running, asterisk does not need/nor have to deal with any nat issues. All it is seeing are public ip addresses (somewhat, because this test environnement runs on amazon ec2).

I'm debugging SIP packets and everything looks fine though, but Asterisk is not sending any RTP packet to my RTP proxy. It is receiving packets fine though. What is stopping Asterisk to send packets to my RTP proxy? Nat=no in my sip.conf

In additionnal informations, you will find the asterisk console with sip debug and rtcp debug. Looking at the SIP headers I would interpret that Asterisk would have to connect to the RTP proxy right away and not wait until a packet comes in.

* Our Sender:
SSRC:          824794298
Sent packets:  0
Lost packets:  0
Jitter:        0
SR-count:      0
RTT:           0.000000

****** ADDITIONAL INFORMATION ******

root@asterisk:/# asterisk -r
Asterisk 1.4.17~dfsg-2ubuntu1, Copyright (C) 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
Connected to Asterisk 1.4.17~dfsg-2ubuntu1 currently running on asterisk (pid = 25367)
asterisk*CLI> sip debug
SIP Debugging enabled
The 'sip debug' command is deprecated and will be removed in a future release. Please use 'sip set debug' instead.
asterisk*CLI> rtcp debug
RTCP Debugging Enabled
asterisk*CLI>
<--- SIP read from 10.254.78.68:5060 --->
INVITE sip:4666@pbx.omnity.biz SIP/2.0
Record-Route: <sip:75.101.235.217;nat=yes;lr=on>
Via: SIP/2.0/UDP 75.101.235.217;branch=z9hG4bK042b.1587ccf.0
Via: SIP/2.0/UDP 192.168.98.178:60540;received=70.82.183.119;branch=z9hG4bKf22f06a7fbee4d60;rport=59866
From: "Poste 600" <sip:demovoipng.600@voip.omnity.biz>;tag=29d6e4281dd34dfc
To: <sip:4666@voip.omnity.biz>
Contact: <sip:demovoipng.600@70.82.183.119:59866;transport=udp>
Supported: replaces, timer, path
Call-ID: 98d053629e13b4e1@192.168.98.178
CSeq: 58592 INVITE
User-Agent: Grandstream GXP2000 1.1.6.44
Max-Forwards: 69
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Content-Type: application/sdp
Content-Length: 360
P-OmnityExtensionId: 56704254
v=0
o=demovoipng.600 8000 8001 IN IP4 70.82.183.119
s=SIP Call
c=IN IP4 70.38.37.121
t=0 0
m=audio 50390 RTP/AVP 0 8 4 18 2 97 9 3
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:9 G722/8000
a=rtpmap:3 GSM/8000
a=ptime:20

<------------->
--- (33 headers 0 lines) ---
Sending to 75.101.235.217 : 5060 (no NAT)
Using INVITE request as basis request - 98d053629e13b4e1@192.168.98.178
Found peer 'omnity-openser'
Looking for 4666 in from-openser (domain pbx.omnity.biz)
list_route: hop: <sip:75.101.235.217;nat=yes;lr=on>

<--- Transmitting (no NAT) to 75.101.235.217:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 75.101.235.217;branch=z9hG4bK042b.1587ccf.0;received=10.254.78.68
Via: SIP/2.0/UDP 192.168.98.178:60540;received=70.82.183.119;branch=z9hG4bKf22f06a7fbee4d60;rport=59866
Record-Route: <sip:75.101.235.217;nat=yes;lr=on>
From: "Poste 600" <sip:demovoipng.600@voip.omnity.biz>;tag=29d6e4281dd34dfc
To: <sip:4666@voip.omnity.biz>
Call-ID: 98d053629e13b4e1@192.168.98.178
CSeq: 58592 INVITE
User-Agent: OmniVOIP-1.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:4666@75.101.246.15>
Content-Length: 0


<------------>
Audio is at 75.101.246.15 port 14070
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 75.101.235.217:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 75.101.235.217;branch=z9hG4bK042b.1587ccf.0;received=10.254.78.68
Via: SIP/2.0/UDP 192.168.98.178:60540;received=70.82.183.119;branch=z9hG4bKf22f06a7fbee4d60;rport=59866
Record-Route: <sip:75.101.235.217;nat=yes;lr=on>
From: "Poste 600" <sip:demovoipng.600@voip.omnity.biz>;tag=29d6e4281dd34dfc
To: <sip:4666@voip.omnity.biz>;tag=as5232565c
Call-ID: 98d053629e13b4e1@192.168.98.178
CSeq: 58592 INVITE
User-Agent: OmniVOIP-1.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:4666@75.101.246.15>
Content-Type: application/sdp
Content-Length: 242

v=0
o=root 25367 25367 IN IP4 75.101.246.15
s=session
c=IN IP4 75.101.246.15
t=0 0
m=audio 14070 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
asterisk*CLI>
<--- SIP read from 10.254.78.68:5060 --->
ACK sip:4666@pbx.omnity.biz SIP/2.0
Record-Route: <sip:75.101.235.217;nat=yes;lr=on>
Via: SIP/2.0/UDP 75.101.235.217;branch=z9hG4bK042b.1587ccf.2
Via: SIP/2.0/UDP 192.168.98.178:60540;received=70.82.183.119;branch=z9hG4bK4a2f24f768f720bb;rport=59866
From: "Poste 600" <sip:demovoipng.600@voip.omnity.biz>;tag=29d6e4281dd34dfc
To: <sip:4666@voip.omnity.biz>;tag=as5232565c
Contact: <sip:demovoipng.600@70.82.183.119:59866;transport=udp>
Supported: path
Proxy-Authorization: Digest username="demovoipng.600", realm="voip.omnity.biz", algorithm=MD5, uri="sip:4666@voip.omnity.biz", nonce="494a89cb0000000742142f025759b5d289674e037bc075a7", response="f1ea0f182eb1b2d3a1a77f3a8c59f0d3"
Call-ID: 98d053629e13b4e1@192.168.98.178
CSeq: 58592 ACK
User-Agent: Grandstream GXP2000 1.1.6.44
Max-Forwards: 69
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Content-Length: 0


<------------->
--- (15 headers 0 lines) ---
asterisk*CLI>
<--- SIP read from 10.254.78.68:5060 --->
BYE sip:4666@pbx.omnity.biz SIP/2.0
Record-Route: <sip:75.101.235.217;nat=yes;lr=on>
Via: SIP/2.0/UDP 75.101.235.217;branch=z9hG4bK142b.8475d014.0
Via: SIP/2.0/UDP 192.168.98.178:60540;received=70.82.183.119;branch=z9hG4bK8d67010a0e6c76db;rport=59866
From: "Poste 600" <sip:demovoipng.600@voip.omnity.biz>;tag=29d6e4281dd34dfc
To: <sip:4666@voip.omnity.biz>;tag=as5232565c
Supported: path
Proxy-Authorization: Digest username="demovoipng.600", realm="voip.omnity.biz", algorithm=MD5, uri="sip:4666@75.101.246.15", nonce="494a89cb0000000742142f025759b5d289674e037bc075a7", response="9b72d3f6f57987eebe79439960bf5dd6"
Call-ID: 98d053629e13b4e1@192.168.98.178
CSeq: 58593 BYE
User-Agent: Grandstream GXP2000 1.1.6.44
Max-Forwards: 69
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Content-Length: 0


<------------->
--- (14 headers 0 lines) ---
Sending to 75.101.235.217 : 5060 (no NAT)

<--- Transmitting (no NAT) to 75.101.235.217:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 75.101.235.217;branch=z9hG4bK142b.8475d014.0;received=10.254.78.68
Via: SIP/2.0/UDP 192.168.98.178:60540;received=70.82.183.119;branch=z9hG4bK8d67010a0e6c76db;rport=59866
Record-Route: <sip:75.101.235.217;nat=yes;lr=on>
From: "Poste 600" <sip:demovoipng.600@voip.omnity.biz>;tag=29d6e4281dd34dfc
To: <sip:4666@voip.omnity.biz>;tag=as5232565c
Call-ID: 98d053629e13b4e1@192.168.98.178
CSeq: 58593 BYE
User-Agent: OmniVOIP-1.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:4666@75.101.246.15>
Content-Length: 0


<------------>
Really destroying SIP dialog '98d053629e13b4e1@192.168.98.178' Method: BYE
 RTP-stats
* Our Receiver:
 SSRC:          2124644094
 Received packets: 2028
 Lost packets:  0
 Jitter:                0.0035
 Transit:               0.0100
 RR-count:      0
* Our Sender:
 SSRC:          824794298
 Sent packets:  0
 Lost packets:  0
 Jitter:                0
 SR-count:      0
 RTT:           0.000000
asterisk*CLI> quit
root@asterisk:/#
Comments:By: Joshua C. Colp (jcolp) 2008-12-18 12:13:51.000-0600

You need to try the latest version of 1.4 and attach the console output, sip debug, and rtp debug as attachments. Knowing the IP addresses of the various things involved would also help piece this together.

By: Michel Belleau (malaiwah) 2008-12-18 12:25:23.000-0600

I will, right away.

By: Joshua C. Colp (jcolp) 2008-12-18 12:49:32.000-0600

Do you have a Zaptel timing source? A card perhaps that is not configured or using ztdummy?

By: Michel Belleau (malaiwah) 2008-12-18 12:50:45.000-0600

GXP-2000 (fw 1.1.6.44) = 192.168.98.178 natted as 192.168.178.170 (other nat) publically as 70.82.183.119
OpenSER server 1.4.3-tls (ec2) = 75.101.235.217
Asterisk server 1.4.23-rc3 (ec2) = 75.101.246.15
MediaProxy server (newborn) = 70.38.37.121

Please see file attachements as requested.
I also included a tcpdump from the point of view of the media proxy.

I would have thought that Asterisk would send packets to the specified IP and port (70.38.37.121:50394) but it sends nothing.

By: Michel Belleau (malaiwah) 2008-12-18 12:53:16.000-0600

I don't have a timing source available on this test asterisk server, but the problem exists even if I try a simple playback instead of music-on-hold.

By: Michel Belleau (malaiwah) 2008-12-18 12:54:43.000-0600

I uploaded a new console+rtp+sip log without musiconhold; just using a simple playback command (tt-monkeys)

By: Joshua C. Colp (jcolp) 2008-12-18 12:54:59.000-0600

Both of those would try to use a Zaptel timing source if available. If it was not configured it would cause this *exact* issue. Do you have the modules loaded?

By: Michel Belleau (malaiwah) 2008-12-18 12:55:58.000-0600

I thought that a Zaptel timing source would be needed ONLY for conferencing (meetme) and music on hold ?

By: Joshua C. Colp (jcolp) 2008-12-18 12:58:04.000-0600

It is not needed, but it is used if available. If the timing source is not actually working then this is what happens.

By: Michel Belleau (malaiwah) 2008-12-18 13:03:39.000-0600

from dmesg:

{{{
Zapata Telephony Interface Registered on major 196
Zaptel Version: 1.4.10
Zaptel Echo Canceller: MG2
ztdummy: RTC rate is 1024
root@asterisk:/usr/src/asterisk-1.4.23-rc3#
}}}

lsmod:

{{{
root@asterisk:/usr/src/asterisk-1.4.23-rc3# lsmod | grep zt
ztdummy                 9128  0
zaptel                192132  1 ztdummy
}}}

But Asterisk fails to start now:

{{{
root@asterisk:/usr/src/asterisk-1.4.23-rc3# asterisk -vvvvdddddddvgc
Asterisk 1.4.23-rc3, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
 == Parsing '/etc/asterisk/asterisk.conf': Parsing /etc/asterisk/asterisk.conf
Found
 == Parsing '/etc/asterisk/extconfig.conf': Parsing /etc/asterisk/extconfig.conf
Found
 == Parsing '/etc/asterisk/logger.conf': Parsing /etc/asterisk/logger.conf
Found
Asterisk Event Logger Started /var/log/asterisk/event_log
[Dec 18 19:02:51] ERROR[6865]: asterisk.c:3058 main: Asterisk has detected a problem with your Zaptel configuration and will shutdown for your protection.  You have options:
       1. You only have to compile Zaptel support into Asterisk if you need it.  One option is to recompile without Zaptel support.
       2. You only have to load Zaptel drivers if you want to take advantage of Zaptel services.  One option is to unload zaptel modules if you don't need them.
       3. If you need Zaptel services, you must correctly configure Zaptel.
root@asterisk:/usr/src/asterisk-1.4.23-rc3#
}}}

"is used if available"; what if I take step #1 and compile without zaptel support?

By: Joshua C. Colp (jcolp) 2008-12-18 13:08:57.000-0600

This is an issue with the timing source being used with your system that ztdummy is using. You can overcome this issue by unloading ztdummy from the system. There is an issue, 13930, that talks about it not working on some systems. I would suggest you follow it there.