<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    are you sure you got the sip reply for the request?<br>
    <br>
    Apart of cseq number, all the other tokens are different, including
    the via branch. Kamailio doesn't generate any callid or from-tag
    when using sl_send_reply() or options_reply(), it reuses the ones
    from request.<br>
    <br>
    if you still think it is the case of an issues, try:<br>
    <br>
    - add xlog() before sending the reply printing the call-id, from-tag
    via header and cseq header<br>
    - grab the pcap capture of such case<br>
    <br>
    Send the syslog messages and the pcap file here on mailing list so
    we can analyze.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 10/08/15 10:41, Jean-Marie Baran
      wrote:<br>
    </div>
    <blockquote cite="mid:55C863B3.7010104@ama.bzh" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      Hi,<br>
      <br>
      I am trying to get Kamailio working with a third party SIP
      provider. This provider pings Kamailio with OPTIONS messages, but
      Kamailio does not answer correctly: the Call-ID and the tags
      change where they should not. Here is an example:<br>
      <br>
      Third party SIP server:<br>
      <br>
      OPTIONS <a class="moz-txt-link-freetext" href="sip:false.sip.provider:5060">sip:false.sip.provider:5060</a> SIP/2.0<br>
      Via: SIP/2.0/UDP 197.17.144.4:5060;branch=z9hG4bK8e45ac1463a<br>
      From: <a class="moz-txt-link-rfc2396E" href="sip:197.17.144.4"><sip:197.17.144.4></a>;tag=1669836943<br>
      To: <a class="moz-txt-link-rfc2396E" href="sip:false.sip.provider"><sip:false.sip.provider></a><br>
      Date: Fri, 07 Aug 2015 12:34:37 GMT<br>
      Call-ID: <a moz-do-not-send="true"
        class="moz-txt-link-abbreviated"
        href="mailto:a012e080-5c41a5ce-8e5-38512c6@197.17.144.4">a012e080-5c41a5ce-8e5-38512c6@197.17.144.4</a><br>
      User-Agent: Cisco-CUCM10.5<br>
      CSeq: 101 OPTIONS<br>
      Contact: <a class="moz-txt-link-rfc2396E" href="sip:197.17.144.4:5060"><sip:197.17.144.4:5060></a><br>
      Max-Forwards: 0<br>
      Content-Length: 0<br>
      <br>
      Kamailio's answer:<br>
      <br>
      SIP/2.0 200 OK<br>
      Via: SIP/2.0/UDP
      197.17.144.4:5060;branch=z9hG4bK93e5f072f5f;received=174.37.217.1<br>
      From: <a class="moz-txt-link-rfc2396E" href="sip:197.17.144.4"><sip:197.17.144.4></a>;tag=298911055<br>
      To:
      <a class="moz-txt-link-rfc2396E" href="sip:false.sip.provider"><sip:false.sip.provider></a>;tag=b27e1a1d33761e85846fc98f5f3a7e58.8c24<br>
      Call-ID: <a moz-do-not-send="true"
        class="moz-txt-link-abbreviated"
        href="mailto:2defcb00-5c41aa17-93f-38512c6@197.17.144.4">2defcb00-5c41aa17-93f-38512c6@197.17.144.4</a><br>
      CSeq: 101 OPTIONS<br>
      Server: kamailio (4.3.1 (x86_64/linux))<br>
      Content-Length: 0<br>
      <br>
      You can see that the Call-ID change from
      "a012e080-5c41a5ce-8e5-38512c6" to
      "2defcb00-5c41aa17-93f-38512c6". Likewise, the From tag change
      ("1669836943" to "298911055"). What could be the reason for this ?<br>
      Moreover I think Kamailio should add the field Allow (with
      INVITE,ACK,BYE,CANCEL,INFO,OPTIONS,REFER,SUBSCRIBE,NOTIFY), but it
      does not.<br>
      <br>
      I should mention that I had to modify <i>kamailio.cfg</i> to have
      Kamailio answer to OPTIONS messages (I added <b>the code in bold</b>):<br>
      <br>
      if (<b>!is_method("OPTIONS") && </b>!mf_process_maxfwd_header("10"))

      {<br>
              sl_send_reply("483","Too Many Hops");<br>
              exit;<br>
      }<br>
      <br>
      if(is_method("OPTIONS") && uri==myself &&
      $rU==$null) {<br>
              <b>#</b> sl_send_reply("200","Keepalive");<br>
              <b>options_reply();</b><br>
              exit;<br>
      }<br>
      <br>
      Maybe this hack replaces an expected behavior that I failed to
      see/configure ?<br>
      <br>
      Thanks,<br>
      Jean-Marie.<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>