[asterisk-dev] [Code Review] Send udptl packets directly between both call legs without extrac them
Mark Michelson
reviewboard at asterisk.org
Wed Feb 8 12:06:00 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1716/#review5434
-----------------------------------------------------------
This approach is not going to work for a few reasons:
1. This change assumes that both channels are SIP channels. Besides the fact that the assumption is made in a dangerous way, H.323 and Skinny also support UDPTL and would not see the benefits of this change.
2. This change places bridging logic into a read callback. Having the reading channel peek across the bridge to get the other channel's private data should be avoided if at all possible.
3. This change does not do any sort of compatibility checks between the bridged channels.
I did some digging in the Asterisk trunk code and found that there is an ast_udptl_bridge() function already defined in udptl.c. It appears to do what the goal of this patch is, plus it adds necessary checks for compatibility and other possible reasons why the bridge might fail. The problem is that there is no code that actually uses ast_udptl_bridge() in Asterisk trunk. I think the proper approach to this change is to add appropriate calls to ast_udptl_bridge() where they should go. I think the way to go is to change the .bridge callbacks in UDPTL-capable channel drivers to point to a bridge function which can then call into ast_rtp_instance_bridge() or into ast_udptl_bridge() depending on the type of media being bridged.
- Mark
On Feb. 8, 2012, 9:43 a.m., vrban wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1716/
> -----------------------------------------------------------
>
> (Updated Feb. 8, 2012, 9:43 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> New feature to send udptl packets directly between both call legs without extrac them. Like p2p for RTP.
>
>
> Diffs
> -----
>
> trunk/channels/chan_sip.c 354394
> trunk/channels/sip/include/sip.h 354394
> trunk/include/asterisk/udptl.h 354394
> trunk/main/udptl.c 354394
>
> Diff: https://reviewboard.asterisk.org/r/1716/diff
>
>
> Testing
> -------
>
> Send a T.38 fax across two SIP channels. And the incoming udptl packets from first call leg where forwarded to the T.38 target at the second call leg and fax was received.
>
> SIP Carrier -> T.38 -> asterisk with this new feature -> T.38 -> asterisk 1.8 with res_fax
>
>
> Thanks,
>
> vrban
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120208/d97c723a/attachment.htm>
More information about the asterisk-dev
mailing list