/* The class */ Opal::Sip::EndPoint::EndPoint (Opal::CallManager & _manager, Ekiga::ServiceCore& core): SIPEndPoint (_manager), manager (_manager) { boost::shared_ptr<Ekiga::ChatCore> chat_core = core.get<Ekiga::ChatCore> ("chat-core"); boost::shared_ptr<Ekiga::PresenceCore> presence_core = core.get<Ekiga::PresenceCore> ("presence-core"); protocol_name = "sip"; uri_prefix = "sip:"; dialect = boost::shared_ptr<SIP::Dialect>(new SIP::Dialect (presence_core, boost::bind (&Opal::Sip::EndPoint::send_message, this, _1, _2))); chat_core->add_dialect (dialect); /* Timeouts */ SetAckTimeout (PTimeInterval (0, 32)); SetPduCleanUpTimeout (PTimeInterval (0, 1)); SetInviteTimeout (PTimeInterval (0, 60)); SetNonInviteTimeout (PTimeInterval (0, 6)); SetRetryTimeouts (500, 4000); SetMaxRetries (8); /* Update the User Agent */ SetUserAgent ("Ekiga/" PACKAGE_VERSION); /* Ready to take calls */ manager.AddRouteEntry("sip:.* = pc:*"); manager.AddRouteEntry("pc:.* = sip:<da>"); /* NAT Binding */ SetNATBindingRefreshMethod (SIPEndPoint::Options); settings = boost::shared_ptr<Ekiga::Settings> (new Ekiga::Settings (SIP_SCHEMA)); settings->changed.connect (boost::bind (&EndPoint::setup, this, _1)); }
/* The class */ Opal::Sip::EndPoint::EndPoint (Opal::CallManager & _manager, Ekiga::ServiceCore & _core, unsigned _listen_port) : SIPEndPoint (_manager), manager (_manager), core (_core), presence_core (*(dynamic_cast<Ekiga::PresenceCore *> (core.get ("presence-core")))), runtime (*(dynamic_cast<Ekiga::Runtime *> (core.get ("runtime")))), account_core (*(dynamic_cast<Ekiga::AccountCore *> (core.get ("account-core")))) { Ekiga::ChatCore* chat_core; protocol_name = "sip"; uri_prefix = "sip:"; listen_port = _listen_port; chat_core = dynamic_cast<Ekiga::ChatCore *> (core.get ("chat-core")); dialect = new SIP::Dialect (core, sigc::mem_fun (this, &Opal::Sip::EndPoint::send_message)); chat_core->add_dialect (*dialect); /* Timeouts */ SetAckTimeout (PTimeInterval (0, 32)); SetPduCleanUpTimeout (PTimeInterval (0, 1)); SetInviteTimeout (PTimeInterval (0, 6)); SetNonInviteTimeout (PTimeInterval (0, 6)); SetRetryTimeouts (500, 4000); SetMaxRetries (8); /* Start listener */ set_listen_port (listen_port); /* Update the User Agent */ SetUserAgent ("Ekiga/" PACKAGE_VERSION); /* Ready to take calls */ manager.AddRouteEntry("sip:.* = pc:<db>"); manager.AddRouteEntry("pc:.* = sip:<da>"); /* NAT Binding */ SetNATBindingRefreshMethod (SIPEndPoint::EmptyRequest); Ekiga::PersonalDetails *details = dynamic_cast<Ekiga::PersonalDetails *> (_core.get ("personal-details")); if (details) publish (*details); }
/* The class */ Opal::Sip::EndPoint::EndPoint (Opal::CallManager & _manager, Ekiga::ServiceCore& core): SIPEndPoint (_manager), manager (_manager) { boost::shared_ptr<Ekiga::ChatCore> chat_core = core.get<Ekiga::ChatCore> ("chat-core"); protocol_name = "sip"; uri_prefix = "sip:"; listen_port = gm_conf_get_int (SIP_KEY "listen_port"); listen_port = (listen_port > 0 ? listen_port : 5060); dialect = boost::shared_ptr<SIP::Dialect>(new SIP::Dialect (core, boost::bind (&Opal::Sip::EndPoint::send_message, this, _1, _2))); chat_core->add_dialect (dialect); /* Timeouts */ SetAckTimeout (PTimeInterval (0, 32)); SetPduCleanUpTimeout (PTimeInterval (0, 1)); SetInviteTimeout (PTimeInterval (0, 60)); SetNonInviteTimeout (PTimeInterval (0, 6)); SetRetryTimeouts (500, 4000); SetMaxRetries (8); /* Start listener */ set_listen_port (listen_port); /* Update the User Agent */ SetUserAgent ("Ekiga/" PACKAGE_VERSION); /* Ready to take calls */ manager.AddRouteEntry("sip:.* = pc:*"); manager.AddRouteEntry("pc:.* = sip:<da>"); /* NAT Binding */ SetNATBindingRefreshMethod (SIPEndPoint::Options); }