Correction, the error is actually: ERROR: avpops [avpops_impl.c:123]: dbrow2avp(): wrong field types in dbrow
> Sent: Monday, July 31, 2017 at 10:55 AM > From: "hdssdsdsdsfsdf hdssdsdsdsfsdf" <[email protected]> > To: [email protected] > Cc: "Kamailio (SER) - Users Mailing List" <[email protected]> > Subject: Re: [SR-Users] error using avp_db_load with mongodb > > Thanks, I changed that, but that doesn't deal with the original problem. > > I still have the situation where I've two mongodb entries that are completely > similar: > { "_id" : ObjectId("597b5698e498421a40458dc3"), "uuid" : "", "attribute" : > "email", "value" : "sip:[email protected]", "type" : 0, "username" : "555", > "domain" : null } > { "_id" : ObjectId("597b5d9a61d1521f067391ae"), "uuid" : "", "attribute" : > "email", "value" : "sip:[email protected]", "type" : 0, "username" : "666", > "domain" : null } > > with: > avp_db_load("$tu/username", "$avp(s:email)") > > succeeding on the first entry (when $tu contains 555) and failing on the > second entry (when $tu contains 666), with error message: > > ERROR: <core> [usr_avp.c:424]: search_avp(): 0 ID or NULL NAME AVP! > > > > Sent: Monday, July 31, 2017 at 9:10 AM > > From: "Sebastian Damm" <[email protected]> > > To: "Kamailio (SER) - Users Mailing List" <[email protected]> > > Subject: Re: [SR-Users] error using avp_db_load with mongodb > > > > Hi, > > > > On Fri, Jul 28, 2017 at 6:03 PM, hdssdsdsdsfsdf hdssdsdsdsfsdf > > <[email protected]> wrote: > > > if (avp_db_load("$to/username", "$avp(s:email)")) > > > { > > > xlog("bla02"); > > > } > > > > $to is not a valid pseudo variable. You probably want to replace > > "$to/username" by "$tU" or "$rU" or some variable where the user you > > are searching is written in the SIP packet. > > > > BR > > Sebastian > > > > _______________________________________________ > > Kamailio (SER) - Users Mailing List > > [email protected] > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > _______________________________________________ > Kamailio (SER) - Users Mailing List > [email protected] > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > _______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
