[OpenSIPS-Users] Basic example of Opensips with db_text and avpops

Paul Williams blessedrdameek at yahoo.com
Fri Jul 18 14:53:18 CEST 2014


Guess I didn't look hard enough... This mailing list entry satisfies my basic needs..

[OpenSIPS-Users] Error in module permission with db_text
  
          
[OpenSIPS-Users] Error in module permission with db_text
[OpenSIPS-Users] Error in module permission with db_text Bogdan-Andrei Iancu  bogdan at voice-system.ro Mon Feb  8 18:32:54 CET 2010   
View on lists.opensips.org Preview by Yahoo  
  
 



On Thursday, July 17, 2014 5:43 PM, Paul Williams <blessedrdameek at yahoo.com> wrote:
 


Can anyone help me with a basic integration example of db_text module to store some custom data and reference that data using an AVP variable.

These are the errors received.. I know this has to do with my avp_db_load, but I wanted to make sure I set everything else up as well.


Jul 17 17:19:13 ServerName /usr/sbin/opensips[5526]: ERROR:avpops:parse_avp_db: error - bad avp flags
Jul 17 17:19:13 ServerName/usr/sbin/opensips[5526]: ERROR:avpops:fixup_db_avp: parse failed
Jul 17 17:19:13 ServerName/usr/sbin/opensips[5526]: ERROR:core:fix_actions: fixing failed (code=-1) at cfg line 214
Jul 17 17:19:13 ServerName/usr/sbin/opensips[5526]: ERROR:core:main: failed to fix configuration with err code -1


Here's my current setup.
I have a file called usr_preferences in the /etc/opensips/dbtext directory

Contents are....

id(int,auto) username(str) attribute(str) value(str)
1:1234:site1:9545551212
2:i5678:site2:7183334444



my opensipsctl file has

# database path used by dbtext or db_berkeley
DB_PATH="/etc/opensips/dbtext"



my relevant modules  and params are

loadmodule "db_text.so"
modparam("db_text", "db_mode", 1)

loadmodule "avpops.so"
modparam("avpops", "db_url", "text:///")
modparam("avpops", "avp_table", "usr_preferences")


I'm referencing as

avp_db_load("$to/username", "s:site1/usr_preferences");

Any insight would be helpful, I'm sure I'm making some silly mistakes, but I've tried numerous combinations at this point.
And yes, I've searched all over the place, but couldn't find anything that clarified exactly. I also read the docs and the book.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140718/2ac6da72/attachment-0001.htm>


More information about the Users mailing list