- Timestamp:
- Jun 19, 2006 12:07:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r510 r521 89 89 puts (" --proxy=url Optional URL of proxy server to visit"); 90 90 puts (" May be specified multiple times"); 91 puts (" --reg-timeout=SEC Optional registration interval (default 55)"); 91 92 puts (" --realm=string Set realm"); 92 93 puts (" --username=string Set authentication username"); 93 94 puts (" --password=string Set authentication password"); 94 puts (" -- reg-timeout=SEC Optional registration interval (default 55)");95 puts (" --next-cred Add another credentials"); 95 96 puts (""); 96 97 puts ("SIP Account Control:"); … … 112 113 puts (" --auto-loop Automatically loop incoming RTP to outgoing RTP"); 113 114 puts (" --rtp-port=N Base port to try for RTP (default=4000)"); 115 /* 114 116 puts (" --complexity=N Specify encoding complexity (0-10, default=none(-1))"); 115 117 puts (" --quality=N Specify encoding quality (0-10, default=4)"); 116 118 puts (" --ptime=MSEC Override codec ptime to MSEC (default=specific)"); 119 */ 117 120 puts (""); 118 121 puts ("Buddy List (can be more than one):"); … … 122 125 puts (" --auto-answer=code Automatically answer incoming calls with code (e.g. 200)"); 123 126 puts (" --max-calls=N Maximum number of concurrent calls (default:4, max:255)"); 127 /* 124 128 puts (" --duration=SEC Set maximum call duration (default:no limit)"); 129 */ 125 130 puts (""); 126 131 fflush(stdout); … … 238 243 OPT_PLAY_FILE, OPT_RTP_PORT, OPT_ADD_CODEC, 239 244 OPT_COMPLEXITY, OPT_QUALITY, OPT_PTIME, 240 OPT_NEXT_ACCOUNT, OPT_ MAX_CALLS,245 OPT_NEXT_ACCOUNT, OPT_NEXT_CRED, OPT_MAX_CALLS, 241 246 OPT_DURATION, 242 247 }; … … 277 282 { "ptime", 1, 0, OPT_PTIME}, 278 283 { "next-account",0,0, OPT_NEXT_ACCOUNT}, 284 { "next-cred", 0, 0, OPT_NEXT_CRED}, 279 285 { "max-calls", 1, 0, OPT_MAX_CALLS}, 280 286 { "duration",1,0, OPT_DURATION}, … … 449 455 450 456 case OPT_USERNAME: /* Default authentication user */ 451 cur_acc->cred_ count = 1;452 cur_acc->cred_info[ 0].username = pj_str(pj_optarg);457 cur_acc->cred_info[cur_acc->cred_count].username = pj_str(pj_optarg); 458 cur_acc->cred_info[cur_acc->cred_count].scheme = pj_str("digest"); 453 459 break; 454 460 455 461 case OPT_REALM: /* Default authentication realm. */ 456 cur_acc->cred_count = 1; 457 cur_acc->cred_info[0].realm = pj_str(pj_optarg); 462 cur_acc->cred_info[cur_acc->cred_count].realm = pj_str(pj_optarg); 458 463 break; 459 464 460 465 case OPT_PASSWORD: /* authentication password */ 461 cur_acc->cred_count = 1; 462 cur_acc->cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; 463 cur_acc->cred_info[0].data = pj_str(pj_optarg); 466 cur_acc->cred_info[cur_acc->cred_count].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; 467 cur_acc->cred_info[cur_acc->cred_count].data = pj_str(pj_optarg); 468 break; 469 470 case OPT_NEXT_CRED: /* next credential */ 471 cur_acc->cred_count++; 464 472 break; 465 473 … … 543 551 break; 544 552 553 /* These options were no longer valid after new pjsua */ 554 /* 545 555 case OPT_COMPLEXITY: 546 556 cfg->complexity = my_atoi(pj_optarg); … … 561 571 break; 562 572 573 case OPT_DURATION: 574 cfg->duration = my_atoi(pj_optarg); 575 break; 576 563 577 case OPT_PTIME: 564 578 cfg->ptime = my_atoi(pj_optarg); … … 569 583 } 570 584 break; 585 586 */ 571 587 572 588 case OPT_AUTO_ANSWER: … … 588 604 break; 589 605 590 case OPT_DURATION:591 cfg->duration = my_atoi(pj_optarg);592 break;593 594 606 default: 595 607 PJ_LOG(1,(THIS_FILE, "Invalid argument %s", argv[pj_optind-1])); … … 633 645 634 646 for (i=0; i<cfg->acc_cnt; ++i) { 635 if (cfg->acc_cfg[i].cred_info[0].username.slen || 636 cfg->acc_cfg[i].cred_info[0].realm.slen) 647 if (cfg->acc_cfg[i].cred_info[cfg->acc_cfg[i].cred_count].username.slen) 637 648 { 638 cfg->acc_cfg[i].cred_count = 1; 639 cfg->acc_cfg[i].cred_info[0].scheme = pj_str("digest"); 649 cfg->acc_cfg[i].cred_count++; 640 650 } 641 651 } … … 718 728 pj_strcat2(result, line); 719 729 } 730 731 if (i != acc_cfg->cred_count - 1) 732 pj_strcat2(result, "--next-cred\n"); 720 733 } 721 734
Note: See TracChangeset
for help on using the changeset viewer.