<p>If we try to serialize branches after an async() call, it fails with:</p>

<pre><code>core:serialize_branches: nothing to do - all same q!
</code></pre>

<p>We are able to list all branches from the config using the following snippet:</p>

<pre><code>    $var(i) = 0;
    while ($(branch(uri)[$var(i)]) != null) {
        xlog("L_INFO","$$(branch(uri)[$var(i)])=[$(branch(uri)[$var(i)])]\n");
        $var(i) = $var(i) + 1;
    }
...
$(branch(uri)[0])=[sip:user@my.domain1.com;q=0.96]
$(branch(uri)[1])=[sip:user@my.domain2.com;q=0.97]
$(branch(uri)[2])=[sip:user@my.domain3.com;q=0.98]
</code></pre>

<p>Now, inside serialize.c:serialize_branches(), if we add a debug probe after setting ruri and ruri_q we see:</p>

<pre><code>LM_INFO("ruri=[%.*s] ruri_q=[%d]\n", ruri-&gt;len, ruri-&gt;s, ruri_q);
...
INFO:core:serialize_branches: ruri=[sip:user@my.domain4.com;q=0.99] ruri_q=[-1]
</code></pre>

<p>The q value is present in ruri, but ruri_q is not set.<br>
Same thing inside branches.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/835">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AFOciZMEQEXJ0h5aJ35QavwPDM2G-5NAks5pvuJYgaJpZM4H1bU4.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/835"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>