提交 f50d14a7 authored 作者: Anthony Minessale's avatar Anthony Minessale

treate no method as INVITE

上级 4f7122c8
......@@ -1204,14 +1204,17 @@ static void our_sofia_event_callback(nua_event_t event,
refer_to = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_refer_to);
if ((params = strchr(refer_to, ';'))) {
*params++ = '\0';
if ((method = switch_find_parameter(params, "method", NULL))) {
if (!strcasecmp(method, "INVITE")) {
action = "call";
} else if (!strcasecmp(method, "BYE")) {
action = "end";
} else {
action = method;
}
if (!(method = switch_find_parameter(params, "method", NULL))) {
method = strdup("INVITE");
}
if (!strcasecmp(method, "INVITE")) {
action = "call";
} else if (!strcasecmp(method, "BYE")) {
action = "end";
} else {
action = method;
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论