Our SIP trunk provider is Twilio. We have configured in Twilio the trunk “Termination Sip Uri” as “alliancemaintenance.pstn.twilio. com”, and that is what is entered in the FreePBX → Trunk → sip Settings → Outgoing → PEER Details:
host=alliancemaintenance.pstn.twilio. com
type=peer
dtmfmode=rfc2833
disallow=all
allow=ulaw
As far as I can tell, the URL resolves to Twilio’s IPs properly in DNS. I check it using MXToolBox DNS Lookup.
We have periods where we can’t call out, and I’m thinking it might be related to these messages in the Asterisk Log File:
[2019-01-30 15:02:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:02:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
[2019-01-30 15:07:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:07:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
[2019-01-30 15:12:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:12:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
These two messages will repeat every five minutes, and continue for 20 or so minutes, sometimes up to a few hours (with no other log activity mixed in).
Note: since I’m a new user, the Forum doesn’t allow me to post “links”. So each time dot-com is used in this message, I have put a space in front of the dot-com so the Forum doesn’t consider it a link.
Does anyone have any insight into this issue? Thanks.
In case it is helpful, here is a larger section of the log with the log lines before and after the period in question:
[2019-01-30 13:59:00] VERBOSE[25490][C-000001c5] pbx.c: Executing [s@crm-hangup:7] AGI("SIP/Twilio1-000003ba", "sangomacrm.agi") in new stack
[2019-01-30 13:59:00] VERBOSE[25490][C-000001c5] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-01-30 13:59:01] VERBOSE[25490][C-000001c5] res_agi.c: <SIP/Twilio1-000003ba>AGI Script sangomacrm.agi completed, returning 0
[2019-01-30 13:59:01] VERBOSE[25490][C-000001c5] pbx.c: Executing [s@crm-hangup:8] Return("SIP/Twilio1-000003ba", "") in new stack
[2019-01-30 13:59:01] VERBOSE[25490][C-000001c5] app_stack.c: Spawn extension (ext-group, h, 1) exited non-zero on 'SIP/Twilio1-000003ba'
[2019-01-30 13:59:01] VERBOSE[25490][C-000001c5] app_stack.c: SIP/Twilio1-000003ba Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2019-01-30 15:02:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:02:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
[2019-01-30 15:07:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:07:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
[2019-01-30 15:12:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:12:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
[2019-01-30 15:17:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:17:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
[2019-01-30 15:22:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:22:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
[2019-01-30 15:27:08] ERROR[11964] netsock2.c: getaddrinfo("alliancemaintenance.pstn.twilio. com", "(null)", ...): Name or service not known
[2019-01-30 15:27:08] WARNING[11964] acl.c: Unable to lookup 'alliancemaintenance.pstn.twilio. com'
[2019-01-30 15:29:09] VERBOSE[12031][C-000001c6] netsock2.c: Using SIP RTP TOS bits 184
[2019-01-30 15:29:09] VERBOSE[12031][C-000001c6] netsock2.c: Using SIP RTP CoS mark 5
[2019-01-30 15:29:09] VERBOSE[40851][C-000001c6] pbx.c: Executing [+18008508610@from-trunk:1] NoOp("SIP/Twilio0-000003bc", "Catch-All DID Match - Found +18008508610 - You probably want a DID for this.") in new stack
[2019-01-30 15:29:09] VERBOSE[40851][C-000001c6] pbx.c: Executing [+18008508610@from-trunk:2] Log("SIP/Twilio0-000003bc", "WARNING,Friendly Scanner from 54.172.60.0") in new stack
[2019-01-30 15:29:09] WARNING[40851][C-000001c6] Ext. +18008508610: Friendly Scanner from 54.172.60.0
[2019-01-30 15:29:09] VERBOSE[40851][C-000001c6] pbx.c: Executing [+18008508610@from-trunk:3] Set("SIP/Twilio0-000003bc", "__FROM_DID=+18008508610") in new stack
[2019-01-30 15:29:09] VERBOSE[40851][C-000001c6] pbx.c: Executing [+18008508610@from-trunk:4] Goto("SIP/Twilio0-000003bc", "ext-did,s,1") in new stack
[2019-01-30 15:29:09] VERBOSE[40851][C-000001c6] pbx_builtins.c: Goto (ext-did,s,1)
[2019-01-30 15:29:09] VERBOSE[40851][C-000001c6] pbx.c: Executing [s@ext-did:1] Set("SIP/Twilio0-000003bc", "__DIRECTION=INBOUND") in new stack