[Freeswitch-users] Use Nibblebill with PostgreSQL

António Silva asilva at wirelessmundi.com
Thu Jan 4 09:34:28 UTC 2018


Hi,

 From the source code, mod_nibblebill.c (git 726e522434), you can still 
use both: "odbc-dsn" or "db_dsn", but the last one is deprecated, so the 
correct to use is "odbc-dsn".

1) you can set variable "nibble_rounding" to adjust rounding precision.

2) not an expert on this, but since all the queries can be custom you 
can adjust them to use variables from the dialplan to make it more 
dynamic..



On 01/04/2018 10:18 AM, igor.potjevlesch at gmail.com wrote:
>
> Hello,
>
>
> Thank you!
>
> Both db_dsn and odbc-dsn work. db-dsn fails.
>
> I keep the version with odbc-dsn because in that case I don't have the 
> warning about deprecated function for versions earlier than 1.4.2 even 
> if I run 1.6.
>
> What is the best according to you? db_dsn or odbc-dsn?
>
> I have additional questions related to nibble:
>
>  1. After hanging up the call, I see in the logs the good value:
>     "mod_nibblebill.c:590 Billing $0.000234" but some line after there
>     is another update: "mod_nibblebill.c:622 Rounding to precision
>     1.000000, total 1.000000 (0.999793 excess)". So the call is billed
>     1 instead of 0.000234.
>  2. Is it possible to setup in the db scheme different prefixes and
>     their rate? Instead of putting them raw in the dialplan or any
>     other config file?
>
> Thank you in advance for your clarification.
>
> Regards,
>
> Igor.
>
> *De :*FreeSWITCH-users 
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] *De la part de* 
> Madovsky
> *Envoyé :* mercredi 3 janvier 2018 22:18
> *À :* freeswitch-users at lists.freeswitch.org
> *Objet :* Re: [Freeswitch-users] Use Nibblebill with PostgreSQL
>
> If you compiled FS with --enable-core-odbc-support so you can use
>
> <param name="odbc-dsn" value="pgsql://hostaddr=xx.xx.xx.xx port=xxxx 
> dbname=xxx user=xxx password='xxxx' options='-c 
> client_min_messages=NOTICE' application_name='freeswitch'" />
>
> you must set odbc.ini
>
> On 1/3/2018 1:02 PM, Geoff Mina wrote:
>
>     I think the param is db-dsn. Not the underscore version.
>
>
>     On Jan 3, 2018, at 12:59 PM, Sergey Safarov <s.safarov at gmail.com
>     <mailto:s.safarov at gmail.com>> wrote:
>
>         I used connection string
>
>         <param name="db_dsn" value="pgsql://hostaddr=127.0.0.1
>         dbname=******* user=******* password=*******"/>
>
>         Sergey
>
>         ср, 3 янв. 2018 г. в 22:06, <igor.potjevlesch at gmail.com
>         <mailto:igor.potjevlesch at gmail.com>>:
>
>             Hello !
>
>             I try to connect Nibblebill directly to PostgreSQL but it
>             still fails.
>
>             I follow the documentation and setup the param like this:
>             <param name="odbc_dsn" value="pgsql://A.B.C.D
>             dbname=prepaid user=prepaid password=<hidden>"/>
>
>             When I hangup a call, the logs report the following:
>             52c8b77c-f0b8-11e7-8d19-5566a3fb77f6 2018-01-03
>             20:00:19.037333 [CRIT] mod_nibblebill.c:604 Failed to log
>             to database!
>
>             Any idea on how to proceed with FS 1.6? Thank you!
>
>             Regards,
>
>             Igor.
>
>             _________________________________________________________________________
>             Professional FreeSWITCH Consulting Services:
>             consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>             http://www.freeswitchsolutions.com
>
>             Official FreeSWITCH Sites
>             http://www.freeswitch.org
>             http://confluence.freeswitch.org
>             http://www.cluecon.com
>
>             FreeSWITCH-users mailing list
>             FreeSWITCH-users at lists.freeswitch.org
>             <mailto: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
>
>         _________________________________________________________________________
>         Professional FreeSWITCH Consulting Services:
>         consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>         http://www.freeswitchsolutions.com
>
>         Official FreeSWITCH Sites
>         http://www.freeswitch.org
>         http://confluence.freeswitch.org
>         http://www.cluecon.com
>
>         FreeSWITCH-users mailing list
>         FreeSWITCH-users at lists.freeswitch.org
>         <mailto: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
>
>
>
>
>     _________________________________________________________________________
>
>     Professional FreeSWITCH Consulting Services:
>
>     consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>
>     http://www.freeswitchsolutions.com
>
>     Official FreeSWITCH Sites
>
>     http://www.freeswitch.org
>
>     http://confluence.freeswitch.org
>
>     http://www.cluecon.com
>
>     FreeSWITCH-users mailing list
>
>     FreeSWITCH-users at lists.freeswitch.org
>     <mailto: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
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.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

-- 
Saludos / Regards / Cumprimentos
António Silva

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180104/6a4fe9ca/attachment-0001.html>


More information about the FreeSWITCH-users mailing list