Connecting two Asterisk boxes with IAX2 thru a SSH tunnel

Hi,

i am trying to make an IAX2 connection via a ssh tunnel…

My Tunnel:

Box1 -> local Port 12000 -> SSH -> Box 2 -> local port 4569

My Setup:

BOX1
Context to dial Box2 from extensions.conf:
exten => 3,1,Dial(IAX2/user:pass@127.0.0.1:12000/1)

BOX2
iax.conf:

[general]
bindport = 4569 ; Port to bind to (IAX is 4569)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
disallow=all
allow=ulaw
allow=alaw
allow=gsm
mailboxdetail=yes

[bin]
type=peer
username=user
secret=pass
auth=plaintext
context=iax-tunnel
peercontext=iax-tunnel
qualify=yes
trunk=yes

The iax-tunnel context:
; IAX testing
[iax-tunnel]
exten => 1,1,Answer()
exten => 1,2,Playback(beep)
exten => 1,3,Hangup()

I can dial “3” on BOX1.
After that i hear nothing but i get no hangup either. I can’t reach BOX2.

My tunnel seems to work fine, so i think it must be an IAX configuration issue, but i have got no idea, because I am absolutely new to IAX stuff.

Any ideas?

Thanks a lot
wonder

From voip-info.org/wiki/view/Aste … cryption….

Thanks. I found out, that SSH-Tunnels support tcp only by now. I was able to establish a call by converting tcp-data into udp-data before the tunnel and vice versa on the other side. the quality was terrible but it worked.

Thanks
wonder

Can try to set up a vpn if you want encrypted traffic between the 2 servers. OpenVPN has worked fine for me in the past. It is fairly simple to set up and didn’t seem to affect the sound quality for what I was using it for. Although I was using SIP not IAX though. Or, you can try using IAX encryption:
voip-info.org/wiki/view/IAX+encryption

I’m interested to see your results if you do go the vpn route… there is a lot of extra overhead with vpn and it can’t be doing any good to call quality but i’d be interested to hear your experiences.

Hey, I didn’t try VPN yet but i blogged my “hardly working” SSH-tunnel setup.

daniel-ritter.de/blog/artikel/143

wonder