Changeset 1245 for pjproject/trunk
- Timestamp:
- May 2, 2007 11:06:11 PM (18 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/config_site_sample.h
r1244 r1245 49 49 # define PJMEDIA_HAS_SPEEX_CODEC 0 50 50 51 # define PJSIP_MAX_PKT_LEN 800051 # define PJSIP_MAX_PKT_LEN 2000 52 52 53 53 /* Since we don't have threads, log buffer can use static buffer */ … … 67 67 # define PJSIP_POOL_TSX_LEN 512 68 68 # 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 69 75 #endif 70 76 -
pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp
r1242 r1245 122 122 timer_.After(iStatus, miliSeconds * 1000); 123 123 SetActive(); 124 125 pj_assert(iStatus==KRequestPending);126 124 } 127 125 -
pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
r1244 r1245 39 39 40 40 #include <pjsua-lib/pjsua.h> 41 #include <pjsua-lib/pjsua_internal.h> 41 42 #include "ua.h" 42 43 43 44 #define THIS_FILE "symbian_ua.cpp" 44 45 46 // 47 // Account 48 // 49 #define HAS_SIP_ACCOUNT 0 // 0 to disable registration 45 50 #define SIP_DOMAIN "colinux" 46 51 #define SIP_USER "bulukucing" 47 52 #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 48 61 49 62 … … 115 128 static pj_status_t app_startup(char *url) 116 129 { 117 pjsua_acc_id acc_id ;130 pjsua_acc_id acc_id = 0; 118 131 pj_status_t status; 119 132 … … 150 163 cfg.cb.on_call_state = &on_call_state; 151 164 165 if (SIP_PROXY) { 166 cfg.outbound_proxy_cnt = 1; 167 cfg.outbound_proxy[0] = pj_str(SIP_PROXY); 168 } 169 152 170 pjsua_logging_config_default(&log_cfg); 153 171 log_cfg.console_level = 4; … … 157 175 med_cfg.thread_cnt = 0; // Disable threading on Symbian 158 176 med_cfg.has_ioqueue = PJ_FALSE; 177 med_cfg.clock_rate = 8000; 159 178 med_cfg.ec_tail_len = 0; 160 179 … … 170 189 { 171 190 pjsua_transport_config cfg; 191 pjsua_transport_id tid; 172 192 173 193 pjsua_transport_config_default(&cfg); 174 194 cfg.port = 5060; 175 status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, NULL);195 status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, &tid); 176 196 if (status != PJ_SUCCESS) { 177 197 pjsua_perror(THIS_FILE, "Error creating transport", status); … … 179 199 return status; 180 200 } 201 202 pjsua_acc_add_local(tid, PJ_TRUE, &acc_id); 181 203 } 182 204 … … 190 212 191 213 /* Register to SIP server by creating SIP account. */ 192 {214 if (HAS_SIP_ACCOUNT) { 193 215 pjsua_acc_config cfg; 194 216 … … 279 301 } 280 302 303 static 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 281 314 // Implementation: called when read has completed. 282 315 void ConsoleUI::RunL() 283 316 { 284 317 TKeyCode kc = con_->KeyCode(); 285 318 286 319 switch (kc) { 287 320 case 'q': 288 321 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(); 289 334 break; 290 335 default: … … 294 339 break; 295 340 } 341 342 PrintMenu(); 296 343 } 297 344 … … 302 349 303 350 // Initialize pjsua 304 status = app_startup("sip:192.168.0. 66:5061");351 status = app_startup("sip:192.168.0.77"); 305 352 if (status != PJ_SUCCESS) 306 353 return status; … … 313 360 con->Run(); 314 361 362 PrintMenu(); 315 363 asw->Start(); 316 364
Note: See TracChangeset
for help on using the changeset viewer.