Ignore:
Timestamp:
Nov 8, 2007 9:24:30 AM (17 years ago)
Author:
bennylp
Message:
  • Added option to send empty Authorization header in outgoing requests
  • When UAS has sent answer in reliable 1xx, do not put SDP in 2xx
  • Handle the case when UPDATE is challenged with 401/407
  • Obsolete --service-route option in pjsua
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r1543 r1561  
    118118    puts  (""); 
    119119    puts  ("SIP Account options:"); 
     120    puts  ("  --use-ims           Enable 3GPP/IMS related settings on this account"); 
    120121    puts  ("  --registrar=url     Set the URL of registrar server"); 
    121122    puts  ("  --id=url            Set the URL of local ID (used in From header)"); 
     
    129130    puts  ("  --publish           Send presence PUBLISH for this account"); 
    130131    puts  ("  --use-100rel        Require reliable provisional response (100rel)"); 
    131     puts  ("  --service-route     Enable Service-Route processing"); 
    132132    puts  ("  --next-cred         Add another credentials"); 
    133133    puts  (""); 
     
    373373           OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY,  
    374374           OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT, 
    375            OPT_100REL, OPT_SERVICE_ROUTE, OPT_REALM, OPT_USERNAME, OPT_PASSWORD, 
     375           OPT_100REL, OPT_USE_IMS, OPT_REALM, OPT_USERNAME, OPT_PASSWORD, 
    376376           OPT_NAMESERVER, OPT_STUN_DOMAIN, OPT_STUN_SRV, 
    377377           OPT_ADD_BUDDY, OPT_OFFER_X_MS_MSG, OPT_NO_PRESENCE, 
     
    410410        { "publish",    0, 0, OPT_PUBLISH}, 
    411411        { "use-100rel", 0, 0, OPT_100REL}, 
    412         { "service-route", 0, 0, OPT_SERVICE_ROUTE}, 
     412        { "use-ims",    0, 0, OPT_USE_IMS}, 
    413413        { "id",         1, 0, OPT_ID}, 
    414414        { "contact",    1, 0, OPT_CONTACT}, 
     
    637637            break; 
    638638 
    639         case OPT_SERVICE_ROUTE: /* Service-Route processing */ 
    640             cur_acc->enable_service_route = PJ_TRUE; 
     639        case OPT_USE_IMS: /* Activate IMS settings */ 
     640            cur_acc->auth_pref.initial_auth = PJ_TRUE; 
    641641            break; 
    642642 
     
    668668        case OPT_USERNAME:   /* Default authentication user */ 
    669669            cur_acc->cred_info[cur_acc->cred_count].username = pj_str(pj_optarg); 
    670             cur_acc->cred_info[cur_acc->cred_count].scheme = pj_str("digest"); 
     670            cur_acc->cred_info[cur_acc->cred_count].scheme = pj_str("Digest"); 
    671671            break; 
    672672 
     
    993993 
    994994    for (i=0; i<cfg->acc_cnt; ++i) { 
    995         if (cfg->acc_cfg[i].cred_info[cfg->acc_cfg[i].cred_count].username.slen) 
     995        pjsua_acc_config *acfg = &cfg->acc_cfg[i]; 
     996 
     997        if (acfg->cred_info[acfg->cred_count].username.slen) 
    996998        { 
    997             cfg->acc_cfg[i].cred_count++; 
     999            acfg->cred_count++; 
     1000        } 
     1001 
     1002        /* When IMS mode is enabled for the account, verify that settings 
     1003         * are okay. 
     1004         */ 
     1005        /* For now we check if IMS mode is activated by looking if 
     1006         * initial_auth is set. 
     1007         */ 
     1008        if (acfg->auth_pref.initial_auth && acfg->cred_count) { 
     1009            /* Realm must point to the real domain */ 
     1010            if (*acfg->cred_info[0].realm.ptr=='*') { 
     1011                PJ_LOG(1,(THIS_FILE,  
     1012                          "Error: cannot use '*' as realm with IMS")); 
     1013                return PJ_EINVAL; 
     1014            } 
     1015 
     1016            /* Username for authentication must be in a@b format */ 
     1017            if (strchr(acfg->cred_info[0].username.ptr, '@')==0) { 
     1018                PJ_LOG(1,(THIS_FILE,  
     1019                          "Error: Username for authentication must " 
     1020                          "be in user@domain format with IMS")); 
     1021                return PJ_EINVAL; 
     1022            } 
    9981023        } 
    9991024    } 
     
    26862711                acc_cfg.reg_uri = pj_str(registrar); 
    26872712                acc_cfg.cred_count = 1; 
    2688                 acc_cfg.cred_info[0].scheme = pj_str("digest"); 
     2713                acc_cfg.cred_info[0].scheme = pj_str("Digest"); 
    26892714                acc_cfg.cred_info[0].realm = pj_str(realm); 
    26902715                acc_cfg.cred_info[0].username = pj_str(uname); 
Note: See TracChangeset for help on using the changeset viewer.