[Home]

Summary:ASTERISK-22564: Local bridge in bridge_native_rtp causes one way audio
Reporter:Jon Westgate (0ryn)Labels:
Date Opened:2013-09-20 15:10:39Date Closed:2013-11-10 19:12:59.000-0600
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Bridges/bridge_native_rtp
Versions:12.0.0-alpha1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:linux_x64 debian with Asterisk SVN-trunk-r399533Attachments:( 0) debug.txt
Description:I note that this has been reported before and was closed as not a bug.
If this is not a bug, what is the correct way to disable native rtp_bridging on a per sip account basis?
It used to be canreinvite=no.

I can observe on 2 systems running asterisk 12/SVN-trunk-r399533 that with directmedia=no set on both sip trunk and sip client that this happens:

{noformat}
– Executing [07974XXXXXX@wide:1] Dial("SIP/202-00000000", "SIP/JON_34XXXX/07974XXXXXX") in new stack
== Using SIP RTP CoS mark 5
– Called SIP/JON_34XXXX/07974XXXXXX
> 0x7f0bdc018480 – Probation passed - setting RTP source address to [2XXX:XX0:0:X0::5060:2]:23569
– SIP/JON_34XXXX-00000001 is ringing
– SIP/JON_34XXXX-00000001 is making progress passing it to SIP/202-00000000
> 0x7f0bdc018480 – Probation passed - setting RTP source address to [2XXX:XX0:0:X0::5060:2]:23569
> 0x7f0bb003b470 – Probation passed - setting RTP source address to 8X.1X7.X85.X34:11794
– SIP/JON_34XXXX-00000001 answered SIP/202-00000000
– Channel SIP/202-00000000 joined 'simple_bridge' basic-bridge <4ff3502f-2411-410e-9f9f-eda20b8b1efb>
– Channel SIP/JON_34XXXX-00000001 joined 'simple_bridge' basic-bridge <4ff3502f-2411-410e-9f9f-eda20b8b1efb>
> Bridge 4ff3502f-2411-410e-9f9f-eda20b8b1efb: switching from simple_bridge technology to native_rtp
– Channel SIP/JON_34XXXX-00000001 left 'native_rtp' basic-bridge <4ff3502f-2411-410e-9f9f-eda20b8b1efb>
– Channel SIP/202-00000000 left 'native_rtp' basic-bridge <4ff3502f-2411-410e-9f9f-eda20b8b1efb>
== Spawn extension (wide, 07974XXXXXX, 1) exited non-zero on 'SIP/202-00000000'
{noformat}

In this case I have a provider who I connect to via IPV6 and my ip-phone is IPV4-only so a remote rtp bridge is never going to work.


My outgoing sip trunk:

{noformat}
[JON_34XXXX]
type=peer
remotesecret=password ; Our password to their service
defaultuser=+44145XXXXXXX ; Authentication user for outbound
host=voiceless.aa.net.uk
canreinvite=no
directmedia=no
{noformat}

The phone's config

{noformat}
[202]
secret=xXxXxXxXxXxX
username=202
mailbox=202
nat=force_rport,comedia
type=friend
context=wide
host=dynamic
canreinvite=no
directmedia=no
disallow=all
allow=ulaw
allow=gsm
allow=alaw
dtmfmode=rfc2833
{noformat}

Note that this not only effects asterisk in its IPV6 <> IPV4 bridging modes but also in IPV4 <> IPV4.
I have a scenario where phones exist on a NAT network and the phone server is straddled between an external IP and the internal network.
This causes all kinds of one way audio and dropped calls after random timings.
Comments:By: Joshua C. Colp (jcolp) 2013-09-20 15:14:07.051-0500

There are two types of RTP bridges possible (both in bridge_native_rtp):

1. Remote

This type of bridge uses reinvites to have the media go directly between two endpoints. The directmedia option controls whether this is possible or not. Since you have this set then it's most likely not being done.

2. Local

A local RTP bridge forwards the RTP packets within the RTP stack itself, which is more efficient than going through the Asterisk core. In scenario this is what should be happening. Despite one side being IPv4 and the other IPv6 this type of bridge should still work fine.

The fact that bridge_native_rtp is still being used here despite you setting directmedia to no is not a bug. The fact you aren't getting two way media is the issue.

By: Jon Westgate (0ryn) 2013-09-20 15:19:50.643-0500

I guess that would explain why it worked one way at all,
I'll do a sip set debug on and rtp set debug on and post that, stand by for a large post / comment

By: Jon Westgate (0ryn) 2013-09-20 15:33:52.756-0500

[Edit by Rusty Newton - Removed inline debug, and attached as debug.txt, [Please read the guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines]]

By: Jon Westgate (0ryn) 2013-09-20 15:42:59.504-0500

I forgot to mention the direction of no audio.
[2001:8b0:0:30::5060:2] => 81.XXX.YYY.34 (no audio)
81.XXX.YYY.34 => [2001:8b0:0:30::5060:2] (working audio)

The test is to call my Cell via my IPV6 trunk.
If I dial out via my trunk to my cellphone I get one way audio.
If I dial in from my cellphone via my trunk I get 2 way audio.
If I compile * without bridge_native_rtp I get 2 way audio when calling in and out.

By: Jon Westgate (0ryn) 2013-09-20 16:00:31.610-0500

I just proved that this works just fine in Asterisk 11.5.1.
I suspect because it does not have bridge_native_rtp.

 == Using SIP RTP CoS mark 5
   -- Executing [07974XXXXXX@wide:1] Dial("SIP/202-00000000", "SIP/JON_348473/07974XXXXXX") in new stack
 == Using SIP RTP CoS mark 5
   -- Called SIP/JON_34XXXX/07974XXXXXX
      > 0x7f6fb0014890 -- Probation passed - setting RTP source address to [2001:8b0:0:30::5060:2]:21329
   -- SIP/JON_34XXXX-00000001 is ringing
   -- SIP/JON_34XXXX-00000001 is making progress passing it to SIP/202-00000000
      > 0x7f6fb0014890 -- Probation passed - setting RTP source address to [2001:8b0:0:30::5060:2]:21329
      > 0x7f6fb8039fb0 -- Probation passed - setting RTP source address to 81.YYY.ZZZ.34:11798
   -- SIP/JON_34XXXX-00000001 answered SIP/202-00000000
   -- Locally bridging SIP/202-00000000 and SIP/JON_34XXXX-00000001
 == Spawn extension (wide, 07974XXXXXX, 1) exited non-zero on 'SIP/202-00000000'

By: Matt Jordan (mjordan) 2013-09-26 14:39:17.277-0500

Can you please attach a full DEBUG log illustrating the issue, along with 'sip set debug' enabled?

As an aside, Asterisk 12 has a completely revamped bridging architecture, so comparisons with Asterisk 11 aren't likely to be very valid. :-)

By: Rusty Newton (rnewton) 2013-10-18 16:00:13.537-0500

@Jon,  Lots of work has happened on 12 since the 20th of Sep. Can you test with the latest SVN revision of 12 and report back, while also including the DEBUG log requested? (That is, be sure the log includes DEBUG messages enabled in logger.conf and turned up either via asterisk.conf or "core set debug 5")

By: Matt Jordan (mjordan) 2013-11-10 19:12:45.963-0600

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines