From 2d856f8f7cef71ca26a8f9f9948bf3fa71e05b88 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 29 Apr 2011 17:13:09 -0500 Subject: [PATCH] FS-3276 --resolve please attach the diff next time, do not paste it into the comment. It ruins the formatting. Also I changed the patch so the variable names refelect what is being harvested namely sip_bye_content_type and sip_bye_payload --- src/mod/endpoints/mod_sofia/sofia.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 54e95f2b2e..3682260809 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -519,6 +519,14 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status, cause = sofia_glue_sip_cause_to_freeswitch(status); } + if (sip->sip_content_type && sip->sip_content_type->c_type) { + switch_channel_set_variable(channel, "sip_bye_content_type", sip->sip_content_type->c_type); + } + + if (sip->sip_payload && sip->sip_payload->pl_data) { + switch_channel_set_variable(channel, "sip_bye_payload", sip->sip_payload->pl_data); + } + switch_snprintf(st, sizeof(st), "%d", status); switch_channel_set_variable(channel, "sip_term_status", st); switch_snprintf(st, sizeof(st), "sip:%d", status);