[Home]

Summary:ASTERISK-12831: IAX2 peer does not show trunk
Reporter:David A. Bandel (pananix)Labels:
Date Opened:2008-10-06 11:02:44Date Closed:2008-12-15 16:30:05.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bug13629_20081017_1.4.diff
( 1) bug13629_20081017.diff
Description:The following IAX2 peer connected to a 1.4.22 system has trunk=yes.  The 1.4.22 system is identical but in reverse and it shows the (T).

office/office    190.33.255.69   (S)  255.255.255.255  4569          OK (16 ms)



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

Unable to tell if this is cosmetic (i.e., only doesn't display the (T) but is trunked) or really isn't trunked.
Comments:By: Leif Madsen (lmadsen) 2008-10-14 11:46:03

So if you don't use 1.6.x, and only use 1.4.x in the mentioned scenario, everything works as expected?

By: David A. Bandel (pananix) 2008-10-14 12:49:30

Absolutely.  I have 4 other 1.4.x IAX trunks off the 1.4.x system the 1.6.1-beta system is connected to and both ends of all IAX trunks show (T).  How can I check if this is just cosmetic or not actually trunked?

By: Leif Madsen (lmadsen) 2008-10-14 13:03:22

Perhaps you can look at the peer configuration "iax2 show peer <foo>" to determine if the option is enabled for that peer.

Mind you I don't use iax2, so that might not even be a valid option to try; I come from a SIP world, sorry.

By: David A. Bandel (pananix) 2008-10-14 14:17:51

First from the 1.4.22 host:
pbx*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status    
voipstreet/pana  64.136.174.24   (S)  255.255.255.255  4569 (T)      OK (255 ms)
bagala/bagala    172.16.12.101   (S)  255.255.255.255  4569 (T)      OK (16 ms)
1084             (Unspecified)   (D)  255.255.255.255  0             UNKNOWN  
1083             (Unspecified)   (D)  255.255.255.255  0             UNKNOWN  
1082             (Unspecified)   (D)  255.255.255.255  0             UNKNOWN  
1081             172.16.15.99    (D)  255.255.255.255  4569          OK (15 ms)
1080             (Unspecified)   (D)  255.255.255.255  0             UNKNOWN  
zuckerfeather/z  207.14.218.36   (S)  255.255.255.255  4569 (T)      OK (252 ms)
pan1/pan1        190.33.255.70   (S)  255.255.255.255  4569 (T)      OK (7 ms)
lasolas/lasolas  201.224.73.100  (S)  255.255.255.255  4569 (T)      OK (15 ms)
10 iax2 peers [6 online, 4 offline, 0 unmonitored]

pbx*CLI> iax2 show peer bagala
pbx*CLI>

 * Name       : bagala
 Secret       : <Set>
 Context      :
 Mailbox      :
 Dynamic      : No
 Callerid     : "" <>
 Expire       : -1
 ACL          : No
 Addr->IP     : 172.16.12.101 Port 4569
 Defaddr->IP  : 0.0.0.0 Port 0
 Username     : bagala
 Codecs       : 0xe004 (ulaw)
 Codec Order  : (ulaw)
 Status       : OK (16 ms)
 Qualify      : every 60000ms when OK, every 10000ms when UNREACHABLE (sample smoothing Off)

Now from the 1.6.1-beta1 host:
Name/Username    Host                 Mask             Port          Status    
office/office    190.33.255.69   (S)  255.255.255.255  4569          OK (16 ms)
1 iax2 peers [1 online, 0 offline, 0 unmonitored]

guaca*CLI> iax2 show peer office
guaca*CLI>

 * Name       : office
 Secret       : <Set>
 Context      :
 Parking lot  :
 Mailbox      :
 Dynamic      : No
 Callerid     : "" <>
 Expire       : -1
 ACL          : No
 Addr->IP     : 190.33.255.69 Port 4569
 Defaddr->IP  : 0.0.0.0 Port 0
 Username     : office
 Codecs       : 0x6004 (ulaw)
 Codec Order  : (ulaw)
 Status       : OK (16 ms)
 Qualify      : every 60000ms when OK, every 10000ms when UNREACHABLE (sample smoothing Off)

I can't determine in either where the trunk is except in the summary (iax2 show peers), but that goes for SIP as well as I looked there for trunking info and it wasn't present.

configuration stanzas for bagala/office link, first from 1.4.22 system, then from 1.6.1-beta1 system:

[bagala]
type=peer
host=172.16.12.101
secret=xxxxxxxxxx
username=bagala
trunk=yes
qualify=yes
disallow=all
allow=ulaw

[office]
type=peer
host=pbx.pananix.com
secret=xxxxxxxxxx
username=office
trunk=yes
qualify=yes
disallow=all
allow=ulaw

So they are identical except for the host= part.
But only the 1.4.22 system shows (T).

By: snuffy (snuffy) 2008-10-17 10:11:11

I have attached two patches.

One is for 1.4 to show the 'trunk' status when you show a peer detail.
Second is for 1.6.x / trunk which adds the same thing and fixes the manager command to also show it in list as 'trunk' or not.

I'm still unsure as to why it would not show as (T) in the summary for 1.6.x as the code is no different from 1.4 in terms of testing/printing the value

(note the second one would require changes to manager_1.1.txt but that can be done in a final patch)



By: David A. Bandel (pananix) 2008-10-17 18:46:56

OK, applied patch, installed new chan_iax2 module.  Restarted *.  No change, but now I see in 'iax2 show peer office`: trunk=no

Made a cosmetic change to iax.conf in the [office] section, did a `iax2 reload` and got this:
[2008-10-17 18:41:38] WARNING[7848]: chan_iax2.c:10833 build_user: Unable to support trunking on user 'bagala' without DAHDI timing
      > doing dnsmgr_lookup for 'pbx.pananix.com'
[2008-10-17 18:41:38] WARNING[7848]: chan_iax2.c:10573 build_peer: Unable to support trunking on peer 'office' without DAHDI timing

But I have DAHDI loaded and running -- my Wildcard is working just fine.
My 1.6.1-beta system shows:
root@guaca:/etc/asterisk# lsmod | grep dahdi
dahdi_echocan_mg2       4744  0
dahdi                 182696  6 dahdi_echocan_mg2,wctdm
crc_ccitt               2080  3 dahdi,hisax,irda

My 1.4.22 system shows:
pbx:/etc/asterisk# lsmod | grep dahdi
dahdi_echocan_mg2       4744  0
dahdi                 184328  18 dahdi_echocan_mg2,wctdm
crc_ccitt               2048  2 dahdi,hisax

IAX2 trunking works on the 1.4.22 system, but not the 1.6.1-beta, and the difference is: nothing.  Using the same DAHDI sources on both.  

Stopped *, loaded dahdi_dummy module, started *.  Still no trunk, but this time at least no error about no timing after performing a `iax2 reload`.

But iax2 trunking still not working.
(sigh).

By: David A. Bandel (pananix) 2008-10-22 09:27:58

After loading dahdi_dummy and restarting, the iax channel sound was broken and unusable.
Stopped *, removed dahdi_dummy module, restarted * and sound on channel normal again.
Did a iax2 reload and didn't get the error listed above, but still no trunk.

By: Russell Bryant (russell) 2008-12-15 16:30:05.000-0600

This issue should be solved by the same patch that went in for issue ASTERISK-13223