i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. <br>-nandy<br>
<br><br><div class="gmail_quote">On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <span dir="ltr"><<a href="mailto:infos@madovsky.org">infos@madovsky.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font size="2">I'm experimenting with mod_lcr with postgresql
(8.4.4)</font></div>
<div><font size="2">there s an example of custom sql on wiki below :</font></div>
<div><font size="2"></font> </div>
<div><pre> <profile name="use_prefix">
<param name="custom_sql" value="
SELECT l.digits, c.carrier_name, l.${lcr_rate_field}, cg.prefix AS gw_prefix, cg.suffix AS gw_suffix,
l.lead_strip, l.trail_strip, l.prefix, l.suffix, cg.codec, l.cid
FROM lcr l
JOIN carriers c ON l.carrier_id=<a href="http://c.id" target="_blank">c.id</a>
JOIN carrier_gateway cg ON <a href="http://c.id" target="_blank">c.id</a>=cg.carrier_id
WHERE c.enabled = '1' AND cg.enabled = '1' AND l.enabled = '1'
AND digits_prefix @> '%q'
AND CURRENT_TIMESTAMP BETWEEN date_start AND date_end
ORDER BY digits DESC, ${lcr_rate_field} asc, random();
"/>
</profile>
</pre><pre><font face="Arial">however the query failed cause of digits_prefix field doesn't exist in the table.</font></pre><pre><font face="Arial">is it a typo ? or does it need a field concatenation of prefix and digits ?</font></pre>
<pre><font face="Arial">Thanks</font></pre><pre><font face="Arial"></font> </pre><pre><font face="Arial">Franck</font></pre></div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>