Changeset 1248 for pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
- Timestamp:
- May 3, 2007 7:56:21 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
r1246 r1248 47 47 // Destination URI (to make call, or to subscribe presence) 48 48 // 49 #define SIP_DST_URI "sip:192.168.0.7 0:5061"49 #define SIP_DST_URI "sip:192.168.0.7:5061" 50 50 51 51 // … … 53 53 // 54 54 #define HAS_SIP_ACCOUNT 0 // 0 to disable registration 55 #define SIP_DOMAIN " colinux"56 #define SIP_USER " bulukucing"57 #define SIP_PASSWD " netura"55 #define SIP_DOMAIN "server" 56 #define SIP_USER "user" 57 #define SIP_PASSWD "password" 58 58 59 59 // … … 61 61 // 62 62 #define SIP_PROXY NULL 63 //#define SIP_PROXY "sip:192.168.0.1" 63 //#define SIP_PROXY "sip:192.168.0.8" 64 65 66 // 67 // Configure nameserver if DNS SRV is to be used with both SIP 68 // or STUN (for STUN see other settings below) 69 // 70 #define NAMESERVER NULL 71 //#define NAMESERVER "62.241.163.201" 72 73 // 74 // STUN server 75 #if 0 76 // Use this to have the STUN server resolved normally 77 # define STUN_DOMAIN NULL 78 # define STUN_SERVER "stun.fwdnet.net" 79 #elif 0 80 // Use this to have the STUN server resolved with DNS SRV 81 # define STUN_DOMAIN "iptel.org" 82 # define STUN_SERVER NULL 83 #else 84 // Use this to disable STUN 85 # define STUN_DOMAIN NULL 86 # define STUN_SERVER NULL 87 #endif 88 89 // 90 // Use ICE? 91 // 92 #define USE_ICE 1 64 93 65 94 … … 94 123 g_call_id = call_id; 95 124 96 /* Automatically answer incoming calls with 200/OK*/97 pjsua_call_answer(call_id, 200, NULL, NULL);125 /* Automatically answer incoming calls with 180/Ringing */ 126 pjsua_call_answer(call_id, 180, NULL, NULL); 98 127 } 99 128 … … 110 139 if (call_id == g_call_id) 111 140 g_call_id = PJSUA_INVALID_ID; 112 } else {141 } else if (ci.state != PJSIP_INV_STATE_INCOMING) { 113 142 if (g_call_id == PJSUA_INVALID_ID) 114 143 g_call_id = call_id; … … 276 305 } 277 306 307 if (NAMESERVER) { 308 cfg.nameserver_count = 1; 309 cfg.nameserver[0] = pj_str(NAMESERVER); 310 } 311 312 if (NAMESERVER && STUN_DOMAIN) { 313 cfg.stun_domain = pj_str(STUN_DOMAIN); 314 } else if (STUN_SERVER) { 315 cfg.stun_host = pj_str(STUN_SERVER); 316 } 317 318 278 319 pjsua_logging_config_default(&log_cfg); 279 320 log_cfg.console_level = 4; … … 285 326 med_cfg.clock_rate = 8000; 286 327 med_cfg.ec_tail_len = 0; 328 med_cfg.enable_ice = USE_ICE; 287 329 288 330 status = pjsua_init(&cfg, &log_cfg, &med_cfg); … … 483 525 } 484 526 527 485 528 //////////////////////////////////////////////////////////////////////////// 486 529 int ua_main() … … 492 535 if (status != PJ_SUCCESS) 493 536 return status; 494 495 537 496 538 // Run the UI 497 539 CActiveSchedulerWait *asw = new CActiveSchedulerWait;
Note: See TracChangeset
for help on using the changeset viewer.