Changeset 1520


Ignore:
Timestamp:
Oct 25, 2007 2:51:33 AM (17 years ago)
Author:
bennylp
Message:

Continuing ticket #400: Only process Service-Route header if enable_service_route (--service-route option in pjsua) is set

Location:
pjproject/trunk
Files:
3 edited

Legend:

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

    r1501 r1520  
    129129    puts  ("  --publish           Send presence PUBLISH for this account"); 
    130130    puts  ("  --use-100rel        Require reliable provisional response (100rel)"); 
     131    puts  ("  --service-route     Enable Service-Route processing"); 
    131132    puts  ("  --next-cred         Add another credentials"); 
    132133    puts  (""); 
     
    372373           OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY,  
    373374           OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT, 
    374            OPT_100REL, OPT_REALM, OPT_USERNAME, OPT_PASSWORD, 
     375           OPT_100REL, OPT_SERVICE_ROUTE, OPT_REALM, OPT_USERNAME, OPT_PASSWORD, 
    375376           OPT_NAMESERVER, OPT_STUN_DOMAIN, OPT_STUN_SRV, 
    376377           OPT_ADD_BUDDY, OPT_OFFER_X_MS_MSG, OPT_NO_PRESENCE, 
     
    409410        { "publish",    0, 0, OPT_PUBLISH}, 
    410411        { "use-100rel", 0, 0, OPT_100REL}, 
     412        { "service-route", 0, 0, OPT_SERVICE_ROUTE}, 
    411413        { "id",         1, 0, OPT_ID}, 
    412414        { "contact",    1, 0, OPT_CONTACT}, 
     
    635637            break; 
    636638 
     639        case OPT_SERVICE_ROUTE: /* Service-Route processing */ 
     640            cur_acc->enable_service_route = PJ_TRUE; 
     641            break; 
     642 
    637643        case OPT_ID:   /* id */ 
    638644            if (pjsua_verify_sip_url(pj_optarg) != 0) { 
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r1513 r1520  
    18891889    pj_str_t        proxy[PJSUA_ACC_MAX_PROXIES]; 
    18901890 
     1891    /** 
     1892     * Enable Service-Route processing for this account. 
     1893     */ 
     1894    pj_bool_t       enable_service_route; 
     1895 
    18911896    /**  
    18921897     * Optional interval for registration, in seconds. If the value is zero,  
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r1508 r1520  
    541541    pjsip_uri *uri[PJSUA_ACC_MAX_PROXIES]; 
    542542    unsigned i, uri_cnt = 0, rcnt; 
     543 
     544    /* Skip processing is enable_service_route is not set */ 
     545    if (!acc->cfg.enable_service_route) 
     546        return; 
    543547 
    544548    /* Find and parse Service-Route headers */ 
Note: See TracChangeset for help on using the changeset viewer.