[Freeswitch-users] mod_db help needed

Steven Ayre steveayre at gmail.com
Thu Nov 29 10:56:06 MSK 2012


Server seems back up today. It's been under a DDOS attack for a few days.

Your main problem is that your db.conf setup is wrong:
      <param name="freeswitch-connector" value="freeswitch:root:
system123#"/>
Should be:
      <param name="odbc-dsn" value="freeswitch:root:system123#"/>

Pretty much every module uses the 'odbc-dsn' parameter name. Any unknown
parameters are ignored. This is why you're seeing no error, FS is never
even seeing the odbc-dsn param has been set. It'll be using the sqlite
files by default.

Fix the file then 'reloadxml' and 'reload_db' to pick up the change without
restarting FS.

If still failing after correcting that...

Have you also installed the MyODBC driver? If you're installing unixodbc
from a package on your distro then it'll likely be there but in a separate
package.

You can confirm that your ODBC DSN is working correctly by using the isql
program at the CLI. If that connects then you know that your unixODBC
settings are correct.

-Steve


On 29 November 2012 04:40, Nitin Tomer <ntomer at newgen.co.in> wrote:

>  Since site was down yesterday, I did some hit and trials myself, made
> the following changes in db.conf.xml –****
>
> ** **
>
> <configuration name="db.conf" description="LIMIT DB Configuration">
>   <settings>
>       <param name="freeswitch-connector"
> value="freeswitch:root:system123#"/>
>   </settings>
> </configuration>****
>
> ** **
>
> And added this entry in dialplan –****
>
> ** **
>
> <action application="db" data="insert/testapp/newcall1/${res}" />****
>
> ** **
>
> When I tried running it, I didn’t get any error. But neither any entries
> were made in the database.****
>
> ** **
>
> Please tell me what I am doing wrong.****
>
> ** **
>
> Regards****
>
> ** **
>
> Nitin****
>
> ** **
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Nitin Tomer
> *Sent:* Tuesday, November 27, 2012 3:52 PM
> *To:* 'FreeSWITCH Users Help'
>
> *Subject:* Re: [Freeswitch-users] mod_db help needed****
>
>  ** **
>
> Hi Yiftach,****
>
> ** **
>
> Thanks for your reply. I have installed and configured ODBC on my server.
> ****
>
> ** **
>
> /etc/odbc.ini has following entries –****
>
> ** **
>
> [freesiwtch-connector]****
>
> Description           = MySQL connection to 'freeswitch' database****
>
> Driver                = MySQL****
>
> Database              = freeswitch****
>
> Server                = localhost****
>
> UserName              = root****
>
> Password              = system123****
>
> Port                  = 3306****
>
> Socket                = /var/run/mysqld/mysqld.sock****
>
> ** **
>
> After this I did ./configure and “make && make install”****
>
> ** **
>
> Now what all changes I need to make in Freeswitch so that I can make ODBC
> work in it? Please help me out.****
>
> ** **
>
> N.B. Today Freeswitch.org is down and therefore I am not able to look for
> any help there****
>
> ** **
>
> Regards****
>
> ** **
>
> Nitin****
>
> ** **
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Yiftach
> Golan
> *Sent:* Friday, November 16, 2012 3:03 AM
> *To:* FreeSWITCH Users Help
> *Subject:* Re: [Freeswitch-users] mod_db help needed****
>
> ** **
>
> Hi Nitin,
> Just install odbc on you system, I used this one (
> http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_configuring_odbc.html)
> but you can use FreeSWITCH's explanations as well (
> http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core)
> Once you are done the configure should already know that you have odbc
> support, just hit regular configure or as FreeSWITCH docs says : ****
> Compile FreeSWITCH with ODBC support****
>
> UnixODBC support will be autodetected by ./configure, and if found, will
> be compiled into FreeSWITCH. ****
>
> As for the keys it is pretty easy just go to (
> http://wiki.freeswitch.org/wiki/Mod_db) the query should be something
> like : ****
>
> <action application="set" data="var=${db(select/realm/key)}"/>****
>
> The documentation is actually pretty good so try to read it again it will
> make sense
> Thanks,
> Yiftach.****
>
> On Thu, Nov 15, 2012 at 4:51 AM, Nitin Tomer <ntomer at newgen.co.in> wrote:*
> ***
>
> I understand that I will have to make changes in db.conf.xml -****
>
>  ****
>
> <configuration name="db.conf" description="LIMIT DB Configuration">****
>
>   <settings>****
>
>     <!--<param name="odbc-dsn" value="dsn:user:pass"/>-->****
>
>   </settings>****
>
> </configuration>****
>
>  ****
>
> But the wiki also says this – “ODBC must be configured to use ODBC
> resources (configure with --enable-core-odbc-support).” What does this
> mean? I couldn’t find any more references to it.****
>
>  ****
>
> Wiki says – “Realm and key are arbitrary strings. Consider realm as a
> container for keys.” Does this mean that I can use a realm for a particular
> type of data e.g. “callerdata”, use caller number as key and set the
> entered data against that key. But how would I be able to access this data
> from outside FreeSwitch?****
>
>  ****
>
> Is the realm mapped to a table in the database or something similar?****
>
>  ****
>
> Thanks in advance****
>
>  ****
>
> Nitin****
>
>  ****
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Nitin Tomer
> *Sent:* Thursday, November 15, 2012 3:30 PM
> *To:* 'FreeSWITCH Users Help'
> *Subject:* [Freeswitch-users] mod_db help needed****
>
>  ****
>
> Hi,****
>
>  ****
>
> I am trying to enter some data (entered by caller, received by Play and
> Get Digits). But I am not able to get much information about it from mod_db
> wiki. I want to enter data in an Oracle database. Please tell me what all I
> need to do, in order to do this.****
>
>  ****
>
> Regards****
>
>  ****
>
> Nitin****
>
>  ****
> Disclaimer :- This e-mail and any attachment may contain confidential,
> proprietary or legally privileged information. If you are not the original
> intended recipient and have erroneously received this message, you are
> prohibited from using, copying, altering or disclosing the content of this
> message. Please delete it immediately and notify the sender. Newgen
> Software Technologies Ltd (NSTL) accepts no responsibilities for loss or
> damage arising from the use of the information transmitted by this email
> including damages from virus and further acknowledges that no binding
> nature of the message shall be implied or assumed unless the sender does so
> expressly with due authority of NSTL. ****
>
>  ****
>
> ** **
>  Disclaimer :- This e-mail and any attachment may contain confidential,
> proprietary or legally privileged information. If you are not the original
> intended recipient and have erroneously received this message, you are
> prohibited from using, copying, altering or disclosing the content of this
> message. Please delete it immediately and notify the sender. Newgen
> Software Technologies Ltd (NSTL) accepts no responsibilities for loss or
> damage arising from the use of the information transmitted by this email
> including damages from virus and further acknowledges that no binding
> nature of the message shall be implied or assumed unless the sender does so
> expressly with due authority of NSTL. ****
>
> ** **
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org****
>
> ** **
>
> ** **
> Disclaimer :- This e-mail and any attachment may contain confidential,
> proprietary or legally privileged information. If you are not the original
> intended recipient and have erroneously received this message, you are
> prohibited from using, copying, altering or disclosing the content of this
> message. Please delete it immediately and notify the sender. Newgen
> Software Technologies Ltd (NSTL) accepts no responsibilities for loss or
> damage arising from the use of the information transmitted by this email
> including damages from virus and further acknowledges that no binding
> nature of the message shall be implied or assumed unless the sender does so
> expressly with due authority of NSTL. ****
>
> ** **
>
> Disclaimer :- This e-mail and any attachment may contain confidential,
> proprietary or legally privileged information. If you are not the original
> intended recipient and have erroneously received this message, you are
> prohibited from using, copying, altering or disclosing the content of this
> message. Please delete it immediately and notify the sender. Newgen
> Software Technologies Ltd (NSTL) accepts no responsibilities for loss or
> damage arising from the use of the information transmitted by this email
> including damages from virus and further acknowledges that no binding
> nature of the message shall be implied or assumed unless the sender does so
> expressly with due authority of NSTL.
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121129/b74e32dc/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list