Problems conecting a IAX user to a SIP provider o sip phone

Hello people, I’m installing asterisk in a small company with soft-phones and a SPA3000 adapter. I have created all the accounts, voicemail, parking services, etc… I can comunicate with the other users, I can receive calls through spa and also, make calls. All these with SIP.

My problem is that I would like to connect from outside the company network (there is a firewall and a nat). I know the problems with SIP, so I have made some users with IAX.

I have proved (inside the company network) to comunicate a IAX user with a SIP user (all with soft-phones) and it works, but the problem is that I cannot send calls from a IAX user through the spa.
Asterisk said that the call was not answer by the spa.

Executing Dial(“IAX2/luis@luis/2”, “SIP/982059901@spa3000||r”) in new stack
– Called 942059901@spa3000
Oct 16 13:47:51 WARNING[3693]: chan_sip.c:694 retrans_pkt: Maximum retries exceeded on call 583d99601adf34b874415b762fa5ddc9@192.168.1.254 for seqno 102 (Critical Request)
== No one is available to answer at this time
– Executing Hangup(“IAX2/luis@luis/2”, “”) in new stack

If I use a SIP user in the same computer, the communication works.
Also, I have an account in voipcheap, and I can call from any SIP account but not from and IAX user. Voipcheap log said “Bad request”

– Executing Dial(“IAX2/luis@luis/1”, “SIP/0034982059901@voipcheap||r”) in new stack
– Called 0034982059901@voipcheap
– Got SIP response 400 “Bad request” back from 80.239.235.200
– SIP/voipcheap-14a1 is circuit-busy

Do anyone know why it doesn’t work?
I think asterisk should convert signal from iax to sip, does’t it?

Asterisk does protocol translation no problem. what do you have set for codecs for the trunk and the user ?

also, i’m slightly confused here about which device is doing what. is the SPA providing a trunk to Asterisk ? or is it registered to voipcheap ? if the problem is sending calls via the SPA, why do your logs indicate that you’re getting the error back from voipcheap ?

(or is it too early for me to read right ??)

I’m using sound codec 711, for all devices.

I’m doing this:

Softphone -> Asterisk -> SoftPhone OK (sip and iax)
PSA-3000 -> Asterisk -> SoftPhone OK (sip)
SoftPhone -> Asterisk -> PSA-3000 Only work with Sip for the Softphone
SoftPhone -> Asterisk -> Voipcheap Only work with Sip for the Softphone

I would like to use all users (softphone) with IAX, but the problem is than in the last two cases I can’t connect to them with IAX SoftPhones.

If Asterisk translates IAX -> Sip and Sip -> IAX, why are not tranlated theses two cases, such the logs show?