Hello Elaine, A module function in opensips returns and integer. Based on the return value, you can test if the function was successful or not. More details here: https://www.opensips.org/Documentation/Development-Manual#toc37 Take a look at the big yellow warning at the end of documentation for the module function for how return codes are interpreted.
If you want to return a string, here’s an example: https://opensips.org/html/docs/modules/devel/dialplan.html#func_dp_translate See the out_var parameter. Hope this helps, Ovidiu On Sat, Oct 31, 2020 at 18:57 Elaine Huang <[email protected]> wrote: > I'm new to opensips and I'm wondering if it's possible for a module > function to return a string instead of integer? > > My wishful thinking is in my config: > > $var(myVar) = myFunc(params...); > # then myVar becomes a string value that I can manipulate, compare, etc > > > If this is not achievable, what's the conventional way to get a string > from a module function? Is it pseudo variable that I should use? > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- VoIP Embedded, Inc. http://www.voipembedded.com
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
