mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 13:28:31 +00:00
FS-11557: [mod_sofia] add support for RFC 7989 Session-ID header
(enable with sofia profile param rfc-7989=true) FS-11557 [mod_sofia, mod_conference, core] Add support for re-INVITE when setting Session-ID in conference after call has been answered. FS-11557 [mod_conference] Missed a spot where APP_SESSION_ID needed to be set. FS-11557: set session id for outbound (initial requests) FS-11557: [mod_sofia] rename vars and functions "session id" -> "session uuid" to reflect the real meaning for rfc7989. FS-11557: fix bug - colliding chan var names (session_id) FS-11557: check nil session uuid FS-11557 : replace CS_NEW with CS_INIT for when originating calls, generate new uuid. FS-11557: handle inbound (UAS mode, one leg) FS-11557: generic param handling and filter via new sip profile option "rfc-7989-filter", eg: <param name="rfc-7989-filter" value="logme, sec-agree, privacy" /> FS-11557: renamed chan vars (reflect meaning only for RFC7989) FS-11557: fallback to RFC7329 - "old" Session-ID FS-11557: distinguish between request and replies when we read the header (to provide compatibility with old RFC7329 - section 11 of RFC7989) FS-11557: change more vars/consts names FS-11557: move compat flag on the channel. FS-11557: add Session-ID header in REFER FS-11557: needs extra condition on received initial request FS-11557: handle NOTIFY FS-11557: support answer() in dialplan - it was sending back a 200 OK with Session-ID invalid, eg: A=NIL;B=X FS-11557: add Session-ID for NOTIFY (more cases) FS-11557: handle reply to SIP INFO (add Session-ID header) FS-11557: handle case of BYE after REFER, when the channel is destroyed already (save the uuid on sofia_private) FS-11557: handle more SIP reply cases (eg: 202 Accepted , more negative replies) FS-11557: handle ACK (UAS role) FS-11557: added "rfc-7989-force-old" profile param - to enforce old rfc7329 for the UAC role. default off. enabled with "<param name="rfc-7989-force-old" value="true" />". FS-11557: fallback to rfc7329 fixes. FS-11557: set flag CF_RFC7329_COMPAT on partner channel where needed FS-11557: fix crash (mod_conference)
This commit is contained in:
1 parent
0c13b704fc
commit
a9e634b664
6 files changed
+701
-113
No files matched your search
@@ -1911,8 +1911,8 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
|
||||
switch_channel_set_flag(channel, CF_CONFERENCE);
|
||||
|
||||
if (switch_channel_answer(channel) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Channel answer failed.\n");
|
||||
if (switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Channel pre answer failed.\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -2060,6 +2060,7 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
locked = 0;
|
||||
|
||||
switch_channel_set_variable(channel, "conference_name", conference->name);
|
||||
switch_channel_set_variable(channel, SWITCH_RFC7989_APP_SESSION_ID_VARIABLE, conference->uuid_str);
|
||||
|
||||
/* Set the minimum number of members (once you go above it you cannot go below it) */
|
||||
conference->min = 2;
|
||||
@@ -2144,6 +2145,7 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
}
|
||||
|
||||
switch_channel_set_variable(channel, "conference_name", conference->name);
|
||||
switch_channel_set_variable(channel, SWITCH_RFC7989_APP_SESSION_ID_VARIABLE, conference->uuid_str);
|
||||
|
||||
/* Set MOH from variable if not set */
|
||||
if (zstr(conference->moh_sound)) {
|
||||
@@ -2210,6 +2212,7 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
switch_channel_api_on(channel, "api_on_conference_create");
|
||||
} else { /* setup user variable */
|
||||
switch_channel_set_variable(channel, "conference_name", conference->name);
|
||||
switch_channel_set_variable(channel, SWITCH_RFC7989_APP_SESSION_ID_VARIABLE, conference->uuid_str);
|
||||
rl++;
|
||||
}
|
||||
|
||||
@@ -2223,6 +2226,12 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
mdpin = conference->mpin;
|
||||
}
|
||||
|
||||
/* Tell the channel we have a new Session-ID */
|
||||
msg.from = __FILE__;
|
||||
msg.message_id = SWITCH_MESSAGE_INDICATE_SESSION_ID;
|
||||
switch_core_session_receive_message(session, &msg);
|
||||
|
||||
switch_channel_answer(channel);
|
||||
|
||||
/* if this is not an outbound call, deal with conference pins */
|
||||
if (enforce_security && (!zstr(dpin) || !zstr(mdpin))) {
|
||||
@@ -2233,9 +2242,6 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
char *supplied_pin_value;
|
||||
|
||||
/* Answer the channel */
|
||||
switch_channel_answer(channel);
|
||||
|
||||
/* look for PIN in channel variable first. If not present or invalid revert to prompting user */
|
||||
supplied_pin_value = switch_core_strdup(conference->pool, switch_channel_get_variable(channel, "supplied_pin"));
|
||||
if (!zstr(supplied_pin_value)) {
|
||||
|
||||
Reference in new issue
Block a user