[Home]

Summary:ASTERISK-21787: No IAX2 communication either user/peer or friend accounts
Reporter:Andre Luis (andrel)Labels:
Date Opened:2013-05-15 13:24:13Date Closed:2013-07-07 20:01:35
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:11.1.0 11.1.1 11.1.2 11.2.0 11.2.1 11.2.2 11.3.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:2 Ubuntu Server 12.04.2 LTS x86 Asterisk 11.3.0 Server 1: 192.168.99.1 Server 2: 192.168.99.2 PING OK, SIP OK, IAX2 NOT OK Same LAN, same switch, no firewall in between or in the machines.Attachments:( 0) server1.iax.conf
( 1) server1.iax.debug
( 2) server1.pcap
( 3) server2.iax.conf
( 4) server2.iax.debug
( 5) server2.pcap
Description:When setting communication between two asterisk servers using IAX2 either user/peer or friend accounts there is no communication,
peers always unreachable from the startup, this affects versions 11.1.0 thru 11.3.0,
when using 11.0.2 or below works fine.
The configuration files, debug information and tcpdump form each server is attached.
Comments:By: Andre Luis (andrel) 2013-05-15 13:25:05.781-0500

IAX2 configuration for server 1

By: Andre Luis (andrel) 2013-05-15 13:25:21.363-0500

server 1 iax2 debug from asterisk

By: Andre Luis (andrel) 2013-05-15 13:25:36.250-0500

server 1 iax2 tcpdump

By: Andre Luis (andrel) 2013-05-15 13:26:04.336-0500

server 2 iax.conf

By: Andre Luis (andrel) 2013-05-15 13:26:19.467-0500

server 2 iax2 debug from asterisk

By: Andre Luis (andrel) 2013-05-15 13:26:34.239-0500

server 2 tcpdump

By: Rusty Newton (rnewton) 2013-05-22 15:19:18.812-0500

I conveniently already had a setup very similar to yours, so rather than troubleshooting your pcaps and logs I just attempted to reproduce.

Two systems:
Ubuntu 12.04.2  x86_64  
Ubuntu 12.04.2  x86

First test with both systems using SVN-branch-11-r389245 using your iax.conf (with only IP addresses changed). Tested fine, no problems communicating over the IAX2 connections.

Second test with both systems using Asterisk 11.4.0 release tarballs. Same iax.conf, again tested fine, no problems calling over the IAX2 connections and qualify looks good.

{noformat}
ubuntu*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status      Description                    
asterisk11/aste  10.24.17.228    (S)  255.255.255.255  4569          OK (1 ms)                                  
teste2/teste2    10.24.17.228    (S)  255.255.255.255  4569          OK (1 ms)                                  
2 iax2 peers [2 online, 0 offline, 0 unmonitored]
{noformat}

Same LAN and switch, no firewalling.

Unless you can point to another potential cause that is Asterisk related(another config file in Asterisk?) I'll go ahead and close this out as Not A Bug. Hopefully if there was an issue then it was just fixed in 11.4.0 or SVN.

If you still have the issue after upgrading, you may want to re-install from a fresh tarball and empty config directory then keep track of every config file change you make and post those.

By: Andre Luis (andrel) 2013-05-27 12:46:43.710-0500

I setup two new virtual machines(using virtual box and also tried with VMWARE ESXi), fresh Ubuntu 12.04.2 Server LTS x86, tried to use the default iax.conf configuration
just added the accounts, at some point one of the servers works perfectly but the others gets the UNREACHABLE message under "iax2 show peers", another thing I notice is:
If I start asterisk with IAX accounts qualify = no, shows me UNMONITORED, then if i change to qualify=yes and iax2 reload, its starts to work, that only work, if you start
with qualify=no, if starts with qualify=yes then change to no then yes, the same problem from the beginning persists.

Using Asterisk 11.4.0,
If its possible i can give you access to the asterisk boxes.

By: Andre Luis (andrel) 2013-05-28 14:59:04.127-0500

After trying to setup the OS again, reinstall asterisk 11.4.0 and just add the accounts to the iax.conf everything rest as default, one thing happens
first time the asterisk servers comes up on both servers, the IAX2 communication works 100% perfect, if I stop Server 1, server 2 recognize peers as UNREACHABLE
after a few seconds(10), start server 1 again(asterisk process i mean), server 2 -> server 1 back to REACHABLE, but on server 1 starts as REACHABLE and a few seconds later(3 sec)
changes to UNREACHABLE.


Asterisk Ready.
 == Parsing '/etc/asterisk/cli.conf': Found
dhcp02*CLI> iax2 set debug on
IAX2 Debugging Enabled
[May 28 16:57:21] NOTICE[1311]: chan_iax2.c:12158 __iax2_poke_noanswer: Peer 'ast11' is now UNREACHABLE! Time: 0
[May 28 16:57:21] NOTICE[1312]: chan_iax2.c:12158 __iax2_poke_noanswer: Peer 'asterisk11' is now UNREACHABLE! Time: 0
dhcp02*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status      Description                    
ast11/ast11      200.145.2.31    (S)  255.255.255.255  4569          UNREACHABLE                                
asterisk11/aste  200.145.2.31    (S)  255.255.255.255  4569          UNREACHABLE                                
demo/asterisk    216.207.245.47  (S)  255.255.255.255  4569          Unmonitored Demo System At Digium          

Still strange behavior!

By: Alec Davis (alecdavis) 2013-05-28 15:25:14.500-0500

I had a similar problem ASTERISK-18827, maybe related?

I say related, as when you stop and start a server, that server reports REACHABLE then UNREACHABLE.
The issue I believe is an IAX ping packet arrives from the server that is up, into the server that is starting but not yet ready to receive packets.
This server then has a hung IAX thread.

When they're unreachable, one of the IAX threads may be hung.
What is the output of 'iax2 show threads'.



By: Alec Davis (alecdavis) 2013-05-28 16:23:15.036-0500

@Andre
If your issue is related to ASTERISK-18827 you have a couple of options, try SVN or use the patch posted on ASTERISK-18827.


By: Andre Luis (andrel) 2013-05-29 09:20:13.407-0500

@Alec Davis

Asterisk SVN-trunk-r389990 built by root

works as it was working under 11.0.2.
When will this SVN TRUNK become stable/released ?

By: Rusty Newton (rnewton) 2013-06-05 17:46:26.071-0500

bq. When will this SVN TRUNK become stable/released ?

Please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

I'd test 11.4.0 vs SVN branch 11 to see if your fix is in the 11 branch. Bug fixes on supported release branches are roughly every 4 weeks.  11.4.0 was released on 5/17/13

I would really not recommend running Trunk in production. It would be safer to run the SVN branch 11.

If you want to determine whether the resolution to your issue was in the fix for ASTERISK-18827 then you might try testing with the specific revision for 11 branch mentioned [in the subversion tab on that issue|https://issues.asterisk.org/jira/browse/ASTERISK-18827?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel]

Please let us know whether you find that the fix for your issue is also in SVN branch 11, as that could help other users. Thanks!

By: Alec Davis (alecdavis) 2013-06-05 19:51:05.309-0500

checking the 11.4.0 tag from
http://svnview.digium.com/svn/asterisk/tags/11.4.0/channels/chan_iax2.c?view=annotate
see start_network_thread() at line 12391
The changes are not in any there.


from the commit logs for SVN branch 11, the changes are there.
http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_iax2.c?view=log
Or the annotated view;
http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_iax2.c?view=annotate see line 12394


By: Alec Davis (alecdavis) 2013-06-05 19:57:20.967-0500

@andre
You may also be interested in ASTERISK-21409 if you start using transfer=yes in iax2.conf


By: Andre Luis (andrel) 2013-06-06 08:37:16.977-0500

Thank you for all the information @Alec Davis, I notice some problems with my VMWARE ESXi while testing, and i changed to another server with newer version os virtualization(ESXi 4),
and the Asterisk 11.4.0 worked, but sometimes don't. its kinda weird behavior. What I can't still figure it out is why 11.0.2 works on the old server and the above versions don't.
I'm on testing environment for asterisk 11, I'll keep working on the trunk version 'til a release comes out.
Thanks for all the help and support.

By: Alec Davis (alecdavis) 2013-06-18 03:50:58.767-0500

@andre
11.5.0-rc1 is released which has these changes:
http://svnview.digium.com/svn/asterisk/tags/11.5.0-rc1/

@mjordan:
shouldn't this be targeted for 11.5.0?


By: Andre Luis (andrel) 2013-06-19 11:47:28.363-0500

@mjordan @alecdavis

seems to be working just fine in 11.5.0-rc1.

By: Rusty Newton (rnewton) 2013-06-20 15:35:14.100-0500

Since you said it was sometimes working and sometimes not. I'll give this a couple more weeks before closing it out as fixed. Andre let us know if you see the issue again within the next two weeks.

By: Matt Jordan (mjordan) 2013-07-07 20:01:35.846-0500

Since there's been no additional feedback, I'm going to go ahead and close this out as Fixed. If you run into this problem again with 11.5.0, please let a bug marshal know and we can have this issue reopened. Thanks!