Ignore:
Timestamp:
May 3, 2007 7:56:21 PM (17 years ago)
Author:
bennylp
Message:

Misc Symbian fixes, looks good

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp

    r1246 r1248  
    4747// Destination URI (to make call, or to subscribe presence) 
    4848// 
    49 #define SIP_DST_URI     "sip:192.168.0.70:5061" 
     49#define SIP_DST_URI     "sip:192.168.0.7:5061" 
    5050 
    5151// 
     
    5353// 
    5454#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" 
    5858 
    5959// 
     
    6161// 
    6262#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 
    6493 
    6594 
     
    94123    g_call_id = call_id; 
    95124     
    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); 
    98127} 
    99128 
     
    110139        if (call_id == g_call_id) 
    111140            g_call_id = PJSUA_INVALID_ID; 
    112     } else { 
     141    } else if (ci.state != PJSIP_INV_STATE_INCOMING) { 
    113142        if (g_call_id == PJSUA_INVALID_ID) 
    114143            g_call_id = call_id; 
     
    276305        } 
    277306         
     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         
    278319        pjsua_logging_config_default(&log_cfg); 
    279320        log_cfg.console_level = 4; 
     
    285326        med_cfg.clock_rate = 8000; 
    286327        med_cfg.ec_tail_len = 0; 
     328        med_cfg.enable_ice = USE_ICE; 
    287329         
    288330        status = pjsua_init(&cfg, &log_cfg, &med_cfg); 
     
    483525} 
    484526 
     527 
    485528//////////////////////////////////////////////////////////////////////////// 
    486529int ua_main()  
     
    492535        if (status != PJ_SUCCESS) 
    493536                return status; 
    494          
    495          
     537 
    496538        // Run the UI 
    497539        CActiveSchedulerWait *asw = new CActiveSchedulerWait; 
Note: See TracChangeset for help on using the changeset viewer.