Ugh. That was a noob oversight if ever there was one. Thanks for the slap upside the head.<br>That's what I get for reading source code while trying to babysit two kids. :)<br><br>-MC<br><br><div class="gmail_quote">On Fri, May 7, 2010 at 11:21 PM, Mathieu Rene <span dir="ltr"><<a href="mailto:mrene_lists@avgs.ca">mrene_lists@avgs.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;">fsctl hupall doesnt take any arguments.<div><br></div><div>
However, the hupall api function does, see mod_commands.c:4086</div><div><br></div><div><div><div>
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>
<span style="font-size: 12px;"><div>Mathieu Rene</div><div>Avant-Garde Solutions Inc</div><div>Office: + 1 (514) 664-1044 x100</div><div>Cell: +1 (514) 664-1044 x200</div><div><a href="mailto:mrene@avgs.ca" target="_blank">mrene@avgs.ca</a></div>
<div><br></div><div><br></div></span></div></span><br>
</div><div><div class="im"><div>SWITCH_STANDARD_API(hupall_api_function)</div></div><div>{</div><div><span style="white-space: pre;">        </span>char *mycmd = NULL, *argv[3] = { 0 };</div><div><span style="white-space: pre;">        </span>int argc = 0;</div>
<div><span style="white-space: pre;">        </span>char *var = NULL;</div><div><span style="white-space: pre;">        </span>char *val = NULL;</div><div><span style="white-space: pre;">        </span>switch_call_cause_t cause = SWITCH_CAUSE_MANAGER_REQUEST;</div>
<div><br></div><div><span style="white-space: pre;">        </span>if (!zstr(cmd) && (mycmd = strdup(cmd))) {</div><div><span style="white-space: pre;">                </span>argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));</div>
<div><span style="white-space: pre;">                </span>switch_assert(argv[0]);</div><div><span style="white-space: pre;">                </span>if ((cause = switch_channel_str2cause(argv[0])) == SWITCH_CAUSE_NONE) {</div><div><span style="white-space: pre;">                        </span>cause = SWITCH_CAUSE_MANAGER_REQUEST;</div>
<div><span style="white-space: pre;">                </span>}</div><div><span style="white-space: pre;">                </span>var = argv[1];</div><div><span style="white-space: pre;">                </span>val = argv[2];</div><div><span style="white-space: pre;">        </span>}</div>
<div><br></div><div><span style="white-space: pre;">        </span>if (!val) {</div><div><span style="white-space: pre;">                </span>var = NULL;</div><div><span style="white-space: pre;">        </span>}</div><div><br></div><div><span style="white-space: pre;">        </span>if (zstr(var)) {</div>
<div><span style="white-space: pre;">                </span>switch_core_session_hupall(cause);</div><div><span style="white-space: pre;">        </span>} else {</div><div class="im"><div><span style="white-space: pre;">                </span>switch_core_session_hupall_matching_var(var, val, cause);</div>
<div><span style="white-space: pre;">        </span>}</div><div><br></div></div><div><span style="white-space: pre;">        </span>if (zstr(var)) {</div><div><span style="white-space: pre;">                </span>stream->write_function(stream, "+OK hangup all channels with cause %s\n", switch_channel_cause2str(cause));</div>
<div><span style="white-space: pre;">        </span>} else {</div><div><span style="white-space: pre;">                </span>stream->write_function(stream, "+OK hangup all channels matching [%s]=[%s] with cause: %s\n", var, val, switch_channel_cause2str(cause));</div>
<div><span style="white-space: pre;">        </span>}</div><div><br></div><div><span style="white-space: pre;">        </span>switch_safe_free(mycmd);</div><div><span style="white-space: pre;">        </span>return SWITCH_STATUS_SUCCESS;</div>
<div>}</div></div>
<br><div><div><div></div><div class="h5"><div>On 2010-05-08, at 1:44 AM, Michael Collins wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div class="h5">Guys,<br><br>I was digging through mod_commands.c to learn more about <span style="font-family: courier new,monospace;">fsctl hupall <cause> <var> <val></span> syntax. However, I don't see how the proper function ever gets executed. Here's mod_commands.c, starting at line 1478, where "fsctl" arguments are parsed:<br>
<br><span style="font-family: courier new,monospace;"> if (!strcasecmp(argv[0], "hupall")) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> arg = 1;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> switch_core_session_ctl(SCSC_HUPALL, &arg);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> stream->write_function(stream, "+OK\n");</span><br style="font-family: courier new,monospace;">
<br><br>I don't see where this:<br><br><span style="font-family: courier new,monospace;">switch_core_session_hupall_matching_var(var, val, cause); </span><br style="font-family: courier new,monospace;"><br>...ever gets called. (Same file, line 4086, inside <span style="font-family: courier new,monospace;">SWITCH_STANDARD_API(hupall_api_function)</span> defintion)<br>
<br>Did I perhaps miss something?<br><br>Thanks,<br>MC<br><input type="hidden"><input type="hidden"><div></div></div></div>
_______________________________________________<br>FreeSWITCH-dev mailing list<br><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank">FreeSWITCH-dev@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div></div></div><br>_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>