[asterisk-users] RTP over TCP

Nathan Clemons nathan at livemocha.com
Fri Apr 23 14:40:09 CDT 2010


SIP is just the control protocol, and can be negotiated over TCP or UDP. The
actual payload is done over RTP, which is a UDP-based protocol.

If you had to add firewall exceptions/PAT config for the TCP SIP traffic,
you'll also need to add the same for RTP traffic as well.

-- Nathan Clemons


On Fri, Apr 23, 2010 at 12:21 PM, <adamk at 3a.hu> wrote:

> Hi List,
>
> i have to put an * between two other SIP gateways and due to some
> circumstances, i have to use sip over tcp.  With 1.6.2.6 this is working
> fine: sip gw A (deverto4) sends the call, i hand it over to sip gw B
> (ocs) and that's about it.  In the other direction however (ocs -> me ->
> deverto4) the call setup is complete but there is no audio.
>
> I can see the audio in the form of tcpdump, but neither party hears the
> other side.  Tcpdump also shows that while the call setup is via tcp,
> the audio is transmitted via udp.  I'm guessing this is the reason of
> silence.  The first setup is working because one of the gateways are
> supporting sip over tcp only and * accepts both.
>
> my setup is pretty simple as * is only handing calls over to the
> gateways.  Relevant parts are below.
>
> could anyone please confirm that it is an error, that asterisk sends the
> RTP stream via udp and this is the cause of the silence?  Is there any
> way to tell asterisk to use tcp only?  I'm aware of the drawbacks, but i
> still need to get this working.
>
> I'd appreciate any help.
>
> thanks
> adam
>
>
> sip.conf:
>
> tcpenable=yes
> tcpbindaddr=0.0.0.0
>
> [ocs]
> type=friend
> host=192.168.1.1
> context=ocs
> qualify=yes
> transport=tcp
> nat=no
> canreinvite=no
> disallow=all
> allow=alaw
> allow=ulaw
>
> [deverto4]
> type=friend
> host=172.18.200.4
> context=deverto
> qualify=yes
> nat=no
> canreinvite=yes
> transport=tcp
> disallow=all
> allow=alaw
> allow=ulaw
>
> and the extensions.conf:
>
> [deverto]
> exten => _X.,1,Dial(SIP/${EXTEN}@ocs)
> exten => _+X.,1,Dial(SIP/${EXTEN}@ocs)
>
> [ocs]
> exten => _X.,1,Dial(SIP/${EXTEN}@deverto4)
> exten => _+X.,1,Dial(SIP/${EXTEN}@deverto4)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100423/3660a9d9/attachment.htm 


More information about the asterisk-users mailing list