[Freeswitch-users] Kill, close or reset a channel that remains with "show channels count"

mszlazak at aol.com mszlazak at aol.com
Sat Apr 11 00:24:04 PDT 2009


Initially, "show" "channels count" gives "0 total."

I then spawn a session from javascript thus:

apiExecute("originate", "{id_name='" + call['Caller Name'] + "',id_number=" + call["Caller Number"] + "}sofia/gateway/spa3102PSTN/" + "1" + call["Caller Number"] + "@10.0.0.5:5061 '&javascript(reminder.js \'${id_name}\' ${id_number})'");

Next, I'd like to automatically spawn another session when my channels show "0 total" with apiExecute("show", "channels count"); 
I've set up a (loop with a msleep) to check when apiExecute("show", "channels count") becomes zero but it never does after the first call and stays at 1.
This seems to "mess-up" making the next call.

Thanks. Mark. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090411/e40e01fe/attachment-0002.html 


More information about the FreeSWITCH-users mailing list