<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi ,<br>
      have you changed to twice?<br>
      This happens if you try to use uac_replace_to (or
      uac_replace_from) twice.<br>
      <br>
      s<br>
      <br>
      Il 19/06/2013 15.18, M.Khaled W Chehab ha scritto:<br>
    </div>
    <blockquote cite="mid:012801ce6cef$7c36c1f0$74a445d0$@icucall.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">while i am
            using uac_replace_to in failover route branch i can find
            that TO header is not changed(sip user part ) but appended
            an new raw &nbsp;as I want it to be To: "971552448304" &lt;sip:
            <a class="moz-txt-link-abbreviated" href="mailto:808971552448304@xx.xx.xx.55">808971552448304@xx.xx.xx.55</a>&gt;<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">SIP to address:
<a class="moz-txt-link-abbreviated" href="mailto:sip:835822971552448304@xx.xx.xx.55sip:808971552448304@xx.xx.xx.55">sip:835822971552448304@xx.xx.xx.55sip:808971552448304@xx.xx.xx.55</a><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">SIP to address
            User Part: 835822971552448304<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">SIP to address
            Host Part: xx.xx.xx.55sip<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">SIP to address
            Host Port: <a moz-do-not-send="true"
              href="mailto:808971552448304@xx.xx.xx.55">808971552448304@xx.xx.xx.55</a><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">please advice <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
                M.Khaled W Chehab [<a class="moz-txt-link-freetext" href="mailto:kchehab@icucall.com">mailto:kchehab@icucall.com</a>] <br>
                <b>Sent:</b> Wednesday, June 19, 2013 2:41 PM<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
                <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a><br>
                <b>Subject:</b> uac_replace_to problem <o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Hi,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">I
            am running opensips 1.8.3 with &nbsp;do_routing module <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">A
            dial_rule prefix has 3 trunk gateways ( gw1,gw2,gw3)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">After
            do_routing(,)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">I
            am setting the $rU and fixing&nbsp; the To Tag header using
            uac_replace_to( and the call go to gw1 with correct TO tag
            as I set it ,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">but
            when calls fails on gw1 ,then &nbsp;I set the $rU in route[6] to
            go to second in route and it goes with bad TO header, since
            it goes with the same To header in the 1<sup>st</sup> invite
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">That
            target gw1 <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">1-how
            to fix the To header in the second invite to gw2<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:9.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">loadmodule
            "uac.so"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">modparam("uac","restore_mode","auto")<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">uac_replace_to("$avp(dst)","<a
              moz-do-not-send="true"
              href="sip:$var%28prefix%29$avp%28dst%29@$td">sip:$var(prefix)$avp(dst)@$td</a>");<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            t_on_failure("1");<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">on
            failure_route[1] {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">if
            (!t_check_status("487")) {<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            #xlog("------------route6-------\n");<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            $avp(failure_count) = $avp(failure_count) + 1;&nbsp;
            #480|486|603&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            route(6);<o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <o:p></o:p></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            } <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Route[6]{<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">$rU
            = $var(prefix) + $avp(dst);<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">uac_replace_to("<a
              moz-do-not-send="true"
              href="sip:$var%28prefix%29$avp%28dst%29@$td">sip:$var(prefix)$avp(dst)@$td</a>");<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">}<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p>&nbsp;</o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>