<div dir="ltr"><div class="gmail_extra"><font color="#000000" face="monospace">sorry :</font></div><div class="gmail_extra"><font color="#000000" face="monospace"><br></font></div><div class="gmail_extra"><span style="font-family:monospace"><font color="#000000"> <span style="font-weight:bold"># record routing</span>
<br> record_route()<span style="font-weight:bold">;</span>
<br>
<br> <span style="font-weight:bold"># create dialog with timeout</span>
</font><br> if ( !create_dialog("B") ) {
<br> send_reply("500","Internal Server Error")<span style="font-weight:bold;color:rgb(84,255,255)">;</span><span style="color:rgb(0,0,0)">
</span><br> exit<span style="font-weight:bold;color:rgb(84,255,255)">;</span><span style="color:rgb(0,0,0)">
</span><br> }<br>
<br></span></div><div class="gmail_extra"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold"># apply transformations from dialplan table</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> dp_translate("0","$rU/$</span><wbr style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px">rU")</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold"># route calls based on prefix</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> if ( !do_routing("1","W",,"$var(</span><wbr style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px">rule_attrs)","$var(gw_attrs)") ) { </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> send_reply("</span><wbr style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px">404","No Route found")</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> exit</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> } </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> $acc_extra(gwid)=</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">$avp(<wbr>gw_id)</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> t_on_failure("GW_</span><wbr style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px">FAILOVER")</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> do_accounting("db|log",</span><wbr style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px">"cdr|missed",)</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">#NAT </span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> if (isbflagset(NAT)) setflag(NAT)</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">#NAT</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">#TOPOHIDE</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> to</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">opology_hiding("UC");</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">#TOPOHIDE</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> route(RELAY)</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px;font-weight:bold">;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"> </span><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><br style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px"><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.4px">}</span><br></div></div>