- Timestamp:
- Jun 22, 2011 8:00:20 AM (13 years ago)
- Location:
- pjproject/branches/1.x/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjsip/include/pjsua-lib/pjsua.h
r3585 r3594 604 604 605 605 606 /** 607 * Notify application when registration or unregistration has been 608 * initiated. Note that this only notifies the initial registration 609 * and unregistration. Once registration session is active, subsequent 610 * refresh will not cause this callback to be called. 611 * 612 * @param acc_id The account ID. 613 * @param renew Non-zero for registration and zero for 614 * unregistration. 615 */ 616 void (*on_reg_started)(pjsua_acc_id acc_id, pj_bool_t renew); 617 606 618 /** 607 619 * Notify application when registration status has changed. … … 2553 2565 */ 2554 2566 pjsua_call_hold_type call_hold_type; 2567 2568 2569 /** 2570 * Specify whether the account should register as soon as it is 2571 * added to the UA. Application can set this to PJ_FALSE and control 2572 * the registration manually with pjsua_acc_set_registration(). 2573 * 2574 * Default: PJ_TRUE 2575 */ 2576 pj_bool_t register_on_acc_add; 2555 2577 2556 2578 } pjsua_acc_config; -
pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_acc.c
r3591 r3594 453 453 454 454 /* If accounts has registration enabled, start registration */ 455 if (pjsua_var.acc[id].cfg.reg_uri.slen) 456 pjsua_acc_set_registration(id, PJ_TRUE); 457 else { 455 if (pjsua_var.acc[id].cfg.reg_uri.slen) { 456 if (pjsua_var.acc[id].cfg.register_on_acc_add) 457 pjsua_acc_set_registration(id, PJ_TRUE); 458 } else { 458 459 /* Otherwise subscribe to MWI, if it's enabled */ 459 460 if (pjsua_var.acc[id].cfg.mwi_enabled) … … 2010 2011 pjsip_regc_get_info(pjsua_var.acc[acc_id].regc, ®_info); 2011 2012 pjsua_var.acc[acc_id].auto_rereg.reg_tp = reg_info.transport; 2013 2014 if (pjsua_var.ua_cfg.cb.on_reg_started) { 2015 (*pjsua_var.ua_cfg.cb.on_reg_started)(acc_id, renew); 2016 } 2012 2017 } 2013 2018 -
pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_core.c
r3553 r3594 194 194 pj_list_init(&cfg->sub_hdr_list); 195 195 cfg->call_hold_type = PJSUA_CALL_HOLD_TYPE_DEFAULT; 196 cfg->register_on_acc_add = PJ_TRUE; 196 197 } 197 198
Note: See TracChangeset
for help on using the changeset viewer.