void IvrFactory::setupSessionTimer(AmSession* s) { if (NULL != session_timer_f) { AmSessionEventHandler* h = session_timer_f->getHandler(s); if (NULL == h) return; if(h->configure(cfg)){ ERROR("Could not configure the session timer: disabling session timers.\n"); delete h; } else { s->addHandler(h); } } }
AmSession* EchoFactory::onInvite(const AmSipRequest& req) { AmSession* s = new EchoDialog(); if (NULL != session_timer_f) { AmSessionEventHandler* h = session_timer_f->getHandler(s); if(h->configure(conf)){ ERROR("Could not configure the session timer: disabling session timers.\n"); delete h; } else { s->addHandler(h); } } return s; }