[Asterisk-Users] tunnel iax via gnophone with ssh?

Grzegorz Nosek blackfire at metal.art.pl
Sat Nov 22 03:46:32 MST 2003


On Thu, 20 Nov 2003 08:44:10 -0700, Chris Hirsch wrote
> Hey all...I'm trying to use gnophone to connect to my 
> asterisk box behind my firewall..I thought I could just 
> setup a tunnel with something like ssh host.com -
> L5036:asteriskserver:5036 and just change my gnophone to 
> connect to localhost:5036 but I never see anything happen on 
> the asterisk server. I'm even trying this on the same 
> network just in case there is something funky with NAT.

As somebody already pointed out (and I corrected this in the Wiki a
few days ago), IAX uses UDP, so plain ssh tunneling won't work.

> 
> Anybody have any ideas? I did notice that when I start 
> gnophone I see
> 
> iax.c line 654 in iax_init: Started on port 5036
> Listening on port 5036
> 
> and it doesn't seem to matter what I do inside the config. 
> Are these ports in some way hardcoded? If if they are can't 
> I do something like above?
> 
> Thanks!
> Chris

The 5036 port is hardcoded in the IAX library (iax.h, #define
IAX_DEFAULT_PORTNO 5036) which gnophone uses. For the quickest hack,
change the value and recompile libiax.

In the longer run, consider adding a command line option (or even
better, a GUI config item), specifying an int passed to iax_init() in
pc_init() in phonecore.c in gnophone source (I went through the code
so much I almost know it by heart ;). Currently it is passed a zero
which means "the default". In any case, if the required port is in
use, IAX uses a random one.

Grzegorz Nosek




More information about the asterisk-users mailing list