[OpenSIPS-Users] Using AVP_DB_Querry

Travis Manson-Drake travism at simplybits.com
Tue Oct 6 23:40:55 CEST 2015


Hello Everyone,

Hope you're all doing well,

As per the awesome suggestion of one of the users on this mailing list I have tryied using the AVP_DB_Querry function

However it doesn't look like I have it right or understand how to fully use it.

Heres what I currently have in my routing logic:

if (has_totag())

                {

                #here we check the Database to see which PBX our UAC belongs to, once Opensips get this info we store its value as a $avp variable it can later refrence in the routing logic
                avp_db_query("select PBX from pbx where CustomerContext like '%$tu%'", "$avp(PBX)");
                avp_pushto("$ru","$avp(PBX)");

                                if (loose_route())
                                {
                                                if (is_method("BYE"))
                                                {
                                                setflag(ACC_DO);
                                                setflag(ACC_FAILED);
                                                }

With that being programmed, shouldn't the $avp(PBX) be pushed to the request URI or the sip packet?

What I'm seeing is essentially nothing happening.

Can anyone give me any idea as to where I went wrong or what I may not be getting?

Any input is greatly appreciated! Thank you in advanced!

Travis Manson-Drake
Voice Systems Analyst L1
Simply Bits, LLC
Now You're Thinkin' Smart!
5225 N. Sabino Canyon Road
Tucson, AZ 85750
Phone: 520-545-0311
Fax: 520-545-7252
Support Hotline: 5205450333
www.simplybits.com<http://www.simplybits.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151006/81113e14/attachment.htm>


More information about the Users mailing list