<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>Hi Mike,</tt><tt><br>
      </tt><tt><br>
      </tt><tt>I do not know much of Asterisk, so can you translate in
        human language what you are trying to do there?</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Regards,</tt><br>
      <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>
      On 26.05.2014 16:02, Mike Claudi Pedersen wrote:<br>
    </div>
    <blockquote
cite="mid:CADats6EORM7N2=-u2irRCX4_65iNWtS7wVvr-LZ9v_1EGCs46g@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br clear="all">
        <div><br>
        </div>
        im curently working on converting an esxisting asterisk server
        to opensips, for better perfomance<br>
        <br>
        for the most part it is working, but ive encountered an issue i
        cant really figure out.
        <div dir="ltr">
        </div>
        <div><br>
        </div>
        <div>asterisk is doing this :</div>
        <div><br>
        </div>
        <div>
          <div>if ("${fromourmobile}" != "") // Check if mobile Call
            Waiting is set to "n"</div>
          <div><span class="" style="white-space:pre"> </span>{</div>
          <div><span class="" style="white-space:pre"> </span>set(phonenumber=${FROM});</div>
          <div><span class="" style="white-space:pre"> </span>set(GROUP()=${phonenumber});</div>
          <div><span class="" style="white-space:pre"> </span>noop(Group
            Count: ${GROUP_COUNT(${phonenumber})});</div>
          <div><span class="" style="white-space:pre"> </span>if
            (${GROUP_COUNT(${phonenumber})} &gt; 1)</div>
          <div><span class="" style="white-space:pre"> </span>{</div>
          <div><span class="" style="white-space:pre"> </span>Busy();</div>
          <div><span class="" style="white-space:pre"> </span>}</div>
          <div><span class="" style="white-space:pre"> </span>}</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>and this</div>
        <div><br>
        </div>
        <div>
          <div>if (${MATH(${EPOCH} % 2)} = 0)</div>
          <div><span class="" style="white-space:pre"> </span>{</div>
          <div><span class="" style="white-space:pre"> </span>set(dialhost=193.88.58.86);</div>
          <div><span class="" style="white-space:pre"> </span>Dial(SIP/${numbertodial}@${dialhost},60,wWtT);</div>
          <div><span class="" style="white-space:pre"> </span>&amp;hangupcausecheck(${numbertodial},
            ${dialhost});</div>
          <div><span class="" style="white-space:pre"> </span>switch
            (${DIALSTATUS})&nbsp;</div>
          <div><span class="" style="white-space:pre"> </span>{&nbsp;</div>
          <div><span class="" style="white-space:pre"> </span>case
            BUSY:&nbsp;</div>
          <div><span class="" style="white-space:pre"> </span>busy;</div>
          <div><span class="" style="white-space:pre"> </span>break;</div>
          <div>
            <span class="" style="white-space:pre"> </span>default:</div>
          <div><span class="" style="white-space:pre"> </span>break;</div>
          <div><span class="" style="white-space:pre"> </span>} <span
              class="" style="white-space:pre"> </span></div>
          <div><span class="" style="white-space:pre"> </span>set(dialhost=195.215.252.15);</div>
          <div><span class="" style="white-space:pre"> </span>Dial(SIP/${numbertodial}@${dialhost},60,wWtT);</div>
          <div><span class="" style="white-space:pre"> </span>&amp;hangupcausecheck(${numbertodial},
            ${dialhost});</div>
          <div><span class="" style="white-space:pre"> </span>switch
            (${DIALSTATUS})&nbsp;</div>
          <div><span class="" style="white-space:pre"> </span>{&nbsp;</div>
          <div><span class="" style="white-space:pre"> </span>case
            BUSY:&nbsp;</div>
          <div><span class="" style="white-space:pre"> </span>busy;</div>
          <div><span class="" style="white-space:pre"> </span>break;</div>
          <div><span class="" style="white-space:pre"> </span>default:</div>
          <div><span class="" style="white-space:pre"> </span>break;</div>
          <div><span class="" style="white-space:pre"> </span>} <span
              class="" style="white-space:pre"> </span></div>
        </div>
        <div><span class="" style="white-space:pre"><br>
          </span></div>
        <div><span class="" style="white-space:pre">i cant seem to find
            a similar way to do this in opensips, mostly the
            group_count() and the hangupcausecheck()</span></div>
        <div><span class="" style="white-space:pre"><br>
          </span></div>
        <div><span class="" style="white-space:pre"><br>
          </span></div>
        <div><span class="" style="white-space:pre">furthermore is there
            any equivalent to the $server variable from asterisk?</span></div>
        <div><span class="" style="white-space:pre"><br>
          </span></div>
        <div><span class="" style="white-space:pre">i hope you guys can
            help me, and thx for alle the help ive gotten so far</span></div>
      </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>