[Home]

Summary:ASTERISK-16846: [patch] [branch] IAX2 on Realtime doesn't resolv DNS lookups
Reporter:Alexandre Keller (alexandrekeller)Labels:
Date Opened:2010-10-21 20:43:00Date Closed:2015-02-25 23:14:44.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) issue_0018183_full_log
Description:I've been using Asterisk 1.6.2 with Realtime.

Today I installed a new machine with Asterisk 1.8.0 and use the same Database for Realtime.

Everything works just fine on Asterisk 1.6.2, I mean when I sent a call to a provider using IAX2 protocol it works just fine, but the same doesn't happen on Asterisk 1.8.0, only on Realtime.

I put the same parameters on iax.conf and it's worked just fine.

****** ADDITIONAL INFORMATION ******

Here are the Debug from Asterisk 1.8.0. I have changed the name of the provider to IAXPROVIDER.

[Oct 21 23:37:12] DEBUG[5489]: pbx.c:4059 pbx_extension_helper: Launching 'Dial'
[Oct 21 23:37:12]     -- Executing [s@externas:45] Dial("IAX2/3701-923", "IAX2/IAXPROVIDER/554730565620,30,TWS(600)") in new stack
Oct 21 23:37:12]     -- Setting call duration limit to 600.000 seconds.
[Oct 21 23:37:12] DEBUG[5489]: res_config_mysql.c:1625 mysql_reconnect: MySQL RealTime: Connection okay.
[Oct 21 23:37:12] DEBUG[5489]: res_config_mysql.c:380 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM ast_iax WHERE name = 'IAXPROVIDER' AND host = 'dynamic'
[Oct 21 23:37:12] DEBUG[5489]: res_config_mysql.c:1625 mysql_reconnect: MySQL RealTime: Connection okay.
[Oct 21 23:37:12] DEBUG[5489]: res_config_mysql.c:380 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM ast_iax WHERE name = 'IAXPROVIDER'
[Oct 21 23:37:12] DEBUG[5489]: chan_iax2.c:12295 build_peer: Not an IPv4 nor IPv6 address, cannot set port.
[Oct 21 23:37:12]        > doing dnsmgr_lookup for 'voip.IAXPROVIDER.com.br'
[Oct 21 23:37:12] DEBUG[5489]: netsock2.c:125 ast_sockaddr_split_hostport: Splitting 'voip.IAXPROVIDER.com.br' gives...
[Oct 21 23:37:12] DEBUG[5489]: netsock2.c:155 ast_sockaddr_split_hostport: ...host 'voip.IAXPROVIDER.com.br' and port '(null)'.
[Oct 21 23:37:12] DEBUG[5489]: netsock2.c:125 ast_sockaddr_split_hostport: Splitting '' gives...
[Oct 21 23:37:12] DEBUG[5489]: netsock2.c:155 ast_sockaddr_split_hostport: ...host '' and port '(null)'.
[Oct 21 23:37:12] ERROR[5489]: netsock2.c:245 ast_sockaddr_resolve: getaddrinfo("", "(null)", ...): Name or service not known
[Oct 21 23:37:12] WARNING[5489]: acl.c:569 resolve_first: Unable to lookup ''
[Oct 21 23:37:12] DEBUG[5489]: netsock2.c:125 ast_sockaddr_split_hostport: Splitting 'IAXPROVIDER' gives...
[Oct 21 23:37:12] DEBUG[5489]: netsock2.c:155 ast_sockaddr_split_hostport: ...host 'IAXPROVIDER' and port '(null)'.
[Oct 21 23:37:13] ERROR[5489]: netsock2.c:245 ast_sockaddr_resolve: getaddrinfo("IAXPROVIDER", "(null)", ...): Name or service not known
[Oct 21 23:37:13] WARNING[5489]: acl.c:569 resolve_first: Unable to lookup 'IAXPROVIDER'
[Oct 21 23:37:13] WARNING[5489]: chan_iax2.c:4551 create_addr: No such host: IAXPROVIDER
[Oct 21 23:37:13] WARNING[5489]: app_dial.c:2030 dial_exec_full: Unable to create channel of type 'IAX2' (cause 20 - Unknown)
[Oct 21 23:37:13]   == Everyone is busy/congested at this time (1:0/0/1)
Comments:By: Paul Belanger (pabelanger) 2010-10-22 08:51:51

confirmed, was able to reproduce.

By: Paul Belanger (pabelanger) 2010-10-22 15:20:13

Do you mind trying the following branch?

http://svn.asterisk.org/svn/asterisk/team/pabelanger/issue18183/

By: Alexandre Keller (alexandrekeller) 2010-10-23 05:56:42

Hi there.

Same thing happenned.

[Oct 22 10:04:51]     -- Executing [s@externas:44] Dial("IAX2/3701-6633", "IAX2/IAXPROVIDER/554730565620,30,S(600)") in new stack
[Oct 22 10:04:51]     -- Setting call duration limit to 600.000 seconds.
[Oct 22 10:04:51] DEBUG[21749]: res_config_mysql.c:1625 mysql_reconnect: MySQL RealTime: Connection okay.
[Oct 22 10:04:51] DEBUG[21749]: res_config_mysql.c:380 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM ast_iax WHERE name = 'IAXPROVIDER' AND host = 'dynamic'
[Oct 22 10:04:51] DEBUG[21749]: res_config_mysql.c:1625 mysql_reconnect: MySQL RealTime: Connection okay.
[Oct 22 10:04:51] DEBUG[21749]: res_config_mysql.c:380 realtime_mysql: MySQL RealTime: Retrieve SQL: SELECT * FROM ast_iax WHERE name = 'IAXPROVIDER'
[Oct 22 10:04:51]        > doing dnsmgr_lookup for 'voip.IAXPROVIDER.com.br'
[Oct 22 10:04:51] DEBUG[21749]: netsock2.c:125 ast_sockaddr_split_hostport: Splitting 'voip.IAXPROVIDER.com.br' gives...
[Oct 22 10:04:51] DEBUG[21749]: netsock2.c:155 ast_sockaddr_split_hostport: ...host 'voip.IAXPROVIDER.com.br' and port '(null)'.
[Oct 22 10:04:51] DEBUG[21749]: netsock2.c:125 ast_sockaddr_split_hostport: Splitting '' gives...
[Oct 22 10:04:51] DEBUG[21749]: netsock2.c:155 ast_sockaddr_split_hostport: ...host '' and port '(null)'.
[Oct 22 10:04:51] ERROR[21749]: netsock2.c:245 ast_sockaddr_resolve: getaddrinfo("", "(null)", ...): ai_family not supported
[Oct 22 10:04:51] WARNING[21749]: acl.c:569 resolve_first: Unable to lookup ''
[Oct 22 10:04:51] DEBUG[21749]: netsock2.c:125 ast_sockaddr_split_hostport: Splitting 'IAXPROVIDER' gives...
[Oct 22 10:04:51] DEBUG[21749]: netsock2.c:155 ast_sockaddr_split_hostport: ...host 'asteriks' and port '(null)'.
[Oct 22 10:04:51] ERROR[21749]: netsock2.c:245 ast_sockaddr_resolve: getaddrinfo("IAXPROVIDER", "(null)", ...): Name or service not known
[Oct 22 10:04:51] WARNING[21749]: acl.c:569 resolve_first: Unable to lookup 'IAXPROVIDER'
[Oct 22 10:04:51] WARNING[21749]: chan_iax2.c:4527 create_addr: No such host: IAXPROVIDER
[Oct 22 10:04:51] WARNING[21749]: app_dial.c:2030 dial_exec_full: Unable to create channel of type 'IAX2' (cause 20 - Unknown)
[Oct 22 10:04:51]   == Everyone is busy/congested at this time (1:0/0/1)
[Oct 22 10:04:51] DEBUG[21749]: app_dial.c:2704 dial_exec_full: Exiting with DIALSTATUS=CHANUNAVAIL.

By: Paul Belanger (pabelanger) 2010-10-23 11:55:31

Do you mind submitting a debug log (see below).  Be sure to enable IAX2 debugs.
--
We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:

http://svn.digium.com/svn/asterisk/trunk/doc/HOWTO_collect_debug_information.txt

By: palmtown (palmtown) 2010-12-12 11:14:44.000-0600

Hello,

the URL to collect debugging logs doesn't work.  Pleas enote that we are using Asterisk 1.8.1.  Please provide instruction as to how we can assist in this matter.  

Also, this should be raised to "Crash" as it crashes asterisk if IAX device is added and a call is attempted.

By: Alexandre Keller (alexandrekeller) 2011-03-03 12:01:24.000-0600

I've tried to use Asterisk 1.8.3, but it has been changed something about Macros in AEL, and my entire dialplan is now broken, because of it.

Macros now have ~~s~~ extension instead of s, and all my Gosub(mymacro,s,1(args)) are now unavailble.

As soon as I make my dialplan works again I'll send all the logs.

Thanks

By: Alexandre Keller (alexandrekeller) 2011-04-19 12:52:30

Any news on this issue!?

By: Jonathan Rose (jrose) 2011-11-22 09:12:32.458-0600

Supposedly it's been fixed at some point, but please try again in 1.8.7, as this has an alleged impact on another issue I'm working on.  I'd be eager to hear an update.

By: Matt Jordan (mjordan) 2015-02-25 23:14:30.687-0600

Through some ridiculously mysterious notes, this should have been fixed sometime around when 1.8.9 was released. Looking at the ChangeLog, I suspect it was this commit with no underlying issue:

{noformat}
2011-11-23 22:52 +0000 [r346239]  Richard Mudgett <rmudgett@digium.com>

* channels/chan_iax2.c, include/asterisk/acl.h,
 channels/chan_skinny.c, channels/chan_h323.c, main/acl.c: Fix
 calls to ast_get_ip() not initializing the address family.
{noformat}

(Side note: forensics is *really* hard when no one writes down what they were working on, which issues, commit numbers, etc. Sheesh. :-( )

As it is, I suspect this is fixed. I'm going to close this out as Suspended, as 1.8 no longer receives bug fixes. If this is still an issue in a supported branch of Asterisk, please comment here and I'll be happy to reopen it.