Ignore:
Timestamp:
May 19, 2011 4:36:01 AM (13 years ago)
Author:
bennylp
Message:

Fixed #1259: Option to use of 100rel in UAS if UAC supports it (thanks Marcus Froeschl for the suggestion)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_call.c

    r3553 r3570  
    500500    /* Create the INVITE session: */ 
    501501    options |= PJSIP_INV_SUPPORT_100REL; 
    502     if (acc->cfg.require_100rel) 
     502    if (acc->cfg.require_100rel == PJSUA_100REL_MANDATORY) 
    503503        options |= PJSIP_INV_REQUIRE_100REL; 
    504504    if (acc->cfg.use_timer != PJSUA_SIP_TIMER_INACTIVE) { 
     
    849849    options |= PJSIP_INV_SUPPORT_100REL; 
    850850    options |= PJSIP_INV_SUPPORT_TIMER; 
    851     if (pjsua_var.acc[acc_id].cfg.require_100rel) 
     851    if (pjsua_var.acc[acc_id].cfg.require_100rel == PJSUA_100REL_MANDATORY) 
    852852        options |= PJSIP_INV_REQUIRE_100REL; 
    853853    if (pjsua_var.media_cfg.enable_ice) 
     
    930930    { 
    931931        options &= ~(PJSIP_INV_SUPPORT_TIMER); 
     932    } 
     933 
     934    /* If 100rel is optional and UAC supports it, use it. */ 
     935    if ((options & PJSIP_INV_REQUIRE_100REL)==0 && 
     936        pjsua_var.acc[acc_id].cfg.require_100rel == PJSUA_100REL_OPTIONAL) 
     937    { 
     938        const pj_str_t token = { "100rel", 6}; 
     939        pjsip_dialog_cap_status cap_status; 
     940 
     941        cap_status = pjsip_dlg_remote_has_cap(dlg, PJSIP_H_SUPPORTED, NULL, 
     942                                              &token); 
     943        if (cap_status == PJSIP_DIALOG_CAP_SUPPORTED) 
     944            options |= PJSIP_INV_REQUIRE_100REL; 
    932945    } 
    933946 
Note: See TracChangeset for help on using the changeset viewer.