<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi Tito,<br>
      <br>
      Try $(branch(uri)[x]{uri.transport}) to get the transport param
      from the URI.<br>
      <br>
      Or, look into the </tt><tt>$(branch(socket)[x]{s.select,0,:}) -
      the proto of the sending socket.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 07.07.2015 12:14, Tito Cumpen wrote:<br>
    </div>
    <blockquote
cite="mid:CANZPVB6Wcqr+pr92A7bqBg0-9GZbyOAVEqi2NFiP1=EDp_97KQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Bogdan,
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Thanks for your reply. These variables seem like a step in
          the right direction although it raises another question as to
          how to access the branches and check the destination proto.
          How does one access the array of branches? Would they have to
          be casted and lopped and checked against a regex? <strong
            style="color:rgb(102,102,102);font-family:'Trebuchet
MS',sans-serif,Verdana,Arial;font-size:13.0080003738403px;line-height:21.5932807922363px">dP
            seems to provide the proto but what would be provided in the
            case of various destination protos as in the case of sip and
            ws?</strong></div>
        <div><strong
            style="color:rgb(102,102,102);font-family:'Trebuchet
MS',sans-serif,Verdana,Arial;font-size:13.0080003738403px;line-height:21.5932807922363px"><br>
          </strong></div>
        <div><strong
            style="color:rgb(102,102,102);font-family:'Trebuchet
MS',sans-serif,Verdana,Arial;font-size:13.0080003738403px;line-height:21.5932807922363px"><br>
          </strong></div>
        <div><strong
            style="color:rgb(102,102,102);font-family:'Trebuchet
MS',sans-serif,Verdana,Arial;font-size:13.0080003738403px;line-height:21.5932807922363px">Thanks,</strong></div>
        <div><font color="#666666" face="Trebuchet MS, sans-serif,
            Verdana, Arial"><span
              style="font-size:13.0080003738403px;line-height:21.5932807922363px"><b>Tito</b></span></font></div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Jul 2, 2015 at 9:31 AM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:bogdan@opensips.org"
              target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi Tito,<br>
                <br>
                The registrar module (responsible for extracting the
                contacts from SIP msg and storing into USRLOC) takes the
                q value from the Contact header (as SIP RFC requires). <br>
                Currently there is no way to change the q value (from
                script level) before saving into USRLOC.<br>
                <br>
                But what you can do is to change the q values after the
                lookup (when loaded into msg from USRLOC).<br>
                <br>
                Take a look at branch variable $branch(q) :<br>
                    <a moz-do-not-send="true"
                  href="http://www.opensips.org/Documentation/Script-CoreVar-2-1#toc22"
                  target="_blank">http://www.opensips.org/Documentation/Script-CoreVar-2-1#toc22</a><br>
                and $ru_q (q value for RURI) :<br>
                    <a moz-do-not-send="true"
                  href="http://www.opensips.org/Documentation/Script-CoreVar-2-1#toc77"
                  target="_blank">http://www.opensips.org/Documentation/Script-CoreVar-2-1#toc77</a><br>
                <br>
                and you may change the q values and do a
                serialize_branches() after that.<br>
                <br>
                Best regards,<br>
              </tt>
              <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
              <span class="">
                <div>On 01.07.2015 19:57, Tito Cumpen wrote:<br>
                </div>
              </span>
              <blockquote type="cite"><span class="">
                  <div dir="ltr">Group,
                    <div>
                      <div style="outline:none;font-size:medium">
                        <div
style="margin-bottom:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-radius:0px;width:1104.23608398438px;float:none!important">
                          <div
style="padding-top:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-bottom-color:rgb(216,216,216);border-top-color:rgb(216,216,216);border-radius:0px;margin-bottom:0px;margin-left:0px;margin-right:0px">
                            <div>
                              <div
                                style="padding-bottom:20px;padding-left:8px">
                                <div style="margin-left:44px">
                                  <div
style="font-size:12.8000001907349px;margin-bottom:0px;margin-left:0px;padding-bottom:5px">
                                    <div style="overflow:hidden">
                                      <div dir="ltr"><br>
                                        <br>
                                      </div>
                                      <div dir="ltr">Is it possible to
                                        set the q value upon
                                        registration? I need to set ws
                                        destinations to a lower q value
                                        as rtpengine has a limitation on
                                        sending different media params
                                        on a per branch basis in
                                        parallel. Or should I loop into
                                        the branches with a certain
                                        attribute and order them before
                                        serializing them? </div>
                                      <div><span
                                          style="font-size:12.8000001907349px"><br>
                                        </span></div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </span>
                <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>