From 6ed94bdaa10cf872e0ee4fdd1d4042b7c94e89b6 Mon Sep 17 00:00:00 2001 From: Brian West Date: Sat, 22 Dec 2007 20:51:57 +0000 Subject: [PATCH] add user_agent channel var so we can cdr it if we needed git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6959 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index b2603d4a97..a4c4ab9f2b 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2276,6 +2276,10 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ if (sip->sip_subject && sip->sip_subject->g_string) { switch_channel_set_variable(channel, "sip_subject", sip->sip_subject->g_string); } + + if (sip->sip_user_agent && !switch_strlen_zero(sip->sip_user_agent->g_string)){ + switch_channel_set_variable(channel, "sip_user_agent", sip->sip_user_agent->g_string); + } if (sip->sip_via) { if (sip->sip_via->v_host) {