Some thoughts:<br><br>1) look at mod_lcr<br>2) comments on script below...<br><br><div class="gmail_quote">On Sat, Jun 6, 2009 at 2:53 AM, Shoaib Khanzada <span dir="ltr"><<a href="mailto:skhanzada@gmail.com">skhanzada@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Following is the js i am using to select route and bridge the call....<br><br><br>use("ODBC");<br>
<br>var DSN = "myodbc";<br>var DB_USER = "neo";<br>var DB_PASS = ".....";<br>
<br>[...]</blockquote><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">var db = new ODBC(DSN, DB_USER, DB_PASS);<br><br>db.connect();<br>
<br>[...]</blockquote><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>sql = "SELECT ec.* FROM auth_routes_carriers arc,external_carriers ec, codes c where arc.external_carriers_id = <a href="http://ec.id" target="_blank">ec.id</a> and arc.code_id = <a href="http://c.id" target="_blank">c.id</a> and substring('"+no2+"',1,length(c.code))=c.code and ec.active=1 order by arc.priority asc";<br>
<br>db.connect();<br></blockquote><div><br>no need to reconnect<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>db.query(sql);<br>
<br>[...]</blockquote><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>if(bridge_str != ''){<br> if(session.ready()) session.execute("bridge", bridge_str); <br>
</blockquote><div><br>Don't actually execute the bridge from javascript. Instead, set the bridge_str to a channel var and then do the bridge from the dialplan using that bridge_str. This way you don't have a javascript interpreter lying around for the duration of the call.<br>
</div></div><br>-- <br>-Rupa<br>