[Freeswitch-users] PG CDR database setup
Ahmed Sboor
ahmed at netelsat.net
Sun Apr 17 13:32:25 MSD 2016
Hi
it seems you created database with postgres user and not with "Dbuser" .
Either connect the database with user "postgres" in cdr_pg_csv.xml or grant
permission to database for "Dbuser" .
in pg_hba.conf let the host entry as trust for now . (will eliminate the
confusion with password part ).
regards
Ahmed
On Sun, Apr 17, 2016 at 1:50 PM, jungle Boogie <jungleboogie0 at gmail.com>
wrote:
> Hi All,
>
> So last week I was able to get freeswitch working with postgres!
> thanks all that responded in this thread:
>
> http://lists.freeswitch.org/pipermail/freeswitch-users/2016-April/119827.html
>
> Now I'd like to have CDR records recorded to a postgres database table as
> per:
> https://freeswitch.org/confluence/display/FREESWITCH/mod_cdr_pg_csv
>
> conf/autoload_configs/cdr_pg_csv.conf.xml:
> <param name="db-info" value="host=localhost dbname=freeswitchcdr
> user=DBuser password=xxx connect_timeout=10" />
>
> In that same file, I have ab legs and all of the schema enabled.
>
> I created my table with this sample:
>
> https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/src/mod/event_handlers/mod_cdr_pg_csv/scripts/create.sql
>
> I've made a few calls and yet, the database is empty:
> select * from cdr;
> id | local_ip_v4 | caller_id_name | caller_id_number |
> destination_number | context | start_stamp | answer_stamp | end_stamp
> | duration | billsec | hangup_cause | uuid | bleg_uuid | accountcode |
> read_codec | write_codec | sip_hangup_disp
> osition | ani
>
> ----+-------------+----------------+------------------+--------------------+---------+-------------+--------------+-----------+----------+---------+--------------+------+-----------+-------------+------------+-------------+----------------
> --------+-----
> (0 rows)
>
>
> I see this in the FS logs:
> 2016-04-17 08:44:13.904128 [CRIT] mod_cdr_pg_csv.c:274 INSERT command
> failed: ERROR: permission denied for relation cdr
>
> My username and password above are exactly the same on the database
> I modified pg_hba.conf to have trust and md5. Should it only be one or
> the other?
>
> Thanks!
>
>
> --
> -------
> inum: 883510009027723
> sip: jungleboogie at sip2sip.info
> xmpp: jungle-boogie at jit.si
>
> _________________________________________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160417/6dba2a3c/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list