<div dir="ltr">Hello Daniel<div><br></div><div>This is the sample output from our location table;</div><div><br></div><div><div>kamailio=# select username,contact,received,user_agent from location where username='5678*0012';</div><div> username  |             contact             |       received        |     user_agent      </div><div>-----------+---------------------------------+-----------------------+---------------------</div><div> 5678*0012 | sip:5678*<a href="http://0012@192.168.1.21:5090">0012@192.168.1.21:5090</a> | sip:DEVICE_PUBLIC_ADDRESS:5090 | Cisco/SPA504G-7.6.1</div><div>(1 row)</div><div><br></div><div><br></div><div>After calling dlg_bridge Kamailio firing INVITE and rings the device.</div><div>After answering on this device Kamailio firing REFER message.</div><div>But as you can see from ngrep output below, Kamailio is trying to send this message to address in the contact field which is a private IP. </div><div><br></div><div>U 2016/04/27 10:58:25.745935 KAMAILIO_PUBLIC_ADDRESS:5090 -> <a href="http://192.168.1.21:5090">192.168.1.21:5090</a></div><div>REFER sip:5678*<a href="http://0012@192.168.1.21:5090">0012@192.168.1.21:5090</a> SIP/2.0.</div><div>Via: SIP/2.0/UDP KAMAILIO_PUBLIC_ADDRESS:5090;branch=z9hG4bK0ab8.1c5e622e4af6b7b6c9ede7ade4a50bf8.0.</div><div>Via: SIP/2.0/UDP KAMAILIO_PUBLIC_ADDRESS;rport=5060;branch=z9hG4bK0ab8.c8a54413000000000000000000000000.0.</div><div>To: <sip:5678*0012@KAMAILIO_PUBLIC_ADDRESS>;tag=199aaa02310a0799i1.</div><div>From: <sip:click2call@KAMAILIO_PUBLIC_ADDRESS>;tag=0d71401ca91009b00be5953e2813d7e4-7471.</div><div>CSeq: 11 REFER.</div><div>Call-ID: 63dc8c8a5ea88a30-868@KAMAILIO_PUBLIC_ADDRESS.</div><div>Max-Forwards: 69.</div><div>Content-Length: 0.</div><div>User-Agent: Kamailio.</div><div>Referred-By: sip:click2call@KAMAILIO_PUBLIC_ADDRESS.</div><div>Refer-To: sip:5678*0002@KAMAILIO_PUBLIC_ADDRESS.</div><div>Contact: <sip:click2call@KAMAILIO_PUBLIC_ADDRESS:5060>.</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 27, 2016 at 10:47 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>can you send the ngrep trace for such case? I would like to look
      at the headers to understand properly what do you mean.</p>
    <p>Cheers,</p>
    <p>Daniel<br>
    </p><div><div class="h5">
    <br>
    <div>On 26/04/16 15:23, huseyin kalyoncu
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hello
        <div><br>
        </div>
        <div>I am trying to implement click 2 call functionality on
          Kamailio with dlg_bridge.</div>
        <div>But It seems that Kamailio routes REFER messages to devices
          according to Contact field of location table instead of
          Received field. </div>
        <div>But if the the IP in the Contact field is private REFER
          messages are failing so </div>
        <div>does the dlg_bridge.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>I called dlg_bridge in the config like this:</div>
        <div><br>
        </div>
        <div>dlg_bridge(<a>"sip:$param1"</a>, <a>"sip:$param2"</a>,
          <a>"sip:IP_ADDRESS_OF_KAMAILIO:5060"</a>);<br>
        </div>
        <div><br>
        </div>
        <div>It rings the device in $param1 but after answering on that
          device</div>
        <div>Kamailio fails to send REFER if the Contact field for that
          device is Private IP.</div>
        <div>So it fails to initiate a call.</div>
        <div><br>
        </div>
        <div>How can I force Kamailio to use Received field for REFER
          messages instead of Contact field?<br>
        </div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div>Huseyin</div>
        <div><br>
        </div>
        <div> </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, Berlin, May 18-20, 2016 - <a href="http://www.kamailioworld.com" target="_blank">http://www.kamailioworld.com</a></pre>
  </font></span></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>