[Freeswitch-users] PostgreSQL BDR Schema for HA

Matthew Nichols matt.nichols at westtel.com
Fri Jul 7 18:03:09 UTC 2017


Is there documentation for a PostgreSQL BDR Schema that works with FreeSWITCH HA? The closest I have found is https://gist.github.com/DigiDaz/1cfe3d5d32080a8e3d75a20bb5bc4fb5 and while the RTP streams transfer over the call/channel state and what not don't, and I get errors like this:

2017-07-07 11:42:04.296420 [DEBUG] switch_pgsql.c:415 Query (insert into channels (uuid,direction,created,created_epoch, name,state,callstate,dialplan,context,hostname,initial_cid_name,initial_cid_num,initial_ip_addr,initial_dest,initial_dialplan,initial_context) values('eac21399-ecee-40c4-a4e3-9a8f9e4aae7a','outbound','2017-07-07 11:42:04','1499449324','sofia/internal/1002 at 10.1.1.71','CS_INIT','DOWN','XML','default','VFS1','1001','1001','10.1.1.71','1002','XML','default')) returned PGRES_FATAL_ERROR
2017-07-07 11:42:04.296420 [DEBUG] switch_pgsql.c:415 Query (insert into channels (uuid,direction,created,created_epoch, name,state,callstate,dialplan,context,hostname,initial_cid_name,initial_cid_num,initial_ip_addr,initial_dest,initial_dialplan,initial_context) values('09112fab-0c0f-4ee1-9254-424af3948658','inbound','2017-07-07 11:42:04','1499449324','sofia/internal/1001 at 10.1.1.46','CS_INIT','ACTIVE','XML','default','VFS1','1001','1001','10.1.1.70','1002','XML','default')) returned PGRES_FATAL_ERROR
2017-07-07 11:42:04.296420 [ERR] switch_pgsql.c:656 Error executing query:
ERROR:  current transaction is aborted, commands ignored until end of transaction block

2017-07-07 11:42:04.496420 [DEBUG] switch_pgsql.c:415 Query (insert into calls (call_uuid,call_created,call_created_epoch,caller_uuid,callee_uuid,hostname) values ('09112fab-0c0f-4ee1-9254-424af3948658','2017-07-07 11:42:04','1499449324','09112fab-0c0f-4ee1-9254-424af3948658','eac21399-ecee-40c4-a4e3-9a8f9e4aae7a','VFS1')) returned PGRES_FATAL_ERROR
2017-07-07 11:42:04.496420 [DEBUG] switch_pgsql.c:415 Query (update channels set read_codec='G722',read_rate='16000',read_bit_rate='64000',write_codec='G722',write_rate='16000',write_bit_rate='64000' where uuid='eac21399-ecee-40c4-a4e3-9a8f9e4aae7a') returned PGRES_FATAL_ERROR
2017-07-07 11:42:04.496420 [ERR] switch_pgsql.c:656 Error executing query:
ERROR:  current transaction is aborted, commands ignored until end of transaction block


It looks like it's trying to insert into the channels/calls tables with the same UUID as before which of course doesn't work since it is a primary key. Does the primary key need to include the hostname as well (and is that only for the calls/channels tables or other tables as well?). Since BDR requires a primary key I'd like to know what FreeSWITCH expects, since it doesn't autogenerate one.



More information about the FreeSWITCH-users mailing list