[Kamailio-Users] Media Bridge tips and hints

Uriel Rozenbaum uriel.rozenbaum at gmail.com
Tue Mar 23 13:56:15 CET 2010


Thanks Klaus, the mhomed did the trick!
I left the cfg file without listen parameter and works fine as well.

On Tue, Mar 23, 2010 at 5:42 AM, Klaus Darilion <
klaus.mailinglists at pernau.at> wrote:

> also set mhomed=1
>
> http://sip-router.org/wiki/cookbooks/core-cookbook/devel#mhomed
>
> regards
> kalus
>
>
> Am 22.03.2010 21:00, schrieb Uriel Rozenbaum:
>
>> Hi gentlemen,
>>
>>
>> I'm having a bit of a hard time developing a bridge for media sessions.
>>
>> I have a box with 2 interfaces; eth0 has the private IP p.r.i.v and eth1
>> has public IP p.u.b.l.
>>
>> When I receive a message in the private IP I try sending the call to a
>> public proxy we have (p.u.b.2) using Carrierroute module but the source
>> IP used is p.r.i.v. It is obvious that p.u.b.2 will not be able to route
>> back messages.
>>
>> #
>> U 192.168.200.11:5060 <http://192.168.200.11:5060> -> p.r.i.v:5060
>>
>> INVITE sip:1568767139 at p.r.i.v SIP/2.0.
>> Via: SIP/2.0/UDP 192.168.200.11:5060;branch=z9hG4bK5d94bc09.
>> From: "60911000" <sip:60911000 at p.r.i.v>;tag=as6d477d46.
>> To: <sip:1568767139 at p.r.i.v>.
>> Contact: <sip:60911000 at 192.168.200.11 <sip%3A60911000 at 192.168.200.11>
>> <mailto:sip%3A60911000 at 192.168.200.11 <sip%253A60911000 at 192.168.200.11>
>> >>.
>>
>> ...
>>
>> #
>> U p.r.i.v:5060 -> p.u.b.2:5060
>> INVITE sip:1568767139 at p.u.b.2 SIP/2.0.
>> Record-Route: <sip:p.r.i.v;lr=on;ftag=as6d477d46>.
>> Via: SIP/2.0/UDP p.r.i.v;branch=z9hG4bKf531.440788e1.0.
>> Via: SIP/2.0/UDP
>> 192.168.200.11:5060
>> ;rport=5060;received=192.168.200.11;branch=z9hG4bK5d94bc09.
>> From: "60911000" <sip:60911000 at p.r.i.v>;tag=as6d477d46.
>> To: <sip:1568767139 at p.r.i.v>.
>> Contact: <sip:60911000 at 192.168.200.11 <sip%3A60911000 at 192.168.200.11>
>> <mailto:sip%3A60911000 at 192.168.200.11 <sip%253A60911000 at 192.168.200.11>
>> >>.
>>
>> ...
>>
>> I try then to set listen=0.0.0.0 so kamailio will be binded to all IPs
>> but then the Route headers and Via use this 0.0.0.0
>>
>> #
>> U 192.168.200.11:5060 <http://192.168.200.11:5060> -> p.r.i.v:5060
>>
>> INVITE sip:1568767139 at p.r.i.v SIP/2.0.
>> Via: SIP/2.0/UDP 192.168.200.11:5060;branch=z9hG4bK14a00df7.
>> From: "60911000" <sip:60911000 at p.r.i.v>;tag=as502405cf.
>> To: <sip:1568767139 at p.r.i.v>.
>> Contact: <sip:60911000 at 192.168.200.11 <sip%3A60911000 at 192.168.200.11>
>> <mailto:sip%3A60911000 at 192.168.200.11 <sip%253A60911000 at 192.168.200.11>
>> >>.
>>
>> ...
>>
>> #
>> U p.u.b.l:5060 -> p.u.b.2:5060
>> INVITE sip:1568767139 at p.u.b.2 SIP/2.0.
>> Record-Route: <sip:0.0.0.0;lr=on;ftag=as502405cf>.
>> Via: SIP/2.0/UDP 0.0.0.0;branch=z9hG4bK711b.8d28549.0.
>> Via: SIP/2.0/UDP
>> 192.168.200.11:5060
>> ;rport=5060;received=192.168.200.11;branch=z9hG4bK14a00df7.
>> From: "60911000" <sip:60911000 at p.r.i.v>;tag=as502405cf.
>> To: <sip:1568767139 at p.r.i.v>.
>> Contact: <sip:60911000 at 192.168.200.11 <sip%3A60911000 at 192.168.200.11>
>> <mailto:sip%3A60911000 at 192.168.200.11 <sip%253A60911000 at 192.168.200.11>
>> >>.
>>
>> ...
>>
>> In this case the destination UA cannot return the call because it does
>> not have a valid IP to do so.
>>
>> Is there any way to make Kamailio act in a different way? Like letting
>> me modify the IP it will use for Via and Record-Route headers. Be aware
>> that I'm supposed to do some kind of mirror for calls coming from
>> outside the network (origin is public and destination is private).
>>
>> I'm sure I'll be asking some more on this same thread as I test.
>>
>> Thanks in advance!
>> Uriel
>>
>>
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20100323/0bf89a8a/attachment.htm>


More information about the Users mailing list