[SR-Users] Can you use the sr.modf() method / function to call append_branch?
J Lee
juleedev at gmail.com
Wed Dec 31 19:24:06 CET 2014
I would like to know if there's a way to do parallel forking via lua code.
So specifically, I'd like to be able to do something like this:
seturi("sip:a at example.com");
append_branch("sip:b at example.com");
append_branch("sip:c at example.com");
append_branch("sip:d at example.com");
t_relay();
except via lua, because the list of branches is dynamic. I've tried
the following:
sr.modf("append_branch","sip:10.x.x.x")
but the error message I'm getting is:
/usr/sbin/kamailio[7437]: ERROR: app_lua [app_lua_sr.c:177]:
lua_sr_modf(): function 'append_branch' is not available
Just wondering if I "should" be able to do this.
I've been reading
http://www.kamailio.org/wiki/embeddedapi/devel/lua#srtm_package but
haven't seen any references to append_branch.
The other alternative I'm looking at is to just use lua to generate
the list of destinations and pass back a hashtable of sorts to
the cfg file. Then from there I will try to loop through the hashtable
and do the append_branch command for each entry
in the table.
If you have other suggestions, I'd appreciate it.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20141231/ebe18cbb/attachment.html>
More information about the sr-users
mailing list