[SR-Users] Fwd: Can Kamailio be used to redirect media between a client that switches from wifi to 3g/gsm

Klaus Darilion klaus.mailinglists at pernau.at
Mon Jun 25 09:33:09 CEST 2012


Within Kamailio there is nothing you can do to trigger a reINVITE. You 
need a B2BUA (e.g. Asterisk) to force a reINVITE, and even then it is 
not sure that the SIP client sends properly updated SDP and contact 
header (I would try this with a manually sent reINVITE).

Further, even if there is no reINVITE, you should still have audio.

How do you handle the media stream? Is it sent directly to Asterisk? Is 
there rtpproxy inbetween? (if yes, then you need the reINVITEs so that 
rtpproxy will accept the new source IP address of the RTP stream (lock-in)).

regards
Klaus

On 22.06.2012 15:58, Shaun Clark wrote:
> Forgot to post the response to the list as well.
>
> Date: Fri, Jun 22, 2012 at 6:57 AM
> Subject: Re: [SR-Users] Can Kamailio be used to redirect media between a
> client that switches from wifi to 3g/gsm
> To: Klaus Darilion <klaus.mailinglists at pernau.at
> <mailto:klaus.mailinglists at pernau.at>>
>
>
> Thanks for the response! I see a series of what I believe are
> re-REGISTER statements:
>
> Message sent: (to dest=75.101.244.XXX:5060)
> REGISTER sip:75.101.244.XXX SIP/2.0
> Via: SIP/2.0/UDP 10.165.27.161:2407;rport;branch=z9hG4bK1839704852
> From: <sip:990XX at 75.101.244.XXX>;tag=1689684502
> To: <sip:990XX at 75.101.244.XXX>
> Call-ID: 1867622191
> CSeq: 1 REGISTER
> Contact: <sip:990XX at 10.165.27.161:2407;line=daeb0d9351eff22>
> Max-Forwards: 70
> User-Agent: Linphone/3.4.0 (eXosip2/unknown)
> Expires: 3600
> Content-Length: 0
>
> Received message:
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP 10.165.27.161:2407;received=32.158.143.61
> <tel:32.158.143.61>;rport=2407;branch=z9hG4bK1839704852
> From: <sip:990XX at 75.101.244.XXX>;tag=1689684502
> To: <sip:990XX at 75.101.244.XXX>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.e10d
> Call-ID: 1867622191
> CSeq: 1 REGISTER
> WWW-Authenticate: Digest realm="75.101.244.XXX",
> nonce="4fe476e500000e00aa8700d49b8c668f4c6f1e6a367f2XXX"
> Server: Kamailio
> Content-Length: 0
>
> REGISTER sip:75.101.244.XXX SIP/2.0
> Via: SIP/2.0/UDP 10.165.27.161:2407;rport;branch=z9hG4bK123406454
> From: <sip:990XX at 75.101.244.XXX>;tag=1689684502
> To: <sip:990XX at 75.101.244.XXX>
> Call-ID: 1867622191
> CSeq: 2 REGISTER
> Contact: <sip:990XX at 10.165.27.161:2407;line=daeb0d9351eff22>
> Authorization: Digest username="990XX", realm="75.101.244.XXX",
> nonce="4fe476e500000e00aa8700d49b8c668f4c6f1e6a367f2XXX",
> uri="sip:75.101.244.XXX", response="1e1d558894f2c05c322c76efbb2f9XXX",
> algorithm=MD5
> Max-Forwards: 70
> User-Agent: Linphone/3.4.0 (eXosip2/unknown)
> Expires: 3600
> Content-Length: 0
>
> Received message:
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 10.165.27.161:2407;received=32.158.143.61
> <tel:32.158.143.61>;rport=2407;branch=z9hG4bK123406454
> From: <sip:990XX at 75.101.244.XXX>;tag=1689684502
> To: <sip:990XX at 75.101.244.XXX>;tag=c97b4d1cb1f3d0da549e06a8d482ef63.8b5a
> Call-ID: 1867622191
> CSeq: 2 REGISTER
> Contact:
> <sip:990XX at 10.165.27.161:2407;line=daeb0d9351eff22>;expires=120,
> <sip:990XX at 50.43.101.83:51879;line=59ecc207f06f4e9>;expires=81
> Server: Kamailio
> Content-Length: 0
>
> But after this I would expect to see an INVITE but one is never sent,
> but if I switch back to the original IP on that device the call is
> reconnected, so it proves we're missing an INVITE I believe. What do I
> need to do on the server side to force a re-INVITE to be sent after this
> registration occurs? Thanks!
>
> On Fri, Jun 22, 2012 at 1:14 AM, Klaus Darilion
> <klaus.mailinglists at pernau.at <mailto:klaus.mailinglists at pernau.at>> wrote:
>
>     Hi Shaun!
>
>     Your problem description is too short to give you any good help.
>
>     Use tcpdump (or other tools) to capture the scenario with Asterisk
>     and Kamailio. Then compare them to find out why it doesn't work.
>
>     Is media sent directly to Asterisk then it ca not be the problem of
>     Kamailio.
>
>     I hope the mobile client is smart enough to also send a reINVITE
>     when getting the new IP address (of the mobile connection) with
>     proper Contact header - otherwise it can not receive SIP requests
>     from Asterisk.
>
>     regards
>     Klaus
>
>
>     On 20.06.2012 18:07, Shaun Clark wrote:
>
>         The use case is that I have a SIP client registered to Kamailio
>         talking
>         to an Asterisk box connected to the PSTN. The client is a mobile
>         phone
>         and the user is connected to wifi. The user then steps out of
>         wifi range
>         and the phone drops the connection and picks up the 3g data
>         connection.
>         I want the media stream to reconnect to the client and the call to
>         resume without having to redial. This works now if the client is
>         directly connected to the Asterisk machine, but not when I am
>         routing
>         through my Kamailio server. How do I go about this, examples are
>         always
>         appreciated, thanks!
>
>
>         _________________________________________________
>         SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
>         mailing list
>         sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>         http://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__users <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
>
>
>
>
>
>
> --
>
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>




More information about the sr-users mailing list