Changeset 223 for pjproject/trunk/pjsip/src/pjsua/pjsua_opt.c
- Timestamp:
- Feb 23, 2006 1:49:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua/pjsua_opt.c
r222 r223 42 42 { 43 43 puts("Usage:"); 44 puts(" pjsua [options] [sip-url]");44 puts(" pjsua [options]"); 45 45 puts(""); 46 46 puts(" [sip-url] Default URL to invite."); 47 47 puts(""); 48 48 puts("General options:"); 49 puts(" --help Display this help screen"); 50 puts(" --version Display version info"); 51 puts(""); 52 puts("Logging options:"); 49 53 puts(" --config-file=file Read the config/arguments from file."); 50 54 puts(" --log-file=fname Log to filename (default stderr)"); 51 55 puts(" --log-level=N Set log max level to N (0(none) to 6(trace))"); 52 56 puts(" --app-log-level=N Set log max level for stdout display to N"); 53 puts(" --help Display this help screen");54 puts(" --version Display version info");55 puts("");56 puts("Media options:");57 puts(" --null-audio Use NULL audio device");58 puts(" --wav-file=file Play WAV file in conference bridge");59 puts("");60 //puts("");61 //puts("User Agent options:");62 //puts(" --auto-answer=sec Auto-answer all incoming calls after sec seconds.");63 //puts(" --auto-hangup=sec Auto-hangup all calls after sec seconds.");64 puts("");65 puts("SIP options:");66 puts(" --local-port=port Set TCP/UDP port");67 puts(" --id=url Set the URL of local ID (used in From header)");68 puts(" --contact=url Override the Contact information");69 puts(" --proxy=url Set the URL of proxy server");70 puts(" --outbound=url Set the URL of outbound proxy server");71 puts(" --registrar=url Set the URL of registrar server");72 puts(" --reg-timeout=secs Set registration interval to secs (default 3600)");73 57 puts(""); 74 58 puts("Authentication options:"); … … 77 61 puts(" --password=string Set authentication password"); 78 62 puts(""); 79 puts("STUN options (all must be specified):"); 63 puts("SIP options:"); 64 puts(" --id=url Set the URL of local ID (used in From header)"); 65 puts(" --contact=url Override the Contact information"); 66 puts(" --proxy=url Set the URL of proxy server"); 67 //puts(" --outbound=url Set the URL of outbound proxy server"); 68 puts(""); 69 puts("Registration Options:"); 70 puts(" --registrar=url Set the URL of registrar server"); 71 puts(" --reg-timeout=secs Set registration interval to secs (default 3600)"); 72 puts(""); 73 puts("Transport Options:"); 74 puts(" --local-port=port Set TCP/UDP port"); 80 75 puts(" --use-stun1=host[:port]"); 81 76 puts(" --use-stun2=host[:port] Use STUN and set host name and port of STUN servers"); 82 77 puts(""); 83 puts("SIMPLE options (may be specified more than once):"); 78 puts("Media Options:"); 79 puts(" --null-audio Use NULL audio device"); 80 //puts(" --wav-file=file Play WAV file in conference bridge"); 81 puts(""); 82 puts("Buddy List (can be more than one):"); 84 83 puts(" --add-buddy url Add the specified URL to the buddy list."); 85 //puts(" --offer-x-ms-msg Offer \"x-ms-message\" in outgoing INVITE"); 86 //puts(" --no-presence Do not subscribe presence of buddies"); 84 puts(""); 85 puts("User Agent options:"); 86 puts(" --auto-answer=code Automatically answer incoming calls with code (e.g. 200)"); 87 puts(" --auto-play=file Automatically play WAVE file to incoming calls"); 87 88 puts(""); 88 89 fflush(stdout); … … 199 200 OPT_USE_STUN1, OPT_USE_STUN2, 200 201 OPT_ADD_BUDDY, OPT_OFFER_X_MS_MSG, OPT_NO_PRESENCE, 201 OPT_AUTO_ANSWER, OPT_AUTO_HANGUP, OPT_ WAV_FILE};202 OPT_AUTO_ANSWER, OPT_AUTO_HANGUP, OPT_AUTO_PLAY}; 202 203 struct option long_options[] = { 203 204 { "config-file",1, 0, OPT_CONFIG_FILE}, … … 225 226 { "auto-answer",1, 0, OPT_AUTO_ANSWER}, 226 227 { "auto-hangup",1, 0, OPT_AUTO_HANGUP}, 227 { " wav-file", 1, 0, OPT_WAV_FILE},228 { "auto-play", 1, 0, OPT_AUTO_PLAY}, 228 229 { NULL, 0, 0, 0} 229 230 }; … … 410 411 break; 411 412 412 case OPT_ WAV_FILE:413 case OPT_AUTO_PLAY: 413 414 pjsua.wav_file = optarg; 415 break; 416 417 case OPT_AUTO_ANSWER: 418 pjsua.auto_answer = atoi(optarg); 419 if (pjsua.auto_answer < 100 || pjsua.auto_answer > 699) { 420 puts("Error: invalid code in --auto-answer (expecting 100-699"); 421 return -1; 422 } 414 423 break; 415 424 }
Note: See TracChangeset
for help on using the changeset viewer.