mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-22 20:21:54 +00:00
parse out alert-info and call-info from infos
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13173 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -35,9 +35,7 @@
|
||||
*
|
||||
*/
|
||||
#include "mod_sofia.h"
|
||||
#include "sofia-sip/msg_parser.h"
|
||||
#include "sofia-sip/sip_extra.h"
|
||||
#include "sofia-sip/tport_tag.h"
|
||||
|
||||
|
||||
extern su_log_t tport_log[];
|
||||
extern su_log_t iptsec_log[];
|
||||
@@ -4010,7 +4008,8 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_RECV_INFO) == SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
sip_alert_info_t *alert_info = sip_alert_info(sip);
|
||||
|
||||
if (sip && sip->sip_content_type) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-Content-Type", sip->sip_content_type->c_type);
|
||||
}
|
||||
@@ -4046,6 +4045,16 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (sip->sip_call_info) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Call-Info", sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_call_info));
|
||||
}
|
||||
|
||||
if (alert_info) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Alert-Info", sip_header_as_string(nua_handle_home(nh), (void *) alert_info));
|
||||
}
|
||||
|
||||
|
||||
if (sip->sip_payload && sip->sip_payload->pl_data) {
|
||||
switch_event_add_body(event, "%s", sip->sip_payload->pl_data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user