mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
expand last patch to do hold as well and rename the command to uuid_phone_event
This commit is contained in:
committed by
Brian West
parent
33c05ead16
commit
d265cbfce4
@@ -1496,9 +1496,17 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
}
|
||||
break;
|
||||
|
||||
case SWITCH_MESSAGE_INDICATE_AUTOANSWER:
|
||||
case SWITCH_MESSAGE_INDICATE_PHONE_EVENT:
|
||||
{
|
||||
nua_notify(tech_pvt->nh, NUTAG_NEWSUB(1), NUTAG_SUBSTATE(nua_substate_active), SIPTAG_EVENT_STR("talk"), TAG_END());
|
||||
const char *event = "talk";
|
||||
if (!zstr(msg->string_arg) && strcasecmp(msg->string_arg, event)) {
|
||||
if (!strcasecmp(msg->string_arg, "hold")) {
|
||||
event = "hold";
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Invalid event.\n");
|
||||
}
|
||||
}
|
||||
nua_notify(tech_pvt->nh, NUTAG_NEWSUB(1), NUTAG_SUBSTATE(nua_substate_active), SIPTAG_EVENT_STR(event), TAG_END());
|
||||
}
|
||||
break;
|
||||
case SWITCH_MESSAGE_INDICATE_SIMPLIFY:
|
||||
|
||||
Reference in New Issue
Block a user