mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
add 'sofia global siptrace on' so we don't have to always teach people to enable sip trace on each profile
This commit is contained in:
@@ -4342,6 +4342,27 @@ void sofia_glue_restart_all_profiles(void)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void sofia_glue_global_siptrace(switch_bool_t on)
|
||||
{
|
||||
switch_hash_index_t *hi;
|
||||
const void *var;
|
||||
void *val;
|
||||
sofia_profile_t *pptr;
|
||||
|
||||
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
||||
if (mod_sofia_globals.profile_hash) {
|
||||
for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
if ((pptr = (sofia_profile_t *) val)) {
|
||||
nua_set_params(pptr->nua, TPTAG_LOG(on), TAG_END());
|
||||
}
|
||||
}
|
||||
}
|
||||
switch_mutex_unlock(mod_sofia_globals.hash_mutex);
|
||||
|
||||
}
|
||||
|
||||
void sofia_glue_del_profile(sofia_profile_t *profile)
|
||||
{
|
||||
sofia_gateway_t *gp;
|
||||
|
||||
Reference in New Issue
Block a user