Ignore:
Timestamp:
Dec 10, 2008 4:54:16 PM (15 years ago)
Author:
bennylp
Message:

Ticket #672: Option to add custom parameters in the account Contact URI

File:
1 edited

Legend:

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

    r2371 r2373  
    178178    puts  ("  --id=url            Set the URL of local ID (used in From header)"); 
    179179    puts  ("  --contact=url       Optionally override the Contact information"); 
     180    puts  ("  --contact-params=S  Append the specified parameters S in Contact URI"); 
    180181    puts  ("  --proxy=url         Optional URL of proxy server to visit"); 
    181182    puts  ("                      May be specified multiple times"); 
     
    463464           OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY,  
    464465           OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT, 
     466           OPT_CONTACT_PARAMS, 
    465467           OPT_100REL, OPT_USE_IMS, OPT_REALM, OPT_USERNAME, OPT_PASSWORD, 
    466468           OPT_NAMESERVER, OPT_STUN_DOMAIN, OPT_STUN_SRV, 
     
    518520        { "id",         1, 0, OPT_ID}, 
    519521        { "contact",    1, 0, OPT_CONTACT}, 
     522        { "contact-params",1,0, OPT_CONTACT_PARAMS}, 
    520523        { "auto-update-nat",    1, 0, OPT_AUTO_UPDATE_NAT}, 
    521524        { "use-compact-form",   0, 0, OPT_USE_COMPACT_FORM}, 
     
    827830            break; 
    828831 
     832        case OPT_CONTACT_PARAMS: 
     833            cur_acc->contact_params = pj_str(pj_optarg); 
     834            break; 
     835 
    829836        case OPT_AUTO_UPDATE_NAT:   /* OPT_AUTO_UPDATE_NAT */ 
    830837            cur_acc->allow_contact_rewrite  = pj_strtoul(pj_cstr(&tmp, pj_optarg)); 
     
    13681375                        (int)acc_cfg->force_contact.slen,  
    13691376                        acc_cfg->force_contact.ptr); 
     1377        pj_strcat2(result, line); 
     1378    } 
     1379 
     1380    /* Contact parameters */ 
     1381    if (acc_cfg->contact_params.slen) { 
     1382        pj_ansi_sprintf(line, "--contact-params %.*s\n",  
     1383                        (int)acc_cfg->contact_params.slen,  
     1384                        acc_cfg->contact_params.ptr); 
    13701385        pj_strcat2(result, line); 
    13711386    } 
Note: See TracChangeset for help on using the changeset viewer.