[OpenSIPS-Users] avp_db_load() & fetch multiple attribute at one time

Sujeev support1 at meewadaya.com
Tue Aug 24 15:02:04 CEST 2010


Hello Bogdan & Dave,

Yes. It works!

avp_db_load("$ruri/username", "s");
xlog("TEST: OFF LINE FORWARD TO: $avp(s:fwdoffline)\n");
xlog("TEST: BUSY FORWARD TO to: $avp(s:fwdbusy)\n");
xlog("TEST: CALL FORWARD TO : $avp(s:callfwd)\n");

On Tue, Aug 24, 2010 at 2:30 PM, Bogdan-Andrei Iancu <bogdan at voice-system.ro
> wrote:

> Hi Sujeev,
>
> you can try it:
>
> - avp_db_load("$ruri/username", "a") (see
> http://www.opensips.org/html/docs/modules/1.6.x/avpops.html#id228513)
>
> Regards,
> Bogdan
>
> Sujeev wrote:
> > Hello List,
> > Please let me know how to load multiple attribute at one time. let
> > say. my "usr_preferences" table has 3 attribute for single user (e.g
> > fwdoffline,fwdbusy,callfwd). Now I load these 3 attributes at 3 times.
> > I want to reduce DB queries :)
> >
> > I did this.
> >
> > ------>8----
> > avp_db_load("$ruri/username", "$avp(s:)");
> > xlog("TEST: OFF LINE FORWARD TO: $avp(s:fwdoffline)\n");
> > xlog("TEST: BUSY FORWARD TO to: $avp(s:fwdbusy)\n");
> > xlog("TEST: CALL FORWARD TO : $avp(s:callfwd)\n");
> > ------>8----
> > and the result was
> >
> > TEST : OFF LINE FORWARD TO: <null>
> > TEST : BUSY FORWARD TO to: <null>
> > TEST : CALL FORWARD TO : <null>
> >
> > P.S I followed
> > this http://www.mail-archive.com/users@openser.org/msg00589.html
> >
> > Thank you,
> > Sujeev
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Bootcamp
> 20 - 24 September 2010, Frankfurt, Germany
> www.voice-system.ro
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100824/a276318e/attachment.htm 


More information about the Users mailing list