iOS 11.2.5中的PJSIP IPv6注册问题

时间:2018-02-11 16:39:19

标签: sip voip ipv6 pjsip ios11.2

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中,我们观察到pjsua_acc_add正在IPv6上发生,当我们连接到IPv6 wifi时,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.

0 个答案:

没有答案