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:
Anthony Minessale
2010-09-20 16:55:09 -05:00
parent 3b04608c2e
commit 09fa66787e
3 changed files with 45 additions and 0 deletions
+21
View File
@@ -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;