Discussion:
[SR-Users] Routing for case of client's changing networks
Dmytro Bogovych
2014-08-11 11:10:01 UTC
Permalink
Greetings all.
I have following use case:

0) Peer A and B registers on kamailio via TLS.
1) Peer A establishes call to peer B.
2) Peer A changes network and call has to be refreshed. Peer A reregisters,
gathers ICE candidates, builds reINVITE and sends it to B. After peer A
changes network again, reregisters and waits for answer from old reINVITE.
3) Peer B receives reINVITE and sends answer.

The problem is this answer never gets to peer B. Kamailio cannot route
answer as old TLS connection is closed and new one did not established
before reregistering.

Is there way to solve or avoid this situation?

Thank you :)
Daniel-Constantin Mierla
2014-08-11 12:17:09 UTC
Permalink
The SIP reply is routed based on the address in the VIA header. The
address in VIA is set by each node sending a request, if between the
request and the response the sender is no longer available at the
address it added as VIA, then it is little one can do for that.

You can try not sending the 100 trying, so the sender does
retransmissions. Also, maybe the sender should send a new re-invite as
it changes to a new network again.

Cheers,
Daniel
Post by Dmytro Bogovych
Greetings all.
0) Peer A and B registers on kamailio via TLS.
1) Peer A establishes call to peer B.
2) Peer A changes network and call has to be refreshed. Peer A
reregisters, gathers ICE candidates, builds reINVITE and sends it to
B. After peer A changes network again, reregisters and waits for
answer from old reINVITE.
3) Peer B receives reINVITE and sends answer.
The problem is this answer never gets to peer B. Kamailio cannot
route answer as old TLS connection is closed and new one did not
established before reregistering.
Is there way to solve or avoid this situation?
Thank you :)
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
Dmytro Bogovych
2014-08-11 13:18:59 UTC
Permalink
You can try not sending the 100 trying, so the sender does retransmissions
Sender did not receive 100 answer; anyway it did not retransmit. It is
based on resiprocate.
maybe the sender should send a new re-invite as it changes to a new
network again.
Is it legal in SIP? I ask because such attempt violates resiprocate's
invite session state machine rules; resiprocate will throw exception.
The SIP reply is routed based on the address in the VIA header. The
address in VIA is set by each node sending a request, if between the
request and the response the sender is no longer available at the address
it added as VIA, then it is little one can do for that.
You can try not sending the 100 trying, so the sender does
retransmissions. Also, maybe the sender should send a new re-invite as it
changes to a new network again.
Cheers,
Daniel
Greetings all.
0) Peer A and B registers on kamailio via TLS.
1) Peer A establishes call to peer B.
2) Peer A changes network and call has to be refreshed. Peer A
reregisters, gathers ICE candidates, builds reINVITE and sends it to B.
After peer A changes network again, reregisters and waits for answer from
old reINVITE.
3) Peer B receives reINVITE and sends answer.
The problem is this answer never gets to peer B. Kamailio cannot route
answer as old TLS connection is closed and new one did not established
before reregistering.
Is there way to solve or avoid this situation?
Thank you :)
_______________________________________________
--
Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin Mierla
2014-08-11 13:47:38 UTC
Permalink
Post by Dmytro Bogovych
You can try not sending the 100 trying, so the sender does retransmissions
Sender did not receive 100 answer; anyway it did not retransmit. It is
based on resiprocate.
Ahh, right, for tls the reliability of transmission is given by
transport layer. So no much to try on this option.
Post by Dmytro Bogovych
maybe the sender should send a new re-invite as it changes to a new
network again.
Is it legal in SIP? I ask because such attempt violates resiprocate's
invite session state machine rules; resiprocate will throw exception.
I see no problem from sip point of view -- each party can send
re-invites as they have something new to negotiate.

Cheers,
Daniel
Post by Dmytro Bogovych
On Mon, Aug 11, 2014 at 3:17 PM, Daniel-Constantin Mierla
The SIP reply is routed based on the address in the VIA header.
The address in VIA is set by each node sending a request, if
between the request and the response the sender is no longer
available at the address it added as VIA, then it is little one
can do for that.
You can try not sending the 100 trying, so the sender does
retransmissions. Also, maybe the sender should send a new
re-invite as it changes to a new network again.
Cheers,
Daniel
Greetings all.
0) Peer A and B registers on kamailio via TLS.
1) Peer A establishes call to peer B.
2) Peer A changes network and call has to be refreshed. Peer A
reregisters, gathers ICE candidates, builds reINVITE and sends it
to B. After peer A changes network again, reregisters and waits
for answer from old reINVITE.
3) Peer B receives reINVITE and sends answer.
The problem is this answer never gets to peer B. Kamailio cannot
route answer as old TLS connection is closed and new one did not
established before reregistering.
Is there way to solve or avoid this situation?
Thank you :)
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 -http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
Dmytro Bogovych
2014-08-11 14:00:30 UTC
Permalink
I see no problem from sip point of view -- each party can send re-invites
as they have something new to negotiate.

Will try to patch resiprocate :)
Thanks for your help !
Post by Daniel-Constantin Mierla
You can try not sending the 100 trying, so the sender does
retransmissions
Sender did not receive 100 answer; anyway it did not retransmit. It is
based on resiprocate.
Ahh, right, for tls the reliability of transmission is given by transport
layer. So no much to try on this option.
Post by Daniel-Constantin Mierla
maybe the sender should send a new re-invite as it changes to a new
network again.
Is it legal in SIP? I ask because such attempt violates resiprocate's
invite session state machine rules; resiprocate will throw exception.
I see no problem from sip point of view -- each party can send re-invites
as they have something new to negotiate.
Cheers,
Daniel
On Mon, Aug 11, 2014 at 3:17 PM, Daniel-Constantin Mierla <
Post by Daniel-Constantin Mierla
The SIP reply is routed based on the address in the VIA header. The
address in VIA is set by each node sending a request, if between the
request and the response the sender is no longer available at the address
it added as VIA, then it is little one can do for that.
You can try not sending the 100 trying, so the sender does
retransmissions. Also, maybe the sender should send a new re-invite as it
changes to a new network again.
Cheers,
Daniel
Greetings all.
0) Peer A and B registers on kamailio via TLS.
1) Peer A establishes call to peer B.
2) Peer A changes network and call has to be refreshed. Peer A
reregisters, gathers ICE candidates, builds reINVITE and sends it to B.
After peer A changes network again, reregisters and waits for answer from
old reINVITE.
3) Peer B receives reINVITE and sends answer.
The problem is this answer never gets to peer B. Kamailio cannot route
answer as old TLS connection is closed and new one did not established
before reregistering.
Is there way to solve or avoid this situation?
Thank you :)
_______________________________________________
--
Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
Loading...