Re: [iOS][IPV6 NAT64/DNS64] Seeing "No route to Host" when sending 200 OK response to INVITE.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adding more context :

I have managed to debug all the way from ::pjsua_call_answer to the method “sendto”  (<sys/socket.h>) calledin pjlib/src/pj/sock_bsd.c

/*
 * Send data.
 */
PJ_DEF(pj_status_t) pj_sock_sendto(pj_sock_t sock,
  const void *buf,
  pj_ssize_t *len,
  unsigned flags,
  const pj_sockaddr_t *to,
  int tolen)
{
    PJ_CHECK_STACK();
    PJ_ASSERT_RETURN(len, PJ_EINVAL);

    

    CHECK_ADDR_LEN(to, tolen);

    *len = sendto(sock, (const char*)buf, (int)(*len), flags, 
  (const struct sockaddr*)to, tolen);

    if (*len < 0
return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
    else 
return PJ_SUCCESS;
}

sendto here returns -1 when trying to send 200 OK message alone in ipv6.

Thanks,
Aravind S.

 
(sendto);(sendto);


On Aug 31, 2016, at 11:55 AM, Jenkins SB <jenkinssb123@xxxxxxxxx> wrote:

Hello Guys,

I have a voip application for iOS based on pjsip 2.3.0. 

The device in question runs iOS 9.3.4 and also seem to happen on iOS 10 beta. It is connected to IPV6 wifi network created from macbook's nat64/dns64.

The client is able to register properly with our server and also has no trouble making outbound call in UDP mode ( Everything works fine in TCP ).

The trouble is with inbound call where it fails intermittently due to the following reason when responding to INVITE with 200 OK message even though it is able to send 100 TRYING successfully just before it.

pjsua_core.c  ....
Sent:
2016-07-31T16:49:32.443
<srcipv6:port> -> <dstipv6:port>
1005
SIP/2.0 200 OK Via: SIP/2.0/UDP
--end msg--
tsx0x1401d82a8  ....Error sending Response msg 200/INVITE/cseq=95989621 (tdta0x140866000): No route to host

....Transport error, terminating transaction. Err=120065 (No route to host)
pjsua_call.c  .Error sending response: No route to host [status=120065]

APIException: API call '::pjsua_call_answer( CALL_REFERENCE, PJSUA_SIP_RESPONSE_STATUS_OKAY, NULL, NULL )' failed with result code = 120065 ('No route to host')


Note that this happens only intermittently. Once an inbound call succeeds after sending 200 OK to INVITE then the subsequent calls do succeed. The problem does not exist in IPV4 networks.
I also did a packet capture and found that there is no trace of 200 OK message in it even though pjsua_core.c's trace tells otherwise as seen above. 

Sincerely welcome any inputs on how to proceed further or if there are any fixes.

Thanks,
Aravind S.

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux