Kamailio: how to route RTP media directly to endpoint

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Kamailio: how to route RTP media directly to endpoint

wsotest.512

Hi all,

We have usual config Kamailio + Asterisk where Kamailio play as sip and rtp proxy. Kamailio have public IP, asterisk – no. All calls between clients now going like that:

 

UserA ---sip--> Kamailio --> Asterisk --> UserB

           \-rtp--> Kamailio (rtpproxy) --> Asterisk --> UserB

 

All clients of course from Internet and behind Nat. Main problem is amount of traffic going through Kamailio and Asterisk. We need to pay for every additional GB behind limit in tariff plan to hosting provider.

So we decided to try route all rtp traffic between users directly.

 

UserA ---sip--> Kamailio --> Asterisk --> UserB

           \-rtp--> --> --> UserB

 

Is it possible at all? Maybe someone already did it …

 

 

--

BR, Alex

 

 


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Kamailio: how to route RTP media directly to endpoint

Daniel Tryba-2
On Wed, Aug 09, 2017 at 04:48:02PM +0300, wsotest.512 wrote:
>
> UserA ---sip--> Kamailio --> Asterisk --> UserB
>
>            \-rtp--> --> --> UserB
>
> Is it possible at all? Maybe someone already did it .

It should work, but Asterisk is broken in this respect and may break
codecs/dtmf: https://issues.asterisk.org/jira/browse/ASTERISK-25166

The root cause is that Asterisk is initially handling RTP and later
tries to reINVITE both legs with the ip of the rtpengine/userb for
media. If the ids of codecs/dtmf don't match in the m=audio SDP line RTP
will break. There is no way to get Asterisk not to handle initial RTP
and no way to not have Asterisk reINVITE if the ids differ.


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Kamailio: how to route RTP media directly to endpoint

Mojtaba
In reply to this post by wsotest.512
Hi,
It is better if you want route RTP directly between UA, Dont route the
calls to Asterisk, And do this like below:
UAC1---sip---->kamailio--------->UAC2
In asterisk, there is directmedia options for handle RTP.
Be notice you should use STUN in this regards. becuase of type of nats
in clients, you have some challenge.

On Wed, Aug 9, 2017 at 6:18 PM, wsotest.512 <[hidden email]> wrote:

> Hi all,
>
> We have usual config Kamailio + Asterisk where Kamailio play as sip and rtp
> proxy. Kamailio have public IP, asterisk – no. All calls between clients now
> going like that:
>
>
>
> UserA ---sip--> Kamailio --> Asterisk --> UserB
>
>            \-rtp--> Kamailio (rtpproxy) --> Asterisk --> UserB
>
>
>
> All clients of course from Internet and behind Nat. Main problem is amount
> of traffic going through Kamailio and Asterisk. We need to pay for every
> additional GB behind limit in tariff plan to hosting provider.
>
> So we decided to try route all rtp traffic between users directly.
>
>
>
> UserA ---sip--> Kamailio --> Asterisk --> UserB
>
>            \-rtp--> --> --> UserB
>
>
>
> Is it possible at all? Maybe someone already did it …
>
>
>
>
>
> --
>
> BR, Alex
>
>
>
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> [hidden email]
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>



--
--Mojtaba Esfandiari.S

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Loading...