[Asterisk-Users] IAX <> IAX trunking... DP cache?

Ian Blenke icblenke at nks.net
Wed Aug 20 09:45:04 MST 2003


I'm attempting to get two Asterisk 0.4.0 PBXes to communicate with one 
another using IAX/IAX2 trunks.

I've managed to get a semi-functional NAT Firewall working as a PBX 
(with Asterisk running directly on the firewall itself), but there are 
issues with bind()ing to various interfaces which is causing outbound 
SIP issues.

To get around these issues, the idea is to do something like this:

	Internet
	   |
	 -------
         |       |
         |  Public PBX
         |
      NAT Firewall
         |
       ----------------
       |        |     |
Private PBX  Phone Phone ...


This way we can run private Asterisk PBXes behind NATting firewalls that 
register with a central "public" Asterisk PBX using IAX/IAX2. The phones 
can merrily run SIP to the local Private PBX without worrying about NAT 
headaches or outbound proxies.

I've managed to get the PBXes to mutually register correctly:

   Public PBX:

	*CLI> iax show users
	Username   Secret Authen Def.Context      A/C
	privatepbx        rsa    default          No

   Private PBX:

	*CLI> iax show registry
	Host          Username  Perceived    Refresh State
	x.x.x.x:5036 privatepbx x.x.x.x:5036 60      Registered

	*CLI> iax2 show registry
	Host          Username  Perceived    Refresh State
	x.x.x.x:4569 privatepbx x.x.x.x:4569 60      Registered

On the Public PBX, I added:

	iax.conf:

	[privatepbx]
	type=friend
	host=dynamic
	;trunk=yes  ;<-- doesn't work without a zap interface for timing
	context=outgoing
	auth=rsa
	inkeys=privatepbx
	outkeys=publicpbx
	qualify=yes

	extension.conf:

	[outgoing]
	include => iaxtel	; IAXTEL
	include => fwd		; fwd.pulver.com
	include => iptel	; iptel.org
	include => sipphone	; SIPPhone.com
	include => commx 	; CommunicationsXchange.com

On the Private PBX, I've added what I think are the appropriate sections:

	iax.conf:

	[general]
	register => privatepbx:[privatepbx]@publicpbx

	extension.conf:

	[outgoing]
	switch => IAX/privatepbx:[privatepbx]@publicpbx/outgoing
	;exten => s,1,Dial(IAX/privatepbx:[privatepbx]@publicpbx/outgoing,20,tr)

Whenever I try to route an outbound call, however, I get the following 
errors on the private PBX:

WARNING[15376]: File chan_iax.c, Line 4837 (find_cache): Unable to 
generate call for 'privatepbx:[privatepbx]@publicpbx/outgoing'
WARNING[15376]: File chan_iax.c, Line 4957 (iax_exists): Unable to make 
DP cache
WARNING[15376]: File chan_iax.c, Line 4837 (find_cache): Unable to 
generate call for 'privatepbx:[privatepbx]@publicpbx/outgoing'
WARNING[15376]: File chan_iax.c, Line 4979 (iax_canmatch): Unable to 
make DP cache

No IAX traffic appears to go out in response to this.. so I'm guessing I 
have another problem.

Can anyone help point me in the right direction?

-- 
- Ian C. Blenke <icblenke at nks.net>
(This message bound by the following:
http://www.nks.net/email_disclaimer.html)





More information about the asterisk-users mailing list