Changeset 1245


Ignore:
Timestamp:
May 2, 2007 11:06:11 PM (17 years ago)
Author:
bennylp
Message:

More Symbian fixes

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/config_site_sample.h

    r1244 r1245  
    4949#   define PJMEDIA_HAS_SPEEX_CODEC      0 
    5050 
    51 #   define PJSIP_MAX_PKT_LEN            8000 
     51#   define PJSIP_MAX_PKT_LEN            2000 
    5252 
    5353    /* Since we don't have threads, log buffer can use static buffer */ 
     
    6767#   define PJSIP_POOL_TSX_LEN           512 
    6868#   define PJSIP_POOL_TSX_INC           128 
     69 
     70    /* Set maximum number of dialog/transaction/calls to minimum */ 
     71#   define PJSIP_MAX_TSX_COUNT          31 
     72#   define PJSIP_MAX_DIALOG_COUNT       31 
     73#   define PJSUA_MAX_CALLS              31 
     74     
    6975#endif 
    7076 
  • pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp

    r1242 r1245  
    122122    timer_.After(iStatus, miliSeconds * 1000); 
    123123    SetActive(); 
    124  
    125     pj_assert(iStatus==KRequestPending); 
    126124} 
    127125 
  • pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp

    r1244 r1245  
    3939 
    4040#include <pjsua-lib/pjsua.h> 
     41#include <pjsua-lib/pjsua_internal.h> 
    4142#include "ua.h" 
    4243 
    4344#define THIS_FILE       "symbian_ua.cpp" 
    4445 
     46// 
     47// Account 
     48// 
     49#define HAS_SIP_ACCOUNT 0       // 0 to disable registration 
    4550#define SIP_DOMAIN      "colinux" 
    4651#define SIP_USER        "bulukucing" 
    4752#define SIP_PASSWD      "netura" 
     53 
     54// 
     55// Outbound proxy for all accounts 
     56// 
     57#define SIP_PROXY       NULL 
     58//#define SIP_PROXY     "sip:192.168.0.1" 
     59 
     60 
    4861 
    4962 
     
    115128static pj_status_t app_startup(char *url) 
    116129{ 
    117     pjsua_acc_id acc_id; 
     130    pjsua_acc_id acc_id = 0; 
    118131    pj_status_t status; 
    119132 
     
    150163        cfg.cb.on_call_state = &on_call_state; 
    151164 
     165        if (SIP_PROXY) { 
     166                cfg.outbound_proxy_cnt = 1; 
     167                cfg.outbound_proxy[0] = pj_str(SIP_PROXY); 
     168        } 
     169         
    152170        pjsua_logging_config_default(&log_cfg); 
    153171        log_cfg.console_level = 4; 
     
    157175        med_cfg.thread_cnt = 0; // Disable threading on Symbian 
    158176        med_cfg.has_ioqueue = PJ_FALSE; 
     177        med_cfg.clock_rate = 8000; 
    159178        med_cfg.ec_tail_len = 0; 
    160179         
     
    170189    { 
    171190        pjsua_transport_config cfg; 
     191        pjsua_transport_id tid; 
    172192 
    173193        pjsua_transport_config_default(&cfg); 
    174194        cfg.port = 5060; 
    175         status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, NULL); 
     195        status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, &tid); 
    176196        if (status != PJ_SUCCESS) { 
    177197                pjsua_perror(THIS_FILE, "Error creating transport", status); 
     
    179199                return status; 
    180200        } 
     201         
     202        pjsua_acc_add_local(tid, PJ_TRUE, &acc_id); 
    181203    } 
    182204 
     
    190212 
    191213    /* Register to SIP server by creating SIP account. */ 
    192     { 
     214    if (HAS_SIP_ACCOUNT) { 
    193215        pjsua_acc_config cfg; 
    194216 
     
    279301} 
    280302 
     303static void PrintMenu()  
     304{ 
     305        PJ_LOG(3, (THIS_FILE, "\n\n" 
     306                "Menu:\n" 
     307                "  d    Dump states\n" 
     308                "  D    Dump all states (detail)\n" 
     309                "  P    Dump pool factory\n" 
     310                "  h    Hangup all calls\n" 
     311                "  q    Quit\n")); 
     312} 
     313 
    281314// Implementation: called when read has completed. 
    282315void ConsoleUI::RunL()  
    283316{ 
    284317        TKeyCode kc = con_->KeyCode(); 
    285          
     318 
    286319        switch (kc) { 
    287320        case 'q': 
    288321                asw_->AsyncStop(); 
     322                break; 
     323        case 'D': 
     324        case 'd': 
     325                pjsua_dump(kc == 'D'); 
     326                Run(); 
     327                break; 
     328        case 'P': 
     329                pj_pool_factory_dump(&pjsua_var.cp.factory, PJ_TRUE); 
     330                break; 
     331        case 'h': 
     332                pjsua_call_hangup_all(); 
     333                Run(); 
    289334                break; 
    290335        default: 
     
    294339                break; 
    295340        } 
     341 
     342        PrintMenu(); 
    296343} 
    297344 
     
    302349         
    303350        // Initialize pjsua 
    304         status  = app_startup("sip:192.168.0.66:5061"); 
     351        status  = app_startup("sip:192.168.0.77"); 
    305352        if (status != PJ_SUCCESS) 
    306353                return status; 
     
    313360        con->Run(); 
    314361         
     362        PrintMenu(); 
    315363        asw->Start(); 
    316364         
Note: See TracChangeset for help on using the changeset viewer.