[OpenSIPS-Devel] [opensips] DB_TEXT location schema error (#617)

arovetto notifications at github.com
Wed Aug 26 09:55:24 CEST 2015


I'm trying to configure opensips (2.2 dev) to save usrlocation on a dbtext, in order to keep after a restart of opensips all the contact already registered.

I've followed the documentation but after having created dbtext, opensips fails to start with the following errors:

Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: DBG:db_text:dbt_load_file: request for table [location]
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: DBG:db_text:dbt_load_file: db is [/usr/etc/opensips/dbtext/opensips]
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: DBG:db_text:dbt_load_file: loading file [/usr/etc/opensips/dbtext/opensips/location]
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: DBG:db_text:dbt_table_new: mtime is 1440574657
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: DBG:db_text:dbt_load_file: column[0] is BIGINT!
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: DBG:db_text:dbt_load_file: error at row=0 col=0 c=a
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: ERROR:db_text:dbt_query: table 'location' does not exist!
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: ERROR:usrloc:testdb_udomain: failure in db_query
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: ERROR:usrloc:register_udomain: testing domain 'location' failed
Aug 26 09:37:57 dev2-c2m-el4 /usr/sbin/opensips[26886]: ERROR:registrar:domain_fixup: failed to register domain


It seems that the DB schema is wrong.
The following is the location file generated by the opensipsdbctl:


contact_id(long,auto) username(string) domain(string) contact(string) received(string,null) path(string,null) expires(int) q(double) callid(string) cseq(int) last_modified(int) flags(int) cflags(string,null) user_agent(string) socket(string,null) methods(int,null) sip_instance(string,null) attr(string,null)



I've tried to change the contact_id using the int type and allowing domain to accept null string:

contact_id(int,auto) username(string) domain(string,null) contact(string) received(string,null) path(string,null) expires(int) q(double) callid(string) cseq(int) last_modified(int) flags(int) cflags(string,null) user_agent(string) socket(string,null) methods(int,null) sip_instance(string,null) attr(string,null)

Using the previous schema, opensips successfully starts and contacts are written on it, but when opensips restarts, the reload fails with the following errors:

DBG:core:db_allocate_rows: allocate 16072 bytes for result rows and values at 0xb7d9b07c
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: DBG:usrloc:preload_udomain: loading records - cycle [1]
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: DBG:core:evi_param_set: adding string param
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: DBG:core:destroy_avp_list: destroying list (nil)
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: ERROR:usrloc:preload_udomain: failed to match aorhashes for user b2buaepchat1,db aorhash [0] new aorhash [170],db contactid [1376]
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: DBG:usrloc:preload_udomain: release bogus urecord
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: DBG:core:evi_param_set: adding string param
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: DBG:core:destroy_avp_list: destroying list (nil)
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: DBG:core:evi_param_set: adding string param
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: DBG:core:destroy_avp_list: destroying list (nil)
Aug 26 09:51:10 dev2-c2m-el4 /usr/sbin/opensips[432]: ERROR:usrloc:preload_udomain: failed to match aorhashes for user siprpin2,db aorhash [0] new aorhash [191],db contactid [1536]


Can you help me?

Thank you

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/617
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150826/c2822e98/attachment.htm>


More information about the Devel mailing list