Changes between Initial Version and Version 4 of Ticket #1825


Ignore:
Timestamp:
Sep 9, 2015 6:21:42 AM (9 years ago)
Author:
nanang
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1825

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
    • Property Type changed from defect to enhancement
  • Ticket #1825 – Description

    initial v4  
    1 On IP Address change case, app might want to close the transport before 
    2 connecting state. 
     1On IP Address change case, app might want to close the transport before connecting state, however it is not possible to get the transport instance before registration process is finished. 
     2 
     3This ticket is mainly for getting registration transport instance before getting the registration result (via pjsua callback {{{on_reg_state}}}). 
     4 
    35Example scenario: 
    461. Connecting to network A (3G) 
     
    141611. Otherwise, transport A is never released. 
    1517 
    16 on_reg_started callback can be used for this purpose, but we need to include 
    17 pjsua_internal.h to get the transport reference. Thus new callback is needed 
    18 with the sufficient information. 
     18{{{on_reg_started}}} callback can be used for getting registration transport instance, but we need to include {{{pjsua_internal.h}}} to get account's {{{pjsip_regc}}} instance (to eventually get the registration transport). With this ticket, it can be done as follow: 
     19{{{ 
     20static void on_reg_started2(pjsua_acc_id acc_id, pjsua_reg_info *info) 
     21{ 
     22    pjsip_regc_info regc_info; 
     23    pjsip_regc_get_info(info->regc, &regc_info); 
     24 
     25    // transport instance is in 'regc_info.transport' 
     26    ... 
     27} 
     28}}}