<div dir="ltr"><div><div>Hi Daniel,<br><br></div>I have enabled kamailio debug=3 and i can see the next hop of sip OPTION before it enter in event_route[tm:local-request], in this event route i'm changing the $du variable on the script but OPTION still going to address configured on dispatcher list instead of the address set on $du, and I can't see any reference to next hop on kamailio log after change $du.<br></div><br>Kamailio log:<br><div><br>2016-06-20 14:08:48.030  DEBUG: dispatcher [dispatch.c:2871]: ds_check_timer(): probing set #7, URI sip:<a href="http://10.112.185.126:5090">10.112.185.126:5090</a><br>2016-06-20 14:08:48.030  DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=<sip:<a href="http://10.112.185.126:5090">10.112.185.126:5090</a>><br>2016-06-20 14:08:48.031  DEBUG: <core> [resolve.c:1208]: srv_sip_resolvehost(): <a href="http://10.112.185.126:5090">10.112.185.126:5090</a> proto=0<br>2016-06-20 14:08:48.031  DEBUG: <core> [resolve.c:1329]: srv_sip_resolvehost(): returning 0xa121a0 (<a href="http://10.112.185.126:5090">10.112.185.126:5090</a> proto=1)<br>2016-06-20 14:08:48.031  DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 37827<br>2016-06-20 14:08:48.031  DEBUG: tm [uac.c:351]: t_uac_prepare(): executing event_route[tm:local-request]<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:608]: parse_msg(): SIP Request:<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:610]: parse_msg():  method:  <OPTIONS><br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:612]: parse_msg():  uri:     <sip:<a href="http://10.112.185.126:5090">10.112.185.126:5090</a>><br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:614]: parse_msg():  version: <SIP/2.0><br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/parse_via.c:1254]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK3c39.65f7a3a2000000000000000000000000.0>; state=16<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/parse_via.c:2642]: parse_via(): end of header reached, state=5<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:496]: parse_headers(): parse_headers: Via found, flags=2<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:498]: parse_headers(): parse_headers: this is the first via<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/parse_addr_spec.c:894]: parse_addr_spec(): end of header reached, state=10<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:173]: get_hdr_field(): DEBUG: get_hdr_field: <To> [27]; uri=[sip:<a href="http://10.112.185.126:5090">10.112.185.126:5090</a>] <br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:175]: get_hdr_field(): DEBUG: to body [<sip:<a href="http://10.112.185.126:5090">10.112.185.126:5090</a>>#015#012]<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/parse_addr_spec.c:172]: parse_to_param(): DEBUG: add_param: tag=5f2625158503ae21eb962b93cf792822-be99<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/parse_addr_spec.c:894]: parse_addr_spec(): end of header reached, state=29<br>2016-06-20 14:08:48.031  DEBUG: <core> [parser/msg_parser.c:153]: get_hdr_field(): get_hdr_field: cseq <CSeq>: <10> <OPTIONS><br><br></div><div>How can i change the destination of sip OPTION in the event_route[tm:local-request]?<br><br></div><div><br></div><div>Regards<br></div><div>José<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-17 12:04 GMT+01:00 José Seabra <span dir="ltr"><<a href="mailto:joseseabra4@gmail.com" target="_blank">joseseabra4@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Daniel,<div>I already have tried that solution, changing the $du pseudo variable but the SIP OPTIONS still going to the address configured on dispatcher table.</div><div><br></div><div>Is it enough change the $du on <span style="font-size:12.8px">event_route[tm:local-request], or need something else?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thank you for your support</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Best Regards</span></div><span class="HOEnZb"><font color="#888888"><div><span style="font-size:12.8px">José</span></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-06-17 11:57 GMT+01:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<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>as alternative -- you should be able to set the out bound proxy
      address inside the event_route[tm:local-request], avoiding a loop
      back to the same server.</p>
    <p>On the other hand, the event route is executed for all requests
      generated by kamailio, not only for the keepalives, so you need to
      have conditions there to select what you want to process.<br>
    </p>
    Cheers,<br>
    Daniel<div><div><br>
    <br>
    <div>On 17/06/16 11:24, José Seabra wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Olle,
        <div>Thank you for the good hint, this way i can decide the
          destination of th sip OPTIONS in the kamailio script.</div>
        <div><br>
        </div>
        <div>Thank you for the support.</div>
        <div><br>
        </div>
        <div>Best regards</div>
        <div>José</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2016-06-17 8:24 GMT+01:00 Olle E.
          Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
              > On 16 Jun 2016, at 18:10, José Seabra <<a href="mailto:joseseabra4@gmail.com" target="_blank"></a><a href="mailto:joseseabra4@gmail.com" target="_blank">joseseabra4@gmail.com</a>>
              wrote:<br>
              ><br>
              > Hello there,<br>
              ><br>
              > I have a Kamailio server using dispatcher module to
              monitor several peers, some of them are in the same
              network, others are in an external network, for the peers
              that are in the external network kamailio has to send the
              OPTIONS(dispatcher keep alives) through another kamailio 
              located in the border and acting as loadbalancer.<br>
              ><br>
              > If i set the dispatcher option "outbound_proxy" all
              SIP OPTIONS are sent to the outbound proxy configured and
              it isn't what i need, I need to have by some way a
              possibility to set outbound_proxy only for the peers that
              are located on the external network.<br>
              ><br>
              > How can I do that?<br>
              <br>
            </span>I would set outbound_proxy to the local proxy and
            from that change $du on the “external” ones.<br>
            <br>
            /O<br>
            _______________________________________________<br>
            SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
            mailing list<br>
            <a href="mailto:sr-users@lists.sip-router.org" target="_blank">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>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div data-smartmail="gmail_signature">Cumprimentos
          <div>José Seabra</div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <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>
</pre>
    </blockquote>
    <br>
    </div></div><span><font color="#888888"><pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> - <a href="http://www.kamailio.org" target="_blank">http://www.kamailio.org</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></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" target="_blank">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><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature">Cumprimentos<div>José Seabra</div></div>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cumprimentos<div>José Seabra</div></div>
</div>