1
We have integrated PJSIP based SDK in our app and We are doing registration two times at the time of app launch. 

First time with "SIP EndpointId, Pwd" 

    status = pjsua_acc_add(&acc_cfg, PJ_TRUE, &acc_id);
    NSLog(@"Status of registration, %d", status);
    if (status == PJ_SUCCESS) {
         //Registration success
    }

Second with "Apple Token"

    pj_str_t name = pj_str("AppleToken");
    pj_str_t value = pj_str((char*)[hexToken UTF8String]);
    pjsip_generic_string_hdr_init2(&CustomHeader, &name, &value);

    pj_str_t ipv6Key = pj_str("X-IPv6IOSSDK");
    pj_str_t ipv6Value = pj_str("True");
    pjsip_generic_string_hdr_init2(&Ipv6Header, &ipv6Key, &ipv6Value);

    pjsua_acc_get_config(acc_id, app_config.pool,&acc_cfg);

    pj_list_push_back(&acc_cfg.reg_hdr_list, &CustomHeader);

    pj_strcpy2(&contactparam,";app_id=");
    pj_strcat (&contactparam,&value);

    acc_cfg.contact_uri_params = contactparam;

    pj_status_t status = pjsua_acc_modify(acc_id, &acc_cfg);
    if (status != PJ_SUCCESS){

    } 

我们在这里面临的问题是:

在 iOS 10.3 中,当我们连接到 IPv4 和 IPv6 网络时,pjsua_acc_add 和 pjsua_acc_modify 都正常运行。

iOS 10+

IPv4 Wifi -----> Working fine

    a) Registration with (EndpointId, Password) ---> Going on IPv4 Wifi
    b) Modifying account registration with Token ---> Going on IPv4 

IPv6 Wifi -----> Working fine

  a) Registration with (EndpointId, Password) ---> Going on IPv6
  b) Modifying account registration with Token ---> Going on IPv6

然而,在 iOS 11.2.5 中,当我们连接到 IPv6 wifi 时,我们观察到 pjsua_acc_add 发生在 IPv6 上,而 pjsua_acc_modify 发生在 IPv4 上。

iOS11+(We have tested on iOS 11.2.5 with 4 different devices. It is happening with all devices )

IPv4 Wifi-----> Working fine

   a) Registration with (EndpointId, Password) ---> Going on IPv4 Network
   b) Modifying account registration with Token ---> Going on IPv4

IPv6 Wifi -----> Not able to Modify account

  a) Registration with (EndpointId, Password) ---> Going on IPv6
  b) Modifying account registration with Token---> Going on IPv4

Eventually, second registration(modifation) generating 'onRegistrationFailed' event.
4

0 回答 0