The problem of getting the Variable into the database is now solved! The was some integer and char mismatch in the database. Putting every used column on the same type (char) it worked!
But I am still struggling to get the AVP filled after a lookup, I have a successful match according to logging. But the AVP is not there. Regards, Met vriendelijke groet, Rik Broers Voice engineer From: [email protected] [mailto:[email protected]] On Behalf Of Rik Broers Sent: donderdag 26 september 2013 11:37 To: [email protected] Subject: [OpenSIPS-Users] avp not saved or restored. Usrloc/Registrar module Hello List, I'm having trouble getting $avp(attr) filled after the lookup("location") I do the following: On incoming register modparam("auth_db", "load_credentials", "$avp(type)=type") modparam("registrar", "attr_avp", "$avp(attr)") modparam("usrloc", "attr_column", "attr") if (is_method("REGISTER")) { xlog("Register incoming"); # authenticate the REGISTER requests if (!www_authorize("", "subscriber")) { www_challenge("", "0"); exit; } ...... $avp(attr)=$avp(type); xlog("attr avp : $avp(attr) ... type avp : $avp(type)"); if (!save("location")) sl_reply_error(); exit; } This works. It prints nicely both values in the Log but when I check the location table the ATTR column is still NULL. Also when I put it by hand on a value in the DB after Lookup("location") the AVP is still not filled.. I'm trying to have a custom value ready from DB on every incoming INVITE so I can decide on different scenario's. During invite I do the following: lookup("location","m", "$fu"); If I understand the documentation the $avp(attr) should be filled with the value provided during save. In testing I got the value during every invite with proxy_authorize (which filled $avp(type) ). Unfortunately it seems that the other end is incapable of authorizing on invites so I have to save the value during register.. What's going wrong? And is there maybe an easier module to achieve what I want? I'm using version: opensips 1.10.0-notls (x86_64/linux) Kind regards, Met vriendelijke groet, Rik Broers Voice engineer
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
