Hi Richard,

if you try to do automatically conversions, you run in several troubles:
1) first, some scripting error may be overlooked in case of differences of avp value types; with no error/warning to user; 2) to which type should you convert? to string or to int? to try first int and if not possible to string? Quite unreliable...;) 3) will complicate a lot the function...since you can apply this idea to other functions, not only to avp_check().

regards,
bogdan

Richard Z wrote:

Thanks both for the tips.

Besides timeout value, I also need to use avp_check with "and"
operator. The function complains about incompatible value if the avp
is a string value. It would be nice to convert the value automatically
and do the "and" operation.

Regards,
Richard


On 9/28/05, Bogdan-Andrei Iancu <[EMAIL PROTECTED]> wrote:
Hi Richard,

just as an add on - note that TM accepts the custom timeout values both
as integer and string. So, for this particular case, you do not need to
convert to value - just load it at auth time.
also be sure to correlate the AVP names in tm and authdb.

regards,
bogdan

Daniel-Constantin Mierla wrote:

Hello,

On 09/28/05 11:18, Richard Z wrote:

Hi,

I am trying to use load_credentials modparam in auth_db to load some
colums in the subscriber table. In mysql db table, what type should I
use the columns? For example,

modparam("auth_db", "load_credentials", "i:15=timeout")

If I define timeout as varchar, it gets the value. If as int, it
doesn't generate the avp.

Is this supposed to be this way? Do I miss anything?


at this moment only string values can be loaded via load_credentials.
You can use avp_copy() to convert from string to integer afterwards.
Ability to load int values should be introduced in the future.

Daniel

Thanks,
Richard

_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to