<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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 class="Apple-style-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; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><span class="Apple-style-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">mrene@avgs.ca</a></div><div><br></div><div><br></div></span></div></span><br class="Apple-interchange-newline">
</div><div><div>SWITCH_STANDARD_API(hupall_api_function)</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>char *mycmd = NULL, *argv[3] = { 0 };</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int argc = 0;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>char *var = NULL;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>char *val = NULL;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>switch_call_cause_t cause = SWITCH_CAUSE_MANAGER_REQUEST;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (!zstr(cmd) && (mycmd = strdup(cmd))) {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>switch_assert(argv[0]);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>if ((cause = switch_channel_str2cause(argv[0])) == SWITCH_CAUSE_NONE) {</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>cause = SWITCH_CAUSE_MANAGER_REQUEST;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>var = argv[1];</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>val = argv[2];</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (!val) {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>var = NULL;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (zstr(var)) {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>switch_core_session_hupall(cause);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>} else {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>switch_core_session_hupall_matching_var(var, val, cause);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (zstr(var)) {</div><div><span class="Apple-tab-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 class="Apple-tab-span" style="white-space:pre">        </span>} else {</div><div><span class="Apple-tab-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 class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>switch_safe_free(mycmd);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>return SWITCH_STATUS_SUCCESS;</div><div>}</div></div>
<br><div><div>On 2010-05-08, at 1:44 AM, Michael Collins wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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 id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"></div>
_______________________________________________<br>FreeSWITCH-dev mailing list<br><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev<br>http://www.freeswitch.org<br></blockquote></div><br></div></div></body></html>