Changeset 5313
- Timestamp:
- May 24, 2016 7:13:44 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/samples/pjsua2_demo.cpp
r4790 r5313 292 292 } 293 293 294 295 static void mainProg4(Endpoint &ep) throw(Error) 296 { 297 // Init library 298 EpConfig ep_cfg; 299 ep.libInit( ep_cfg ); 300 301 // Create transport 302 TransportConfig tcfg; 303 tcfg.port = 5060; 304 ep.transportCreate(PJSIP_TRANSPORT_UDP, tcfg); 305 ep.transportCreate(PJSIP_TRANSPORT_TCP, tcfg); 306 307 // Add account 308 AccountConfig acc_cfg; 309 acc_cfg.idUri = "sip:localhost"; 310 std::auto_ptr<MyAccount> acc(new MyAccount); 311 acc->create(acc_cfg); 312 313 // Start library 314 ep.libStart(); 315 std::cout << "*** PJSUA2 STARTED ***" << std::endl; 316 317 // Just wait for ENTER key 318 std::cout << "Press ENTER to quit..." << std::endl; 319 std::cin.get(); 320 } 321 322 294 323 int main() 295 324 { … … 300 329 ep.libCreate(); 301 330 302 mainProg 3(ep);331 mainProg4(ep); 303 332 ret = PJ_SUCCESS; 304 333 } catch (Error & err) {
Note: See TracChangeset
for help on using the changeset viewer.