[asterisk-users] Locally bridging channels when using SRTP?

Kevin P. Fleming kpfleming at digium.com
Tue Dec 27 15:13:46 CST 2011


On 12/01/2011 03:48 PM, Jan Blom wrote:
> Hello,
>
> I’m trying to setup an Asterisk (version 1.8.8) to do SRTP termination
> and then send the call on to other servers, unencrypted. All the basics
> work fine.
>
> I want the Asterisk to do as little as possible with the RTP packets and
> no transcoding. We always make sure to force same codec on incoming and
> outgoing call leg.
>
> When not using SRTP, Asterisk does P2P bridging of the RTP packets. That
> is, simply copying the packets, which is the expected result. But when
> we send in SRTP media, Asterisk starts decode/encode voice data instead
> of just do P2P bridging.
>
> I also notice Asterisk doesn’t say “Locally bridging channels” in the
> latter case, which might be the clue that we’re not doing P2P bridging.
>
> Why can we not use P2P bridging when doing SRTP->RTP media conversion?
> Is there anything we can change in the source code to force packet
> bridging in this case?

The payloads of the RTP packets on the either side of the bridge are not 
compatible with each other in this scenario. It's possible that what are 
asking for could be done, but the SRTP code in Asterisk isn't currently 
structured in a way that should allow for it.

However, the CPU cost difference between P2P bridging and core bridging 
is not that great, generally. There is no 'decode/encode' of the voice 
data unless that is required; core bridging just means that the incoming 
RTP packets are broken down and their payloads are copied into internal 
frames before turned back into RTP packets on the way out. There is some 
cost associated with this, but unless you are running a system that is 
right on the edge of falling over due to channel load, it should be 
tolerable.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list