Asterisk Error: "Network is unreachable"

Hello,

I am working on a device with asterisk 13. I manually configured asterisk and it is working fine. My device has ethernet and wifi connectivity.

Currently, my device is connected to the wifi and it is functioning well.
However, in asterisk terminal, I am seeing following error and warning.

[Jul 27 17:31:52] WARNING[14901]: chan_sip.c:3775 __sip_xmit: sip_xmit of 0xead0d8 (len 558) to 54.172.60.3:5060 returned -2: Network is unreachable
[Jul 27 17:31:52] ERROR[14901]: chan_sip.c:4267 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
[Jul 27 17:31:57] WARNING[14901]: chan_sip.c:29898 sip_send_keepalive: sip_send_keepalive to 54.172.60.3:5060 returned -2: Network is unreachable
[Jul 27 17:32:12] WARNING[14901]: chan_sip.c:3775 __sip_xmit: sip_xmit of 0xebc078 (len 558) to 54.172.60.3:5060 returned -2: Network is unreachable
[Jul 27 17:32:12] ERROR[14901]: chan_sip.c:4267 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
[Jul 27 17:32:32] WARNING[14901]: chan_sip.c:3775 __sip_xmit: sip_xmit of 0xebc078 (len 558) to 54.172.60.3:5060 returned -2: Network is unreachable
[Jul 27 17:32:32] ERROR[14901]: chan_sip.c:4267 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
[Jul 27 17:32:42] WARNING[14901]: chan_sip.c:29898 sip_send_keepalive: sip_send_keepalive to 54.172.60.3:5060 returned -2: Network is unreachable
[Jul 27 17:32:52] WARNING[14901]: chan_sip.c:3775 __sip_xmit: sip_xmit of 0xebc078 (len 558) to 54.172.60.3:5060 returned -2: Network is unreachable
[Jul 27 17:32:52] ERROR[14901]: chan_sip.c:4267 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data

I tested network on the device by pinging the different IP address and it was working.
Also, I can make the call and receive the call perfectly fine but don’t know why am I getting this error and warnings.

My sip settings,

[phone]
host=q123.sip.us1.twilio.com
secret=12345qwertyabcd
defaultuser=usr4
fromuser=usr4
fromdomain=q123.sip.us1.twilio.com
insecure=port,invite
type=peer
allow=gsm,ulaw,alaw
dtmfmod=rfc2833
qualify=yes
canreinvite=nonat
nat=yes
keepalive=45
trustrpid=yes
sendrpid=yes
context=incoming-context
alwaysauthreject=yes
srvlookup=yes
mailbox=1001@vm_setup
tos_sip=cs3
tos_audio=ef

Can somebody please tell me the reason?

Thanks.

The message means what its says, and is simply the error reported by the operating system.

You would probably need to look at the actual packets to understand what is going wrong.