[sr-dev] [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[sr-dev] [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3

Description

When kamailio need to pass call from carrier to customer VoIP PBX in docker container on swarm cluster then it not possible.
Network interconnection.
In docker environment eth1 NIC of kamailio and VoIP PBX connected to internet via iptables masquerading. eth1 NIC of kamailio and VoIP PBX have random IP address and generally no way to pass message between kamailio and VoIP PBX via eth1 NIC.
Also both containers have eth0 NIC in same network with static IP. But network on eth0 NIC not connected to Internet.

SIP signaling is passed like
eth1-Kamailio-eth0 <-> eth0-VoIP PBX

In this network kamailio add/removes two Record-Route. For ACK message with two Route headers this rule does not work. Each Route headers for same kamailio instance and must be translated by one loose_route call

The proxy will inspect the URI in the topmost Route header
          field value.  If it indicates this proxy, the proxy removes it
          from the Route header field (this route node has been
          reached).

Really Route headers translated separately and second loose_route cannot be completed. Details in details.txt
details.txt

Wireshark pcap file and kamailio log with enabled debug attached of similar calls is attached.
full-call.zip

Reproduction

Create config when kamailio add two Record-Route headers and send ACK with two Route headers


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3

The pcap has only one side of the call. We need incoming as well as outgoing traffic (what is received by kamailio and what is sent out). Tell also what are the IPs on which Kamailio is listening in order to match then with the headers.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@miconda in #1215: The pcap has only one side of the call. We need incoming as well as outgoing traffic (what is received by kamailio and what is sent out). Tell also what are the IPs on which Kamailio is listening in order to match then with the headers."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-322112998"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

Hello Daniel
Kamailio listend IP:

  1. eth1 - 172.18.0.7 advertised as 199.180.30.245;
  2. eth0 - 10.0.9.21;

VoIP PBX have IP address 10.0.9.19
http://prntscr.com/g87p2a


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@sergey-safarov in #1215: Hello Daniel\r\nKamailio listend IP:\r\n1) eth1 - 172.18.0.7 advertised as 199.180.30.245;\r\n2) eth0 - 10.0.9.21;\r\n\r\nVoIP PBX have IP address 10.0.9.19\r\nhttp://prntscr.com/g87p2a\r\n"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-322126093"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

according this code here and here second Route is removed if second present in same header.
But second Route may be present in other header as in example. And second Route of same kamailio host is not removed


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@sergey-safarov in #1215: according this code [here](https://github.com/kamailio/kamailio/blob/master/src/modules/rr/loose.c#L607-L625) and [here](https://github.com/kamailio/kamailio/blob/master/src/modules/rr/loose.c#L798-L818) second `Route` is removed if second present in same header.\r\nBut second `Route` may be present in other header as in example. And second `Route` of same kamailio host is not removed"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-322514253"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

@sergey-safarov I need the pcap file so I investigate it here. A wireshark screenshot is not that useful.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@miconda in #1215: @sergey-safarov I need the pcap file so I investigate it here. A wireshark screenshot is not that useful."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-322531135"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

Daniel pcap in file full-call.zip.
This file also contains kamailio log


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@sergey-safarov in #1215: Daniel pcap in file full-call.zip.\r\nThis file also contains kamailio log"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-322570724"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

If you refer the zip from first comment, that has only one side of the call.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@miconda in #1215: If you refer the zip from first comment, that has only one side of the call."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-322572448"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

Not understand

  1. packet 1 - kamailio received INVITE from carrier
  2. packet 3 - kamailio send this INVITE to PBX
  3. packet 5 - kamailio received from PBX ringing message
  4. packet 6 - kamailio send this Ringing message to carrier

At PBX call is answered by IVR, bleg SIP device does not exists.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@sergey-safarov in #1215: Not understand\r\n1) packet 1 - kamailio received INVITE from carrier\r\n2) packet 3 - kamailio send this INVITE to PBX\r\n3) packet 5 - kamailio received from PBX ringing message\r\n4) packet 6 - kamailio send this Ringing message to carrier\r\n\r\nAt PBX call is answered by IVR, bleg SIP device does not exists."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-322593157"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

For what so ever reason, the sngrep does not show all the packets, using a bare ngrep shows more.

Anyhow, the problem is the caller device or the proxy/alg in between.

By RFC, the R-URI in ACK (and the other requests within dialog) has to be the URI from the Contact of 200ok. But there is the address of kamailio, making everything look like a strict routing and actually breaking the sip routing.

If you cannot fix the problem in the callee side, then you can try to fix it in kamailio, one option is to use htable to store the contact uri from 200ok and set it into ACK/re-INVITE/BYE/etc. before doing loose_route().

Overall, this is not an issue with kamailio code. If you need further assistance to do a fix via kamailio.cfg, the place to discuss is [hidden email]


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@miconda in #1215: For what so ever reason, the sngrep does not show all the packets, using a bare ngrep shows more.\r\n\r\nAnyhow, the problem is the caller device or the proxy/alg in between.\r\n\r\nBy RFC, the R-URI in ACK (and the other requests within dialog) has to be the URI from the Contact of 200ok. But there is the address of kamailio, making everything look like a strict routing and actually breaking the sip routing.\r\n\r\nIf you cannot fix the problem in the callee side, then you can try to fix it in kamailio, one option is to use htable to store the contact uri from 200ok and set it into ACK/re-INVITE/BYE/etc. before doing loose_route().\r\n\r\nOverall, this is not an issue with kamailio code. If you need further assistance to do a fix via kamailio.cfg, the place to discuss is sr-users@lists.kamailio.cfg"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-322803247"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

Closed #1215.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Closed #1215."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#event-1208483297"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

Thank you vary math Daniel @miconda
Using your table recommendation calls now goes correct.
Respect.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@sergey-safarov in #1215: Thank you vary math Daniel @miconda \r\nUsing your table recommendation calls now goes correct.\r\nRespect."}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-323102174"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Reply | Threaded
Open this post in threaded view
|

Re: [kamailio/kamailio] loose route cannot be completed when kamailio inserts two Record-Route headers (#1215)

Daniel-Constantin Mierla-3
In reply to this post by Daniel-Constantin Mierla-3

Related description


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@sergey-safarov in #1215: Related [description](https://lists.kamailio.org/pipermail/sr-users/2013-August/079386.html)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1215#issuecomment-348866268"}}}</script>
_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev