I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?ThanksFranck
i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote:
I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below :
<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=c.id JOIN carrier_gateway cg ON c.id=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>
however the query failed cause of digits_prefix field doesn't exist in the table.
is it a typo ? or does it need a field concatenation of prefix and digits ?
Thanks
Franck
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote:
ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ?
Thanks
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 2:44 AM *Subject:* Re: [Freeswitch-users] mod_lcr
i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy
On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote:
I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below :
<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=c.id JOIN carrier_gateway cg ON c.id=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>
however the query failed cause of digits_prefix field doesn't exist in the table.
is it a typo ? or does it need a field concatenation of prefix and digits ?
Thanks
Franck
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote:
ok thanks I will read again
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 3:09 AM *Subject:* Re: [Freeswitch-users] mod_lcr
it's the digits_prefix in the WHERE clause that's causing the error.
ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki.
-nandy
On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote:
ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ?
Thanks
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 2:44 AM *Subject:* Re: [Freeswitch-users] mod_lcr
i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy
On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote:
I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below :
<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=c.id JOIN carrier_gateway cg ON c.id=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>
however the query failed cause of digits_prefix field doesn't exist in the table.
is it a typo ? or does it need a field concatenation of prefix and digits ?
Thanks
Franck
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
Ok Rupa, when I tried the custom SQL example with gist option first It didn't recognize the @>'text'. I saw that the fields prefix and digits were not prefix_range type. I'm trying to reinstall the table again and test Regards F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Rupa, I'd like to test PREFIX module form postgresql. so in your postgresql sql I can see : CREATE TABLE lcr ( ... digits NUMERIC(20, 0), .... prefix VARCHAR(16) NOT NULL DEFAULT '', ... ); but in your PREFIX postgresql module example it's written : create table rates (id serial not null, prefix prefix_range, [...]); create index rates_prefix_idx on rates using gist (prefix gist_prefix_range_ops); insert [...] select * from rates where prefix @> '16666666666'; and in the custom example :...WHERE c.enabled = '1' AND cg.enabled = '1' AND l.enabled = '1' AND digits_prefix @> '%q' .... My question is how to uise the lcr table with PREFIX module of postgresql ? Thaks Franck ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Sorry for my confusio Rupa, but when you say AND digits_prefix @> '%q' in your custom example is digits_prefix a field or other ? if it's a field that make the SQL request ambiguous since it doesn't contains any alias. Thanks F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ? Thanks F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
What I use that differs from default: digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops) I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one. On insert I set them to the same value (eg: 12145551212). End is fine. Doesn't really matter. On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote:
Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ?
Thanks
F
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Thursday, June 10, 2010 8:38 AM *Subject:* Re: [Freeswitch-users] mod_lcr
Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index.
On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote:
ok thanks I will read again
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 3:09 AM *Subject:* Re: [Freeswitch-users] mod_lcr
it's the digits_prefix in the WHERE clause that's causing the error.
ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki.
-nandy
On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote:
ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ?
Thanks
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 2:44 AM *Subject:* Re: [Freeswitch-users] mod_lcr
i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy
On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote:
I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below :
<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=c.id JOIN carrier_gateway cg ON c.id=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>
however the query failed cause of digits_prefix field doesn't exist in the table.
is it a typo ? or does it need a field concatenation of prefix and digits ?
Thanks
Franck
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
clear as beer. Thanks ! F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 4:10 PM Subject: Re: [Freeswitch-users] mod_lcr What I use that differs from default: digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops) I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one. On insert I set them to the same value (eg: 12145551212). End is fine. Doesn't really matter. On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote: Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ? Thanks F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
No I stopped and now all seems to be more clear ;) ----- Original Message ----- From: Brian West To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 5:04 PM Subject: Re: [Freeswitch-users] mod_lcr Not sure what beer you drink but I haven't seen a clear beer.... sure you're not drinking wine? /b On Jun 10, 2010, at 4:00 PM, Madovsky wrote: clear as beer. Thanks ! F ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
No, it's impossible to get a clear understanding of something without a lot of drinking. Don't stop. On Thursday 10 June 2010, Madovsky wrote:
No I stopped and now all seems to be more clear ;) ----- Original Message ----- From: Brian West To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 5:04 PM Subject: Re: [Freeswitch-users] mod_lcr
Not sure what beer you drink but I haven't seen a clear beer.... sure you're not drinking wine?
/b
On Jun 10, 2010, at 4:00 PM, Madovsky wrote:
clear as beer. Thanks !
F
--------------------------------------------------------------------------- ---
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I succeed to make mod_lcr works with prefix and postgresql 8.4.4 I have also changed the type of digits as varchar(20) because pg doesn't accept empty numeric field (unless you know a trick to do that). Thanks for your patience F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 4:10 PM Subject: Re: [Freeswitch-users] mod_lcr What I use that differs from default: digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops) I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one. On insert I set them to the same value (eg: 12145551212). End is fine. Doesn't really matter. On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote: Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ? Thanks F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
null would be used for empty, but... why would you have an empty digits field? On Thu, Jun 10, 2010 at 10:21 PM, Madovsky <infos@madovsky.org> wrote:
I succeed to make mod_lcr works with prefix and postgresql 8.4.4 I have also changed the type of digits as varchar(20) because pg doesn't accept empty numeric field (unless you know a trick to do that).
Thanks for your patience
F
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Thursday, June 10, 2010 4:10 PM *Subject:* Re: [Freeswitch-users] mod_lcr
What I use that differs from default:
digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops)
I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one.
On insert I set them to the same value (eg: 12145551212).
End is fine. Doesn't really matter.
On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote:
Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ?
Thanks
F
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Thursday, June 10, 2010 8:38 AM *Subject:* Re: [Freeswitch-users] mod_lcr
Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index.
On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote:
ok thanks I will read again
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 3:09 AM *Subject:* Re: [Freeswitch-users] mod_lcr
it's the digits_prefix in the WHERE clause that's causing the error.
ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki.
-nandy
On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote:
ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ?
Thanks
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 2:44 AM *Subject:* Re: [Freeswitch-users] mod_lcr
i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy
On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote:
I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below :
<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=c.id JOIN carrier_gateway cg ON c.id=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>
however the query failed cause of digits_prefix field doesn't exist in the table.
is it a typo ? or does it need a field concatenation of prefix and digits ?
Thanks
Franck
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
I use prefix for country prefix and digits for npa-nxx digits. my trunk has a list with empty npa-nxx in some rows ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Friday, June 11, 2010 7:56 AM Subject: Re: [Freeswitch-users] mod_lcr null would be used for empty, but... why would you have an empty digits field? On Thu, Jun 10, 2010 at 10:21 PM, Madovsky <infos@madovsky.org> wrote: I succeed to make mod_lcr works with prefix and postgresql 8.4.4 I have also changed the type of digits as varchar(20) because pg doesn't accept empty numeric field (unless you know a trick to do that). Thanks for your patience F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 4:10 PM Subject: Re: [Freeswitch-users] mod_lcr What I use that differs from default: digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops) I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one. On insert I set them to the same value (eg: 12145551212). End is fine. Doesn't really matter. On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote: Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ? Thanks F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
That doesn't sound right. prefix is for prepending the supplied number with data. So if you want to prepend the country code if someone just dials npa-nxx for instance. Usually it would be used to add the customer access code that some providers like to use. digits should be a full e.164 number without the +. So, US would be 1NPANXX for 1000s resolution. Normalize your numbers to e164 format prior to doing the lcr query. Using this methodology I can't see how you would have any empty digits fields. On Fri, Jun 11, 2010 at 9:11 AM, Madovsky <infos@madovsky.org> wrote:
I use prefix for country prefix and digits for npa-nxx digits. my trunk has a list with empty npa-nxx in some rows
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Friday, June 11, 2010 7:56 AM *Subject:* Re: [Freeswitch-users] mod_lcr
null would be used for empty, but... why would you have an empty digits field?
On Thu, Jun 10, 2010 at 10:21 PM, Madovsky <infos@madovsky.org> wrote:
I succeed to make mod_lcr works with prefix and postgresql 8.4.4 I have also changed the type of digits as varchar(20) because pg doesn't accept empty numeric field (unless you know a trick to do that).
Thanks for your patience
F
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Thursday, June 10, 2010 4:10 PM *Subject:* Re: [Freeswitch-users] mod_lcr
What I use that differs from default:
digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops)
I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one.
On insert I set them to the same value (eg: 12145551212).
End is fine. Doesn't really matter.
On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote:
Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ?
Thanks
F
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Thursday, June 10, 2010 8:38 AM *Subject:* Re: [Freeswitch-users] mod_lcr
Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index.
On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote:
ok thanks I will read again
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 3:09 AM *Subject:* Re: [Freeswitch-users] mod_lcr
it's the digits_prefix in the WHERE clause that's causing the error.
ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki.
-nandy
On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote:
ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ?
Thanks
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 2:44 AM *Subject:* Re: [Freeswitch-users] mod_lcr
i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy
On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote:
I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below :
<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=c.id JOIN carrier_gateway cg ON c.id=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>
however the query failed cause of digits_prefix field doesn't exist in the table.
is it a typo ? or does it need a field concatenation of prefix and digits ?
Thanks
Franck
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
Ha ok thanks. but the problem is usually trunk offer rates list with country cod and city/route in separated columns. so if I understand I need to modify all the lists everytime to join these to column in one ? F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Friday, June 11, 2010 11:02 AM Subject: Re: [Freeswitch-users] mod_lcr That doesn't sound right. prefix is for prepending the supplied number with data. So if you want to prepend the country code if someone just dials npa-nxx for instance. Usually it would be used to add the customer access code that some providers like to use. digits should be a full e.164 number without the +. So, US would be 1NPANXX for 1000s resolution. Normalize your numbers to e164 format prior to doing the lcr query. Using this methodology I can't see how you would have any empty digits fields. On Fri, Jun 11, 2010 at 9:11 AM, Madovsky <infos@madovsky.org> wrote: I use prefix for country prefix and digits for npa-nxx digits. my trunk has a list with empty npa-nxx in some rows ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Friday, June 11, 2010 7:56 AM Subject: Re: [Freeswitch-users] mod_lcr null would be used for empty, but... why would you have an empty digits field? On Thu, Jun 10, 2010 at 10:21 PM, Madovsky <infos@madovsky.org> wrote: I succeed to make mod_lcr works with prefix and postgresql 8.4.4 I have also changed the type of digits as varchar(20) because pg doesn't accept empty numeric field (unless you know a trick to do that). Thanks for your patience F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 4:10 PM Subject: Re: [Freeswitch-users] mod_lcr What I use that differs from default: digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops) I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one. On insert I set them to the same value (eg: 12145551212). End is fine. Doesn't really matter. On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote: Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ? Thanks F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ---------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Yes, generally one must normalize the data on import as well. On Fri, Jun 11, 2010 at 10:41 AM, Madovsky <infos@madovsky.org> wrote:
Ha ok thanks. but the problem is usually trunk offer rates list with country cod and city/route in separated columns. so if I understand I need to modify all the lists everytime to join these to column in one ?
F
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Friday, June 11, 2010 11:02 AM *Subject:* Re: [Freeswitch-users] mod_lcr
That doesn't sound right.
prefix is for prepending the supplied number with data. So if you want to prepend the country code if someone just dials npa-nxx for instance. Usually it would be used to add the customer access code that some providers like to use.
digits should be a full e.164 number without the +. So, US would be 1NPANXX for 1000s resolution.
Normalize your numbers to e164 format prior to doing the lcr query.
Using this methodology I can't see how you would have any empty digits fields.
On Fri, Jun 11, 2010 at 9:11 AM, Madovsky <infos@madovsky.org> wrote:
I use prefix for country prefix and digits for npa-nxx digits. my trunk has a list with empty npa-nxx in some rows
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Friday, June 11, 2010 7:56 AM *Subject:* Re: [Freeswitch-users] mod_lcr
null would be used for empty, but... why would you have an empty digits field?
On Thu, Jun 10, 2010 at 10:21 PM, Madovsky <infos@madovsky.org> wrote:
I succeed to make mod_lcr works with prefix and postgresql 8.4.4 I have also changed the type of digits as varchar(20) because pg doesn't accept empty numeric field (unless you know a trick to do that).
Thanks for your patience
F
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Thursday, June 10, 2010 4:10 PM *Subject:* Re: [Freeswitch-users] mod_lcr
What I use that differs from default:
digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops)
I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one.
On insert I set them to the same value (eg: 12145551212).
End is fine. Doesn't really matter.
On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote:
Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ?
Thanks
F
----- Original Message ----- *From:* Rupa Schomaker <rupa@rupa.com> *To:* freeswitch-users <freeswitch-users@lists.freeswitch.org> *Sent:* Thursday, June 10, 2010 8:38 AM *Subject:* Re: [Freeswitch-users] mod_lcr
Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index.
On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote:
ok thanks I will read again
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 3:09 AM *Subject:* Re: [Freeswitch-users] mod_lcr
it's the digits_prefix in the WHERE clause that's causing the error.
ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki.
-nandy
On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote:
ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ?
Thanks
F
----- Original Message ----- *From:* Nandy Dagondon <gcd@i.ph> *To:* freeswitch-users@lists.freeswitch.org *Sent:* Thursday, June 10, 2010 2:44 AM *Subject:* Re: [Freeswitch-users] mod_lcr
i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy
On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote:
> I'm experimenting with mod_lcr with postgresql (8.4.4) > there s an example of custom sql on wiki below : > > > <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=c.id > JOIN carrier_gateway cg ON c.id=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> > > however the query failed cause of digits_prefix field doesn't exist in the table. > > is it a typo ? or does it need a field concatenation of prefix and digits ? > > Thanks > > > > Franck > > > _______________________________________________ > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > UNSUBSCRIBE: > http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org > > ------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa
I see.... thanks for the tip. ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Friday, June 11, 2010 12:06 PM Subject: Re: [Freeswitch-users] mod_lcr Yes, generally one must normalize the data on import as well. On Fri, Jun 11, 2010 at 10:41 AM, Madovsky <infos@madovsky.org> wrote: Ha ok thanks. but the problem is usually trunk offer rates list with country cod and city/route in separated columns. so if I understand I need to modify all the lists everytime to join these to column in one ? F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Friday, June 11, 2010 11:02 AM Subject: Re: [Freeswitch-users] mod_lcr That doesn't sound right. prefix is for prepending the supplied number with data. So if you want to prepend the country code if someone just dials npa-nxx for instance. Usually it would be used to add the customer access code that some providers like to use. digits should be a full e.164 number without the +. So, US would be 1NPANXX for 1000s resolution. Normalize your numbers to e164 format prior to doing the lcr query. Using this methodology I can't see how you would have any empty digits fields. On Fri, Jun 11, 2010 at 9:11 AM, Madovsky <infos@madovsky.org> wrote: I use prefix for country prefix and digits for npa-nxx digits. my trunk has a list with empty npa-nxx in some rows ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Friday, June 11, 2010 7:56 AM Subject: Re: [Freeswitch-users] mod_lcr null would be used for empty, but... why would you have an empty digits field? On Thu, Jun 10, 2010 at 10:21 PM, Madovsky <infos@madovsky.org> wrote: I succeed to make mod_lcr works with prefix and postgresql 8.4.4 I have also changed the type of digits as varchar(20) because pg doesn't accept empty numeric field (unless you know a trick to do that). Thanks for your patience F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 4:10 PM Subject: Re: [Freeswitch-users] mod_lcr What I use that differs from default: digits | text | not null digits_prefix | prefix_range | not null Indexes: "idx_prefix" gist (digits_prefix gist_prefix_range_ops) I keep digits around so I can test both default behavior and new behavior. You only really NEED the second one. On insert I set them to the same value (eg: 12145551212). End is fine. Doesn't really matter. On Thu, Jun 10, 2010 at 12:44 PM, Madovsky <infos@madovsky.org> wrote: Ok I understand now. but where to create digist_prefix in lcr table ? the end is ok ? Thanks F ----- Original Message ----- From: Rupa Schomaker To: freeswitch-users Sent: Thursday, June 10, 2010 8:38 AM Subject: Re: [Freeswitch-users] mod_lcr Read the part about how to define the table + the gist index. The whole custom_sql thing assumes a familiarity with sql. you can choose to not have a digits_prefix column and just change the datatype of prefix to prefix. You can do what I did which is to have prefix be text and digits_prefix be of type prefix and a trigger to keep the two in sync. the key is that you are searching against the prefix column for which there is a GIST index. On Thu, Jun 10, 2010 at 2:53 AM, Madovsky <infos@madovsky.org> wrote: ok thanks I will read again F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 3:09 AM Subject: Re: [Freeswitch-users] mod_lcr it's the digits_prefix in the WHERE clause that's causing the error. ur question re prefix+digits, it's explained in the Custom SQL portion in the wiki. -nandy On Thu, Jun 10, 2010 at 2:56 PM, Madovsky <infos@madovsky.org> wrote: ok so it needs also the alias l.digits in the condition I think. I'm a little confused about digits and prefix. if I check a number with the country code is it need to join prefix+digits ? how with this kinkd of sql request ? Thanks F ----- Original Message ----- From: Nandy Dagondon To: freeswitch-users@lists.freeswitch.org Sent: Thursday, June 10, 2010 2:44 AM Subject: Re: [Freeswitch-users] mod_lcr i think it's a typo. i changed digits_prefix to digits. to be sure, pls check the CREATE TABLE entries. -nandy On Thu, Jun 10, 2010 at 2:16 PM, Madovsky <infos@madovsky.org> wrote: I'm experimenting with mod_lcr with postgresql (8.4.4) there s an example of custom sql on wiki below : <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=c.id JOIN carrier_gateway cg ON c.id=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> however the query failed cause of digits_prefix field doesn't exist in the table.is it a typo ? or does it need a field concatenation of prefix and digits ?Thanks Franck _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org ---------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa -------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ---------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa -------------------------------------------------------------------------- _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org -- -Rupa ------------------------------------------------------------------------------ _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (5)
-
Brian West
-
Madovsky
-
Nandy Dagondon
-
Rupa Schomaker
-
Sergey Okhapkin