[Freeswitch-users] How to get call uuid from b-leg and insert to pgsql

王聡 cong.wang.itsherpa at gmail.com
Tue Jul 9 09:44:46 UTC 2019


Hi all,

I’m trying to manage cdr in pgsql by mod_cdr_pg_csv, and I hope to record a call uuid to manage multiple recorded channels in one call.

A channel variable “variable_call_uuid” seems good to record, and I confirmed it is the correct call uuid in fs_cli by:

freeswitch at TEST-FS> uuid_getvar 67534e60-fc91-4e6b-b64e-868d5f3d8b16 call_uuid
67534e60-fc91-4e6b-b64e-868d5f3d8b16

freeswitch at TEST-FS> uuid_getvar 2ab39a17-2f8d-4ac1-81de-b32a990e55c1 call_uuid
67534e60-fc91-4e6b-b64e-868d5f3d8b16

However, when I tried to record this variable into pgsql, it turned into channels uuid in pgsql.
The followings had added into cdr_pg_csv.conf.xml:

    <field var="call_uuid”/>

But pgsql record showed:

SELECT call_uuid FROM cdr where uuid = '67534e60-fc91-4e6b-b64e-868d5f3d8b16’;
> 67534e60-fc91-4e6b-b64e-868d5f3d8b16

SELECT call_uuid FROM cdr where uuid = '2ab39a17-2f8d-4ac1-81de-b32a990e55c1’;
> 2ab39a17-2f8d-4ac1-81de-b32a990e55c1		# Which should be 67534e60-fc91-4e6b-b64e-868d5f3d8b16

Any idea or advice on this issue?

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20190709/b85c55cb/attachment.html>


More information about the FreeSWITCH-users mailing list