mod_radius_cdr: Add 'Freeswitch-Other-Leg-Id' av pair

This commit is contained in:
Mathieu Rene 2011-05-05 15:21:27 -04:00
parent a5170df009
commit 18d29b4670
3 changed files with 11 additions and 0 deletions

View File

@ -146,6 +146,7 @@ static switch_status_t my_on_routing(switch_core_session_t *session)
switch_time_t callanswerdate = 0;
switch_time_t callenddate = 0;
switch_time_t calltransferdate = 0;
const char *signal_bond = NULL;
char *uuid_str;
@ -211,6 +212,14 @@ static switch_status_t my_on_routing(switch_core_session_t *session)
return SWITCH_STATUS_TERM;
}
*/
if ((signal_bond = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && !zstr(signal_bond)) {
if (rc_avpair_add(rad_config, &send, PW_FS_OTHER_LEG_ID, (void*) signal_bond, -1, PW_FS_PEC) == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "[mod_radius_cdr] Failed adding Freeswitch-Other-Leg-Id: %s\n", uuid_str);
rc_destroy(rad_config);
goto end;
}
}
profile = switch_channel_get_caller_profile(channel);

View File

@ -59,6 +59,7 @@
#define PW_FS_CALLTRANSFERDATE 22
#define PW_FS_CALLENDDATE 23
#define PW_FS_DIRECTION 24
#define PW_FS_OTHER_LEG_ID 25
#endif

View File

@ -277,6 +277,7 @@ ATTRIBUTE Freeswitch-Callanswerdate 21 string Freeswitch
ATTRIBUTE Freeswitch-Calltransferdate 22 string Freeswitch
ATTRIBUTE Freeswitch-Callenddate 23 string Freeswitch
ATTRIBUTE Freeswitch-Direction 24 string Freeswitch
ATTRIBUTE Freeswitch-Other-Leg-Id 25 string Freeswitch
#
# Freeswitch-Hangupcause