<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi Simon,<br>
    <br>
    Instead of<br>
        if (lookup("location","", $avp(picker))) {<br>
    <br>
    try<br>
        if (lookup("location", , $avp(picker))) {<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 10.03.2025 18:11, Simon Gajski via
      Users wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:4a4e5037-153c-410f-ab10-9502d8dadcc3@softnet.si">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>Hello<br>
        <br>
        I have an issue with call pickup after migration from opensips
        3.2 to 3.5<br>
      </p>
      <p>I have been trying to use "1.6.2.  Call pickup" script from <a
          class="moz-txt-link-freetext"
href="https://opensips.org/docs/modules/3.5.x/event_routing.html"
          moz-do-not-send="true">https://opensips.org/docs/modules/3.5.x/event_routing.html</a><br>
      </p>
      and receiving this error that dont know how to deal with:<br>
      <font size="2" face="Courier New, Courier, monospace">ERROR:core:fixup_named_flags:
        Unknown flag:<br>
        ERROR:core:reg_fixup_lookup_flags: Failed to parse flags<br>
        ERROR:core:fix_cmd: Fixup failed for param [2]<br>
        ERROR:core:fix_actions: Failed to fix command <lookup><br>
        ERROR:core:fix_actions: fixing failed (code=-1) at
        /etc/opensips/opensips.cfg:1813<br>
        CRITICAL:core:fix_expr: fix_actions error<br>
        ERROR:core:main: failed to initialize routing lists!</font><br>
      <br>
      <font size="2" face="Courier New, Courier, monospace">opensips.cfg:1813</font>
      is pointing to line "<span style="color: #c586c0;">if</span><span
        style="color: #cccccc;"> (lookup(</span><span
        style="color: #ce9178;">"location"</span><span
        style="color: #cccccc;">,</span><span style="color: #ce9178;">""</span><span
        style="color: #cccccc;">, $avp(picker))) {</span>" of bellow
      function<br>
      <br>
      <br style="white-space: pre;">
      <div
style="color: #cccccc;background-color: #1f1f1f;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span
      style="color: #4ec9b0;">route</span><span style="color: #cccccc;">[handle_pickup]{</span></div><div><span
      style="color: #cccccc;">    xlog(</span><span
      style="color: #ce9178;">"call picked by avp(picker): $avp(picker), fetching its contacts</span><span
      style="color: #d7ba7d;">\n</span><span style="color: #ce9178;">"</span><span
      style="color: #cccccc;">);</span></div><div><span
      style="color: #cccccc;">    </span><span style="color: #c586c0;">if</span><span
      style="color: #cccccc;"> (lookup(</span><span
      style="color: #ce9178;">"location"</span><span
      style="color: #cccccc;">,</span><span style="color: #ce9178;">""</span><span
      style="color: #cccccc;">, $avp(picker))) {</span></div><div><span
      style="color: #cccccc;">        </span><span
      style="color: #6a9955;"># take the contacts retured by lookup() (for Charlie)</span></div><div><span
      style="color: #cccccc;">        </span><span
      style="color: #6a9955;"># and inject them into the original call, but also cancel</span></div><div><span
      style="color: #cccccc;">        </span><span
      style="color: #6a9955;"># any existing ongoing branch (ringing to Bob)</span></div><div><span
      style="color: #cccccc;">        t_inject_branches(</span><span
      style="color: #ce9178;">"msg"</span><span style="color: #cccccc;">,</span><span
      style="color: #ce9178;">"cancel"</span><span
      style="color: #cccccc;">);</span></div><div><span
      style="color: #cccccc;">    }</span></div><div><span
      style="color: #cccccc;">}</span></div></div>
      <p><br>
        Thank you for any tips on how to fix this<br>
        <br>
        BR<br>
        Simon<br>
      </p>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-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>