Asterisk log says cant resolve sip provider - yet it will ping by name

I’m a noob to the voip world but trying to understand it, Could someone look at this log and tell me what the issue is here? It appears that FreePBX box can’t resolve my SIP providers address yet at the end of the capture I ping it by name and it resolves and pings just fine.
What else could be wrong? This box worked at my home with a dynamic public IP, brought it to location (so obviously a different public dynamic IP) and it doesnt work now.

Perhaps the ATT uverse gateway is blocking this traffic?
Perhaps e4sip noticed that the IP has changed and cares?
Perhaps something else?

Blockquote
e[Kpbx*CLI>
e[0Ke[1;30m – e[0mSIP/225-00000012 is ringing

e[Kpbx*CLI>
e[0K[2018-01-18 18:25:56] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb000c3860 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:25:57] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb000c3860 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:25:59] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb000c3860 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:03] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb000c3860 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:04] ERROR[2149]: netsock2.c:305 ast_sockaddr_resolve: getaddrinfo(“sbc.e4sip.com”, “(null)”, …): Name or service not known
[2018-01-18 18:26:04] WARNING[2149]: acl.c:800 resolve_first: Unable to lookup ‘sbc.e4sip.com

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:04] ERROR[2149]: netsock2.c:305 ast_sockaddr_resolve: getaddrinfo(“sbc.e4sip.com”, “(null)”, …): Name or service not known
[2018-01-18 18:26:04] WARNING[2149]: acl.c:800 resolve_first: Unable to lookup ‘sbc.e4sip.com

e[Kpbx*CLI>
e[0Ke[1;30m – e[0mStopped music on hold on SIP/233-0000000f

e[Kpbx*CLI>
e[0Ke[1;30m == e[0mSpawn extension (macro-dial, s, 22) exited non-zero on ‘SIP/233-0000000f’ in macro ‘dial’
e[1;30m == e[0mSpawn extension (ext-group, 501, 18) exited non-zero on ‘SIP/233-0000000f’
e[1;30m – e[0mExecuting [h@ext-group:1] Macro(“SIP/233-0000000f”, “hangupcall,”) in new stack
e[1;30m – e[0mExecuting [s@macro-hangupcall:1] GotoIf(“SIP/233-0000000f”, “1?theend”) in new stack

e[Kpbx*CLI>
e[0Ke[1;30m – e[0mGoto (macro-hangupcall,s,3)

e[Kpbx*CLI>
e[0Ke[1;30m – e[0mExecuting [s@macro-hangupcall:3] ExecIf(“SIP/233-0000000f”, “0?Set(CDR(recordingfile)=)”) in new stack

e[Kpbx*CLI>
e[0Ke[1;30m – e[0mExecuting [s@macro-hangupcall:4] NoOp(“SIP/233-0000000f”, "SIP/228-00000013 monior file= ") in new stack

e[Kpbx*CLI>
e[0Ke[1;30m – e[0mExecuting [s@macro-hangupcall:5] AGI(“SIP/233-0000000f”, “attendedtransfer-rec-restart.php,SIP/228-00000013,”) in new stack

e[Kpbx*CLI>
e[0Ke[1;30m – e[0mLaunched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php

e[Kpbx*CLI>
e[0Ke[1;30m – e[0m<SIP/233-0000000f>AGI Script attendedtransfer-rec-restart.php completed, returning 0

e[Kpbx*CLI>
e[0Ke[1;30m – e[0mExecuting [s@macro-hangupcall:6] Hangup(“SIP/233-0000000f”, “”) in new stack
e[1;30m == e[0mSpawn extension (macro-hangupcall, s, 6) exited non-zero on ‘SIP/233-0000000f’ in macro ‘hangupcall’
e[1;30m == e[0mSpawn extension (ext-group, h, 1) exited non-zero on ‘SIP/233-0000000f’

e[Kpbx*CLI>
e[0Ke[1;30m == e[0mExtension Changed 233[ext-local] new state Idle for Notify User 224
e[1;30m == e[0mExtension Changed 233[ext-local] new state Idle for Notify User 223

e[Kpbx*CLI>
e[0Ke[1;30m == e[0mExtension Changed 233[ext-local] new state Idle for Notify User 222

e[Kpbx*CLI>
e[0Ke[1;30m == e[0mExtension Changed 233[ext-local] new state Idle for Notify User 232

e[Kpbx*CLI>
e[0Ke[1;30m == e[0mExtension Changed 233[ext-local] new state Idle for Notify User 225

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:07] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb000c3860 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:11] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb000c3860 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:15] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb000c3860 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:16] ERROR[2171]: netsock2.c:305 ast_sockaddr_resolve: getaddrinfo(“sbc.e4sip.com”, “(null)”, …): Name or service not known
[2018-01-18 18:26:16] WARNING[2171]: acl.c:800 resolve_first: Unable to lookup ‘sbc.e4sip.com

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:16] WARNING[2171]: acl.c:939 ast_ouraddrfor: Cannot connect to (null): Invalid argument
[2018-01-18 18:26:16] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb00041960 (len 402) to (null) returned -1: Invalid argument
[2018-01-18 18:26:16] NOTICE[2171]: chan_sip.c:15876 sip_reg_timeout: – Registration for ‘[email protected]’ timed out, trying again (Attempt #90)

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:17] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb00041960 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:18] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb00041960 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:20] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb00041960 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:24] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb00041960 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:28] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb00041960 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
e[0K[2018-01-18 18:26:32] WARNING[2171]: chan_sip.c:3785 __sip_xmit: sip_xmit of 0x7feb00041960 (len 402) to (null) returned -1: Invalid argument

e[Kpbx*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
e[0me]0;root@pbx:~a[root@pbx ~]# ping sbc.e4sip.com
PING west.e4sip.com (50.18.88.40) 56(84) bytes of data.
64 bytes from ec2-50-18-88-40.us-west-1.compute.amazonaws.com (50.18.88.40): icmp_seq=1 ttl=44 time=31.1 ms
64 bytes from ec2-50-18-88-40.us-west-1.compute.amazonaws.com (50.18.88.40): icmp_seq=2 ttl=44 time=29.2 ms
64 bytes from ec2-50-18-88-40.us-west-1.compute.amazonaws.com (50.18.88.40): icmp_seq=3 ttl=44 time=30.3 ms
64 bytes from ec2-50-18-88-40.us-west-1.compute.amazonaws.com (50.18.88.40): icmp_seq=4 ttl=44 time=30.5 ms
64 bytes from ec2-50-18-88-40.us-west-1.compute.amazonaws.com (50.18.88.40): icmp_seq=5 ttl=44 time=29.8 ms
64 bytes from ec2-50-18-88-40.us-west-1.compute.amazonaws.com (50.18.88.40): icmp_seq=6 ttl=44 time=29.4 ms
^C
west.e4sip.com ping statistics —
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 29.256/30.098/31.191/0.698 ms

Replaced the sbc.E4SIP.com URL with the IP address in the trunk settings and I can again make calls.
I don’t get it, why will the ping command resolve DNS but not asterisk?

Most likely the provider is using srv records which chan_sip asterisk doesn’t translate. Pjsip does.

But this same machine worked from my home. Different ISP though.

Reply from E4SIP

Also, our services only use A, CNAM, and PTR records. No SRV records are in place. <<
You can also connect to port 15060. This will hopefully circumvent the port filtering. <<

Where is there a setting to set this port?

port=

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.