Dear All,<div><br></div><div>In the below example from FS wiki, can I be sure that "my_callback" will be called before session.hangup() is excuted?</div><div><br></div><div>Thanks a lot</div><div><br></div><div>
Jasper</div><div><br></div><div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 15px; line-height: 22px; "><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: 1.1em; ">
use("CURL");
function my_callback(string, arg)
{
console_log("info", string);
return true;
}
if (session.ready()) {
session.answer();
var curl = new CURL();
curl.run("POST", "<a href="http://www.freeswitch.org/curltest/">http://www.freeswitch.org/curltest/</a>", "foo=bar&this=has+spaces+in+it", my_callback, "my arg\n", "user:s3cr3tpw");
session.hangup();
}</pre></span></div>