<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 (&quot;${fromourmobile}&quot; != &quot;&quot;) // Check if mobile Call Waiting is set to &quot;n&quot;</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}) </div><div><span class="" style="white-space:pre">                                                </span>{ </div>
<div><span class="" style="white-space:pre">                                                        </span>case BUSY: </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}) </div><div><span class="" style="white-space:pre">                                                </span>{ </div><div><span class="" style="white-space:pre">                                                        </span>case BUSY: </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>