提交 2d3ab6b5 authored 作者: Anthony Minessale's avatar Anthony Minessale

let you pick event type

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3169 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 900ad177
......@@ -495,6 +495,21 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t *event
if (!strncasecmp(cmd, "sendevent", 9)) {
char *ename;
strip_cr(cmd);
ename = cmd + 9;
if (*ename == '\r' || *ename == '\n') {
ename = NULL;
}
if (ename) {
switch_event_types_t etype;
if (switch_name_event(ename, &etype) == SWITCH_STATUS_SUCCESS) {
event->event_id = etype;
}
}
switch_event_fire(&event);
snprintf(reply, reply_len, "+OK");
goto done;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论