Ignore:
Timestamp:
Feb 23, 2006 1:49:28 PM (18 years ago)
Author:
bennylp
Message:

Added support for NULL frame in rtp stream, fixed bugs here and there in INVITE (e.g. dont send SDP on 180), and set version to 0.5.1.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua/pjsua_opt.c

    r222 r223  
    4242{ 
    4343    puts("Usage:"); 
    44     puts("  pjsua [options] [sip-url]"); 
     44    puts("  pjsua [options]"); 
    4545    puts(""); 
    4646    puts("  [sip-url]   Default URL to invite."); 
    4747    puts(""); 
    4848    puts("General options:"); 
     49    puts("  --help              Display this help screen"); 
     50    puts("  --version           Display version info"); 
     51    puts(""); 
     52    puts("Logging options:"); 
    4953    puts("  --config-file=file  Read the config/arguments from file."); 
    5054    puts("  --log-file=fname    Log to filename (default stderr)"); 
    5155    puts("  --log-level=N       Set log max level to N (0(none) to 6(trace))"); 
    5256    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)"); 
    7357    puts(""); 
    7458    puts("Authentication options:"); 
     
    7761    puts("  --password=string   Set authentication password"); 
    7862    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"); 
    8075    puts("  --use-stun1=host[:port]"); 
    8176    puts("  --use-stun2=host[:port]  Use STUN and set host name and port of STUN servers"); 
    8277    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):"); 
    8483    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"); 
    8788    puts(""); 
    8889    fflush(stdout); 
     
    199200           OPT_USE_STUN1, OPT_USE_STUN2,  
    200201           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}; 
    202203    struct option long_options[] = { 
    203204        { "config-file",1, 0, OPT_CONFIG_FILE}, 
     
    225226        { "auto-answer",1, 0, OPT_AUTO_ANSWER}, 
    226227        { "auto-hangup",1, 0, OPT_AUTO_HANGUP}, 
    227         { "wav-file",  1, 0, OPT_WAV_FILE}, 
     228        { "auto-play",  1, 0, OPT_AUTO_PLAY}, 
    228229        { NULL, 0, 0, 0} 
    229230    }; 
     
    410411            break; 
    411412 
    412         case OPT_WAV_FILE: 
     413        case OPT_AUTO_PLAY: 
    413414            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            } 
    414423            break; 
    415424        } 
Note: See TracChangeset for help on using the changeset viewer.