Can't call outside (PSTN) from Softphone

I have an Asterisk server on Fedora. There’s a Windows PC with X-Lite in the network. The X-Lite softphone registers just fine in the Asterisk server after openning port 5060 in the Fedora server, and the X-Lite softphone receives calls for other extentions within Asterisk.

The problem is when I try to make a call outside to the PSTN. I have the following configuration for outbound calling in extensions.conf:

[internal] ... exten => _9NXXXXXX,1,Dial(Zap/4/${EXTEN:1}) exten => _9NXXXXXX,2,Congestion() exten => _9NXXXXXX,102,Congestion() ...

And the following in sip.conf:

[code][general]
context=default
srvlookup=yes

[john]
type=friend
secret=1111
qualify=yes
nat=no
host=dynamic
canreinvite=no
context=internal[/code]

When making a call outside from an analog phone the call works fine, but when I try to call from the X-Lite phone Asterisk keeps trying to bridge the two channels: Zap/4 and the SIP/john. What could be the cause and how could I solve it?