Ignore:
Timestamp:
Aug 4, 2009 2:36:17 PM (15 years ago)
Author:
nanang
Message:

Ticket #930:

  • Changed semantic of pjsua_acc_config.contact_params, it is now used for specifying Contact header parameters (it was used for specifying Contact URI parameters).
  • Added a new field pjsua_acc_config.contact_uri_params, for specifying Contact URI parameters.
  • Added fields pjsua_acc_config.contact_params and pjsua_acc_config.contact_uri_params into python pjsua.
  • Updated/added option in pjsua app to specify Contact header parameters and Contact URI parameters.
File:
1 edited

Legend:

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

    r2824 r2852  
    181181    puts  ("  --id=url            Set the URL of local ID (used in From header)"); 
    182182    puts  ("  --contact=url       Optionally override the Contact information"); 
    183     puts  ("  --contact-params=S  Append the specified parameters S in Contact URI"); 
     183    puts  ("  --contact-params=S  Append the specified parameters S in Contact header"); 
     184    puts  ("  --contact-uri-params=S  Append the specified parameters S in Contact URI"); 
    184185    puts  ("  --proxy=url         Optional URL of proxy server to visit"); 
    185186    puts  ("                      May be specified multiple times"); 
     
    472473           OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY,  
    473474           OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT, 
    474            OPT_BOUND_ADDR, OPT_CONTACT_PARAMS, 
     475           OPT_BOUND_ADDR, OPT_CONTACT_PARAMS, OPT_CONTACT_URI_PARAMS, 
    475476           OPT_100REL, OPT_USE_IMS, OPT_REALM, OPT_USERNAME, OPT_PASSWORD, 
    476477           OPT_NAMESERVER, OPT_STUN_DOMAIN, OPT_STUN_SRV, 
     
    530531        { "contact",    1, 0, OPT_CONTACT}, 
    531532        { "contact-params",1,0, OPT_CONTACT_PARAMS}, 
     533        { "contact-uri-params",1,0, OPT_CONTACT_URI_PARAMS}, 
    532534        { "auto-update-nat",    1, 0, OPT_AUTO_UPDATE_NAT}, 
    533535        { "use-compact-form",   0, 0, OPT_USE_COMPACT_FORM}, 
     
    852854            break; 
    853855 
     856        case OPT_CONTACT_URI_PARAMS: 
     857            cur_acc->contact_uri_params = pj_str(pj_optarg); 
     858            break; 
     859 
    854860        case OPT_AUTO_UPDATE_NAT:   /* OPT_AUTO_UPDATE_NAT */ 
    855861            cur_acc->allow_contact_rewrite  = pj_strtoul(pj_cstr(&tmp, pj_optarg)); 
     
    14061412    } 
    14071413 
    1408     /* Contact parameters */ 
     1414    /* Contact header parameters */ 
    14091415    if (acc_cfg->contact_params.slen) { 
    14101416        pj_ansi_sprintf(line, "--contact-params %.*s\n",  
    14111417                        (int)acc_cfg->contact_params.slen,  
    14121418                        acc_cfg->contact_params.ptr); 
     1419        pj_strcat2(result, line); 
     1420    } 
     1421 
     1422    /* Contact URI parameters */ 
     1423    if (acc_cfg->contact_uri_params.slen) { 
     1424        pj_ansi_sprintf(line, "--contact-uri-params %.*s\n",  
     1425                        (int)acc_cfg->contact_uri_params.slen,  
     1426                        acc_cfg->contact_uri_params.ptr); 
    14131427        pj_strcat2(result, line); 
    14141428    } 
Note: See TracChangeset for help on using the changeset viewer.