<div dir="ltr">Perfect, thank you so much Javi.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 30, 2015 at 12:40 AM, Javi Gallart <span dir="ltr"><<a href="mailto:jgallart@systemonenoc.com" target="_blank">jgallart@systemonenoc.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">
    <div>Hi<span class=""><br>
      On 27/03/15 16:37, Kyle Kurz wrote:<br>
    </span></div><span class="">
    <blockquote type="cite">
      <div dir="ltr">Thanks guys, that worked. Follow-up question, I
        want to reroute the incoming packet to the sip URI in that
        header, but Kamailio is complaining about the use of a variable
        in t_relay_to_udp. Putting $var(b) in quotes just makes it try
        to use that literal string as the target host. Is there another
        way to accomplish this?</div>
    </blockquote></span>
    you could set $ru to the desired value, and the call t_relay().<br>
    <br>
    Regards<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Javi</font></span><div><div class="h5"><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>
          <p><span>$var(a) </span><span>=</span><span> $hdr(X-Digium-AppServer-Response-URI)</span><span>;<br>
            </span><span>$var(b) </span><span>=</span><span> $(var(a){s.strip,4})</span><span>;<br>
            </span>if (!t_relay_to_udp($var(b), "5060")) {<br>
            <span>     sl_reply_error()</span><span>;<br>
            </span>}</p>
          <p>Thanks,<br>
            Kyle</p>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Mar 27, 2015 at 8:21 AM, Javi
          Gallart <span dir="ltr"><<a href="mailto:jgallart@systemonenoc.com" target="_blank">jgallart@systemonenoc.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">
              <div>Hi<span><br>
                  On 27/03/15 16:09, Kyle Kurz wrote:<br>
                </span></div>
              <span>
                <blockquote type="cite">
                  <div dir="ltr">I'm trying to use the is_present_hf
                    function to detect the presence of a user-defined
                    header and getting the following errors in my
                    Kamailio logs:
                    <div><br>
                    </div>
                    <div>
                      <p><span>2(12149) BUG: <core>
                          [select.c:426]: run_select(): Select structure
                          has not been resolved<br>
                        </span>2(12149) ERROR: <core>
                        [lvalue.c:416]: lval_assign(): assignment failed
                        at pos: (99,58-99,58)<br>
                        2(12149) ERROR: <script>: </p>
                      <p>A quick Google search yielded no results for
                        why this could be happening. Originally, I had
                        my code in route[REPLY], but noticed that was
                        not one of the paths it was listed as available
                        in the textops document, so I moved it to
                        request_route, but got the same errors. Does
                        anyone have any feedback on how to move forward?
                        My code snippet is below:</p>
                      <p>if
                        (is_present_hf("X-Digium-AppServer-Response-URI"))
                        {<br>
                             $var(a) =
                        @hf_value.X_Digium_AppServer_Response_URI[1];<br>
                             xlog ("\n\nHERE RESPONSE URI $var(a)\n\n");<br>
                        }</p>
                    </div>
                  </div>
                </blockquote>
              </span> Apparently the syntax for accessing the header is
              not correct. @hf_value will look for a global variable
              with that name. Try with $hdr(). <br>
              <br>
              <a href="http://www.kamailio.org/wiki/cookbooks/4.2.x/pseudovariables#hdr_name_-_headers" target="_blank">http://www.kamailio.org/wiki/cookbooks/4.2.x/pseudovariables#hdr_name_-_headers</a><br>
              <br>
              Regards<span><font color="#888888"><br>
                  <br>
                  Javi<br>
                </font></span>
              <blockquote type="cite"><span>
                  <div dir="ltr">
                    <div>
                      <p>Thanks,<br>
                        Kyle</p>
                      -- <br>
                      <div>
                        <div dir="ltr">
                          <div>
                            <div dir="ltr"><img src="https://dl.dropboxusercontent.com/u/1538991/Photos/digiumlogo.png"><br style="color:rgb(0,0,0);font-family:Times;font-size:medium">
                              <font style="color:rgb(0,0,0);font-size:medium" color="#000000" face="Calibri,
                                Helvetica, Arial, Sans"><span style="font-weight:bold;font-size:12px"><b><span>Kyle

                                      Kurz</span></b></span><br>
                                <span style="font-size:11px">Digium,
                                  Inc. · Senior <span>Software Engineer</span><br>
                                  <span>9115 Brown Deer Rd</span> · <span>San
                                    Diego, CA 92121</span> · <span>US</span><br>
                                  <span>direct</span> <span>+1
                                    858.537.1166</span><br>
                                  <span>Check us out at: <a href="http://digium.com/" target="_blank">http://digium.com</a> · <a href="http://www.asterisk.org/" target="_blank">http://asterisk.org</a> </span></span></font><br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </span><span>
                  <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>
                </span></blockquote>
              <br>
            </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" 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>
          <div dir="ltr">
            <div>
              <div dir="ltr"><img src="https://dl.dropboxusercontent.com/u/1538991/Photos/digiumlogo.png"><br style="color:rgb(0,0,0);font-family:Times;font-size:medium">
                <font style="color:rgb(0,0,0);font-size:medium" color="#000000" face="Calibri, Helvetica, Arial, Sans"><span style="font-weight:bold;font-size:12px"><b><span>Kyle
                        Kurz</span></b></span><br>
                  <span style="font-size:11px">Digium, Inc. · Senior <span>Software
                      Engineer</span><br>
                    <span>9115 Brown Deer Rd</span> · <span>San Diego,
                      CA 92121</span> · <span>US</span><br>
                    <span>direct</span> <span>+1 858.537.1166</span><br>
                    <span>Check us out at: <a href="http://digium.com/" target="_blank">http://digium.com</a> · <a href="http://www.asterisk.org/" target="_blank">http://asterisk.org</a> </span></span></font><br>
              </div>
            </div>
          </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></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" 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 class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><img src="https://dl.dropboxusercontent.com/u/1538991/Photos/digiumlogo.png"><br style="color:rgb(0,0,0);font-family:Times;font-size:medium"><font color="#000000" face="Calibri, Helvetica, Arial, Sans" style="color:rgb(0,0,0);font-size:medium"><span style="font-weight:bold;font-size:12px"><b><span>Kyle Kurz</span></b></span><br><span style="font-size:11px">Digium, Inc. · Senior <span>Software Engineer</span><br><span>9115 Brown Deer Rd</span> · <span>San Diego, CA 92121</span> · <span>US</span><br><span>direct</span> <span>+1 858.537.1166</span><br><span>Check us out at: <a href="http://digium.com/" target="_blank">http://digium.com</a> · <a href="http://www.asterisk.org/" target="_blank">http://asterisk.org</a> </span></span></font><br></div></div></div></div>
</div>