Sipphone-> iax2 -> asterisk: can't make it work

I’m running * behind a nat. I’ve registered with iaxtel:

host iaxtel.com
iaxtel.com has address 69.73.19.178

[Oct 5 10:47:22] WARNING[2765]: chan_zap.c:11041 process_zap: – Registered IAX2 to ‘69.73.19.178’, who sees us as 69.183.180.190:4569 with no messages waiting

and I can use iax to dial out - 800 numbers, for instance.

I’ve also registered with iax2.fwdnet.net.

host iax2.fwdnet.net
iax2.fwdnet.net has address 192.246.69.186

Registered IAX2 to ‘192.246.69.186’, who sees us as 69.183.180.190:4569 with no messages waiting

I’m using a sipphone -ekiga. What’s the number I should use??

1700xxxyyyy@iaxtel.com
gives “Security check failed”

1700xxxyyyy@iax2.fwdnet.net
gives "Could not connect ot remote host"
but:
iax2 list peers
Name/Username Host Mask Port Status
iaxtel-out/xxx 69.73.19.178 (S) 255.255.255.255 4569 OK (39 ms)
iaxfwd-out/nnnn 192.246.69.186 (S) 255.255.255.255 4569 OK (18 ms)

So am I misdialing or is iax.conf messed up:

[general]
iaxcompat=yes
language=en
bandwidth=low
disallow=lpc10
allow=gsm
allow=ulaw
allow=g726
jitterbuffer=yes
tos=ef
autokill=yes
; this sets up FreeWorldDialup
register => :@iax2.fwdnet.net
; this does iaxtel
register => :@iaxtel.com
authdebug=no

;FreeWorldDialUp

[iaxfwd-out]
type=peer
host=iax2.fwdnet.net
username=802571
secret=newharbor
qualify=yes
disallow=all
allow=ulaw
allow=gsm
allow=ilbc
allow=g726

[iaxfwd-in]
type=user
context=fwd-incoming
auth=rsa
inkeys=freeworlddialup

; IAXtel

[iaxtel-out]
type=peer
host=iaxtel.com
username=jbeatty
secret=newharbor
qualify=yes
disallow=all
allow=ulaw
allow=gsm
allow=ilbc
allow=g726

[iaxtel-in]
type=user
context=iax-incoming
auth=rsa
inkeys=iaxtel

[guest]
type=user
context=incoming
callerid=“Guest IAX User”

Any help appreciated.

sean

If you are trying to connect your SIP phone to your Asterisk machine, you need to modify your sip.conf file. That will be where you will specify the setting you will need to put into your SIP phone.

Dan

My asterisk server is behind a NAT. I’ve tried trying to make a sip connection, but I can’t figure out how to get it throught the NAT.

So I’m trying iax, since it can deal with NAT. As I read the docs, I can use sip to connect to an iax server ( e.g., iaxtel or fwd ), and then the iax server can connect to my asterisk server through the NAT.

Is this wrong? Can a sipphone connect to the iax server?

Can the iax server in turn connect to my asterisk server?

I’ve read all the voip-info stuff on sip through a NAT. None of it has worked for me. If someone has a clear way to do it, I’d love to hear it. But it looked to me that iax was the cleaner way.

sean

Just to make it clear, I’m NAT’d behind a dsl modem that does not allow port forwarding.

Heck, it can’t be configured at all!

sean

if you have a NAT, you will need to port forward regardless of whether you are using IAX or SIP.

also, IAX != SIP, so a SIP based phone will NOT work with the IAX protocol - think of gas and diesel engines. both do the same thing, but do it in different ways.

what you need to do for iax is port forward 4569 to your asterisk box - since media and signalling go over one port, it’s much EASIER to set up (you only have to punch one hole in your NAT/firewall), but you still need to port forward.

between that and making sure asterisk knows which side is internal and which side is external (all the parameters are fully documented in the sip and iax sample configs) you should be good to go…

I was hoping the iax server -iax2.fwdnet - would convert sip to iax ( similar to a dial plan). What kind of softphone does call iax2.fwdnet?? Just another asterisk server??

You’re also saying I still need to port forward whether I’m using iax or sip. I’m not behind a firewal, just a NAT. Still the case.

So if I’m behind an unconfigurable NAT ( SBC dsl modem) , am I really out of luck??

This may not be my day.

sean

Read your post and some issues come to mind.

SJPhone, an SIP based soft phone will call through an IAX2 trunk and
a NAT and also will call through a NAT sent through a SIP trunk.
I do not think you are out of luck !

I would begin at sip.conf. Assign an extension number to your SIP
phone there. And program your SIP phone accordingly.

For example: in sip.conf

[5001] (give your SIP phone an extension number)
type=friend (friend can both make and recieve calls)
username=???
secret=???
host=dynamic
nat=yes
qualify=yes
disallow=all
allow=ulaw
context=what outgoing dialplan in extensions.conf you wish to use ?

If you were to use the example below, the context=??? would be

context=IAX2FWD

This points the SIP phone to the IAX2FWD in extensions.conf which in turn sends your call through the IAX2 trunk you are wanting to call out on.

example:
[IAX2FWD] for Free World Dial Up
exten _1NXXNXXXXXX,1,Dial(IAX2/fwd-outbound/${EXTEN:1},20,r)

[fwd-outbound] in iax.conf would be your defined trunk for outbound
calls through Free World Dial Up. Use whatever label you have
for this IAX trunk already. (again, only an example)

Make sure your SIP phone registers with Asterisk. Also make sure in sip.conf under [general], DTMF is set to rfc2833 in sip.conf.

Try this and see if you can call and get an echo test from FWD.

Also, at the Asterisk CLI type, IAX2 show registry and make sure
IAXTel and FWD are registering. They will only indicate a proxy number
eg: Host
192.246.69.186:4569
69.73.19.178:4569 and so on.

See if this works, and if not, repost.