Hello Juha, On 11/16/08 00:52, Juha Heinanen wrote: > Klaus Darilion writes: > > > can you work around it by using pseudo variables? > > klaus, > > i tried to implement http_query function like this: > > http_query(page, params, pvar) > > where result of the query would be assigned to pvar. > > i could not do it, because i didn't find a function in pvar.h that would > allow me to assign a generic pvar (avp or script variable or core > variable like $ru) a string value. > > also, i didn't find any example functions in modules that i use, where > such a thing would have been done. > > so unless someone can give me a pointer to an example, i have to stick > to the less generic version of this function that always assigns the > result to request uri. > > > e.g. $br = http_query(...); > > this won't work either, because according to my knowledge, module > functions return an integer (status) value. > indeed, the functions exported by modules return integers with special meanings: http://www.asipto.com/pub/kamailio-devel-guide/#c16return_values
The PV spec includes inside the structure the pointer to set function. The group modules has a function get_user_group() that sets to a PV an integer value -- just as example to start -- also, action.c has do_assign() using same mechanism. Cheers, Daniel -- Daniel-Constantin Mierla http://www.asipto.com _______________________________________________ Devel mailing list [email protected] http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
