IAX trunk connecting two PBIAF

atsak

Guru
Joined
Sep 7, 2009
Messages
2,387
Reaction score
440
I've setup a couple of these now, but have run into something that has me stumped.

I used blache's spreadsheet and configured everything; I've done this before without a problem.

Forwarded UDP port 4569 through my firewall; use a dynamic DNS name so configured the trunk with that.

Setup a dial plan 7|. and passed that to the trunk.

When I dial the extensions the CLI shows the call being placed but it says channel unavailable. The IAX show peers shows the main pbx as connected on the sattelite, but not the satellite connected on the main (shows as unreachable).

What have I missed?
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
what versions r u using? remember some versions of asterisk have had iax2 security patch applied and you need to modify aserisk as follows


calltokenoptional = 0.0.0.0/0.0.0.0
maxcallnumbers = 16382

to /etc/asterisk/iax_general_custom.conf

then restart asterisk

Of course this disables the "security" patch from digium. I only use IAX2 between pbx systems over a VPN connections anyways.


Tom
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,387
Reaction score
440
PBIAF 1755 Gold is the version I'm using (so whatever Asterisk version it comes with). I have another trunk working on the same server in the same way (sans VPN) . . . update fixes etc all run as well.
 

dad311

Guru
Joined
Jan 13, 2008
Messages
604
Reaction score
2
Make sure you have "requiretoken=yes" in the USER DETAILS section. I believe the spreadsheet is incorrect or was incorrect at one time.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
Yes, the spreadsheet was missing the "requirecalltoken=no". It is corrected now. As Tom mentioned, you can select an IP range that doesn't require the token also. If you are trying to trunk between two versions of Asterisk like 1.4 and 1.6, then it is best to use "requirecalltoken=no" as the versions of IAX2 will be different.
 

gregc

Guru
Joined
Sep 8, 2008
Messages
433
Reaction score
3
I am having the exact same problem. I have been running PIAF 1.2 for a year or so now in two offices that connect via IAX. Asterisk 1.4.21.2 and FreePBX 2.5.

I've updated one office's pbx due to hardware issues and used PBX Silver 1.7.9 using Asterisk 1.4.39.1 and FreePBX 2.6.

Previously, Eugene's spreadsheet did not have anything for requirecalltoken (I used that spreadsheet last year to get it all working). So I figured this was the answer. No such luck.

I tried adding the lines Tom said to the iax general custom config file and still, going from the old pbx to the new, I get chanunavail. Going from the new to the old works fine.

iax2 show peers on the old shows a status of unreachable
iax2 show peers on the new shows a status of OK

I do plan to change out the other old pbx to keep the hardware and software uniform, but that won't be happening for some time.

Anything else I'm missing?
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,387
Reaction score
440
When using a dynamic IP on PBXIAF 1755 Gold, you need to add &dynamic to the fqdn in the peer details of the outgoing trunk setup.
So . . .
host=yourname.dnsalias.com&dynamic

** I spoke to soon. This worked for a few minutes then stopped. I continue to be perplexed but feel at least I've made some progress.
 

gregc

Guru
Joined
Sep 8, 2008
Messages
433
Reaction score
3
On mine, we have fixed IPs that I'm using, so no go there. I've done a work around with a SIP connection, but it would be nice to figure it out.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
calltokenoptional = 0.0.0.0/0.0.0.0
maxcallnumbers = 16382

to /etc/asterisk/iax_general_custom.conf

then restart asterisk
/QUOTE]

You would put this in /etc/asterisk/iax2_general_custom.conf. I would change calltokenoptional = 192.168.1.0/255.255.255.0 specifically for the subnet that you are connecting to.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
From the asterisk CLI>

iax2 show channels
iax2 show provisioning
iax2 show registry
iax2 show users
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,387
Reaction score
440
Visiting this again. So I have the peer working in one direction; from the one PBX to the other calls work. In reverse though it doesn't.

I setup the dial prefix 7 to dial through (and drop the 7 from the dial plan) to the trunk.

The CLI shows the call going to the correct trunk. It shows the 7 being dropped and only the extension I want to have dialled being sent. However, it just comes back channel unavailable.

I am so defeated because I've done this a few times now and it always just worked.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
I've just tested using the spreadsheet between Asterisk 1.4.21.2 and Asterisk 1.6.2.6 and it worked flawlessly once I realized that I had entered the wrong username in one of the trunks. :banghead:

What is the CLI output of "iax2 show peer <trunk name>" for both sides? Compare the two to see if you are missing something. The 1.4 side will be missing the trunk context so don't worry about that.

You haven't filled in the Trunk's "Dial Rules" have you?
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,387
Reaction score
440
I've just tested using the spreadsheet between Asterisk 1.4.21.2 and Asterisk 1.6.2.6 and it worked flawlessly once I realized that I had entered the wrong username in one of the trunks. :banghead:

What is the CLI output of "iax2 show peer <trunk name>" for both sides? Compare the two to see if you are missing something. The 1.4 side will be missing the trunk context so don't worry about that.

You haven't filled in the Trunk's "Dial Rules" have you?

No, no dial rules at all for the trunks. I set those in outbound routes (7|. ; dial 7 to get to the other trunk). The calls appear to route properly and work in one direction (from the 24.X side below to the 72.X side).

The call never arrives at the 24.X side when sent from the 72.x side, but it works fine the other way.

On one side

adam2acdl/acdl2 72.XX.XX.XX (S) 255.255.255.255 4569 (T) OK (14 ms)

On the other

On the other
acdl2adam/adam2 24.XX.XX.XX (S) 255.255.255.255 4569 (T) OK (10 ms)

I'm sure I've done something silly, but I just deleted the trunks and re-created them. I changed the info like a fresh install. Like I said I have another trunk on the same box which is working fine to a different PBX. I've also just tried with a fresh install at the 24.XX server (using purple for fun).

I'm so frustrated. It's always just worked immediately for me.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
What I'm looking for is the output of

CLI> iax2 show peer adam2acdl

and

CLI> iax2 show peer acdl2adam
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
You might want to post a screen capture of your trunks and outbound routes.
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
Try changing the outbound route "7" to another number. There are several functions that start with 7 like parking lots and GVoice
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,387
Reaction score
440
Try changing the outbound route "7" to another number. There are several functions that start with 7 like parking lots and GVoice

I tried this already; no joy (tried two digit ones like 88 and 64).

Will post screen caps later; should probably santitize them a little bit.
 

atsak

Guru
Joined
Sep 7, 2009
Messages
2,387
Reaction score
440
What I'm looking for is the output of

CLI> iax2 show peer adam2acdl

and

CLI> iax2 show peer acdl2adam

I'm really sure the outbound routes are right, because the traffic (and correct traffic) passes to the correct trunk and in the format it should be in (ie the right numbers pass)

I tried recreating the trunks so the name changed a little, but:

Code:
  * Name       : acdl2adamtrunk
  Secret       : <Set>
  Context      : from-trunk-iax2-acdl2adamtrunk
  Mailbox      :
  Dynamic      : No
  Callerid     : "" <>
  Expire       : -1
  ACL          : No
  Addr->IP     : 24.xx.xx.xx Port 4569
  Defaddr->IP  : 0.0.0.0 Port 4569
  Username     : adam2acdl
  Codecs       : 0xe00e (gsm|ulaw|alaw)
  Codec Order  : (ulaw|alaw|gsm)
  Status       : OK (14 ms)
  Qualify      : every 60000ms when OK, every 10000ms when UNREACHABLE (sample smoothing Off)

and

Code:
  * Name       : adam2acdltrunk
  Secret       : <Set>
  Context      : from-trunk-iax2-adam2acdltrunk
  Parking lot  :
  Mailbox      :
  Dynamic      : No
  Callnum limit: 0
  Calltoken req: No
  Trunk        : Yes
  Encryption   : No
  Callerid     : "" <>
  Expire       : -1
  ACL          : No
  Addr->IP     : 72.XX.XX.XX Port 4569
  Defaddr->IP  : 0.0.0.0 Port 0
  Username     : acdl2adam
  Codecs       : 0xe (gsm|ulaw|alaw)
  Codec Order  : (ulaw|alaw|gsm)
  Status       : OK (23 ms)
  Qualify      : every 60000ms when OK, every 10000ms when UNREACHABLE (sample smoothing Off)

I've attached screen shots in a zip file. Sorry they're small but to get everything on the one screen I had to shrink it. I've sanitized them, but I can communicate the values under the black by PM.

Some notes on the trunk configs.

Both hosts are FQDN's. The one is a dynamic FQDN but it's quite correctly set. The other is a standard A DNS record which resolves correctly obviously (see above). The secret passwords are the same on both sides. There are no extra spaces or anything like that (though technically the status above proves that has to be right).

Really appreciate the help. :banghead:
 

Attachments

  • trunkphotos.zip
    35.8 KB · Views: 3

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
I seem to remember a past thread on the newer versions of PiaF where IAX was blocked in iptables. If you go to Webmin - Networking - Linux Firewall (if you haven't used it yet, it may be in the Not Used section), can you check if there is an entry for accepting port 4569?
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
Extremely difficult to read. from what I can decipher, on ADAM_IAX, you have the username=adam2acd1 while on the other it looks like the user context is adam2acd. The other issue is that you have the trunk name and the user context as the same name. They should be unique otherwise you risk confusing the dialplan as both will appear looking like this [adam2acd] in two places.
 

Members online

Forum statistics

Threads
25,824
Messages
167,825
Members
19,247
Latest member
mdauck
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top