Correction to commit 0ba59aa6c2 using the correct variable in tel uri param parsing for mod_sofia

This commit is contained in:
William King 2014-04-29 15:22:38 -07:00
parent 529099f15c
commit af32ca00e3
1 changed files with 2 additions and 2 deletions

View File

@ -8777,14 +8777,14 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
} else { } else {
int argc2 = 0; int argc2 = 0;
char *argv2[2] = { 0 }; char *argv2[2] = { 0 };
if ((argc2 = switch_separate_string(argv1[x1], '=', argv2, (sizeof(argv2) / sizeof(argv2[0]))))) { if ((argc2 = switch_separate_string(argv1[x1], '=', argv2, (sizeof(argv2) / sizeof(argv2[0])))) == 2) {
char *var_name = NULL; char *var_name = NULL;
var_name = switch_mprintf("sip_invite_%s", argv2[0]); var_name = switch_mprintf("sip_invite_%s", argv2[0]);
switch_channel_set_variable(channel, var_name, argv2[1]); switch_channel_set_variable(channel, var_name, argv2[1]);
switch_safe_free( var_name ); switch_safe_free( var_name );
} else { } else {
char *var_name = NULL; char *var_name = NULL;
var_name = switch_mprintf("sip_invite_%s", argv2[0]); var_name = switch_mprintf("sip_invite_%s", argv1[x1]);
switch_channel_set_variable(channel, var_name, "true"); switch_channel_set_variable(channel, var_name, "true");
switch_safe_free( var_name ); switch_safe_free( var_name );
} }