<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
I would say "sqlops" would be helpful for your case. You can fetch any variable from db with proper query.</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
<br>
</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
Regards</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
EU.</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
Get <a href="https://aka.ms/ghei36">Outlook for Android</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Mihai Cezar <mihai@mokalife.ro><br>
<b>Sent:</b> Sunday, December 27, 2020 3:18:49 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Subject:</b> [SR-Users] Read $fd from mysql?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hello, <br>
</div>
<div><br>
</div>
<div>I am redirecting the agents/reps to their asterisk server based on the hostname which they connect, and, i wonder if it's possible to read from db instead of the file cause it's getting big ;)</div>
<div><br>
</div>
<div># Dispatch requests<br>
route[DISPATCH] {<br>
switch ($fd){<br>
case "<a href="http://oro.streamlinepbx.nl">oro.streamlinepbx.nl</a>":<br>
if (!ds_select_dst("1", "4")) {<br>
send_reply(503, "Service Unavailable $fd");<br>
exit;<br>
}<br>
break;<br>
case "<a href="http://oro3.streamlinepbx.nl">oro3.streamlinepbx.nl</a>":<br>
if (!ds_select_dst("2", "4")) {<br>
send_reply(503, "Service Unavailable $fd");<br>
exit;<br>
}<br>
break;</div>
<div> ............<br>
default:<br>
log("unknow destination?");<br>
send_reply(503, "No service defined");<br>
xlog("--- SCRIPT: going to <$ru> via <$du> ...Exiting");<br>
exit;<br>
}<br>
<br>
xlog("--- SCRIPT: going to <$ru> via <$du> (attrs: $xavp(_dsdst_=>attrs))\n");<br>
t_on_failure("RTF_DISPATCH");<br>
route(RELAY);<br>
exit;<br>
}</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
</div>
</div>
</body>
</html>