Problem with outgoing calls, please help

Hi everyone :smile: i’m newbie here and newbie in asterisk :smile:. A few days ago i installed an asterisk. First i configured a trunk with my voip provider, next i configured incoming and outgoing calls i made also a peer to my softphone (x-lite). An incoming calls works good, when i make a call to my voip number i can see on x-lite a incoming call, but if i try to make a call from x-lite to my mobile i can hear only “all services are busy now, please try your call again later”.
My topology is like this : Voip Provider -> my home router -> My Asterisk -> X-lite

On router i forwarded to asteisk ports UDP 5060 and UDP 10000-20000.

I need some help to properly configured my asterisk to make an outgoing calls. Here is my configuration.

extension.conf
[incoming_calls]
exten => mrXX,1,Answer()
exten => mrXX,n,Dial(SIP/200)
exten => mrXX,n,Hangup()

[outgoing_calls]
exten => _X.,1,NoOp()
exten => _X.,1,Dial(SIP/${EXTEN}@mrXX)
exten => _X.,n,Hangup()

contexts incoming_calls & outgoing_calls are included to from-internal context.

sip.conf

register => mrXX:[pass]@sip.freeconet.pl/mrXX
context=from-internal
allowerlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
externip=91.x.x.x
localnet=192.168.1.0/255.255.255.0
localnet=192.168.0.0/255.255.255.0

[mrXX]
disallow=all
allow=gsm
allow=g711a
allow=g726.32
allow=g711u
type=peer
context=from-internal
host=sip.freeconet.pl
username=mrXX
fromuser=mrXX
secret=[pass]
fromdomain=sip.freeconet.pl
insecure=invite,port
nat=yes
qualify=yes
canredirect=no
canreinvite=no
srvlookup=yes

sip_additional.conf

[200]
type=friend
secret=200
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5060
pickupgroup=
nat=yes
mailbox=200@device
host=dynamic
dtmfmode=rfc2833
dial=SIP/200
context=from-internal
canreinvite=no
callgroup=
callerid=device <200>
accountcode=
call-limit=50

also some screens from configuration
img146.imageshack.us/my.php?imag … teshz7.jpg
img240.imageshack.us/my.php?image=trunk2tw0.jpg
img386.imageshack.us/my.php?image=trunk1wi2.jpg

when a type a core set verbose 9 in console and i try to make an outgoing call i’m getting something like this

    -- Executing [0602751445@from-internal:1] Macro("SIP/200-08c5eec8", "user-callerid|SKIPTTL|") in new stack
    -- Executing [s@macro-user-callerid:1] NoOp("SIP/200-08c5eec8", "user-callerid: device 200") in new stack
    -- Executing [s@macro-user-callerid:2] Set("SIP/200-08c5eec8", "AMPUSER=200") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("SIP/200-08c5eec8", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("SIP/200-08c5eec8", "1|Set|REALCALLERIDNUM=200") in new stack
    -- Executing [s@macro-user-callerid:5] NoOp("SIP/200-08c5eec8", "REALCALLERIDNUM is 200") in new stack
    -- Executing [s@macro-user-callerid:6] Set("SIP/200-08c5eec8", "AMPUSER=200") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/200-08c5eec8", "AMPUSERCIDNAME=testy2a") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("SIP/200-08c5eec8", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("SIP/200-08c5eec8", "AMPUSERCID=200") in new stack
    -- Executing [s@macro-user-callerid:10] Set("SIP/200-08c5eec8", "CALLERID(all)="testy2a" <200>") in new stack
    -- Executing [s@macro-user-callerid:11] Set("SIP/200-08c5eec8", "REALCALLERIDNUM=200") in new stack
    -- Executing [s@macro-user-callerid:12] ExecIf("SIP/200-08c5eec8", "0|Set|CHANNEL(language)=") in new stack
    -- Executing [s@macro-user-callerid:13] NoOp("SIP/200-08c5eec8", "TTL:  ARG1: SKIPTTL") in new stack
    -- Executing [s@macro-user-callerid:14] GotoIf("SIP/200-08c5eec8", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,23)
    -- Executing [s@macro-user-callerid:23] NoOp("SIP/200-08c5eec8", "Using CallerID "testy2a" <200>") in new stack
    -- Executing [0602751445@from-internal:2] Set("SIP/200-08c5eec8", "_NODEST=") in new stack
    -- Executing [0602751445@from-internal:3] Macro("SIP/200-08c5eec8", "record-enable|200|OUT|") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/200-08c5eec8", "0?2:4") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] AGI("SIP/200-08c5eec8", "recordingcheck|20081130-175409|1228064049.27") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20081130-175409|1228064049.27: Outbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing [s@macro-record-enable:5] NoOp("SIP/200-08c5eec8", "No recording needed") in new stack
    -- Executing [0602751445@from-internal:4] Macro("SIP/200-08c5eec8", "dialout-trunk|2|0602751445||") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/200-08c5eec8", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] ExecIf("SIP/200-08c5eec8", "0|Authenticate|") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/200-08c5eec8", "0?disabletrunk|1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/200-08c5eec8", "DIAL_NUMBER=0602751445") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/200-08c5eec8", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/200-08c5eec8", "GROUP()=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/200-08c5eec8", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/200-08c5eec8", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/200-08c5eec8", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/200-08c5eec8", "outbound-callerid|2") in new stack
    -- Executing [s@macro-outbound-callerid:1] GotoIf("SIP/200-08c5eec8", "1?start") in new stack
    -- Goto (macro-outbound-callerid,s,3)
    -- Executing [s@macro-outbound-callerid:3] NoOp("SIP/200-08c5eec8", "REALCALLERIDNUM is 200") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("SIP/200-08c5eec8", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,9)
    -- Executing [s@macro-outbound-callerid:9] Set("SIP/200-08c5eec8", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] Set("SIP/200-08c5eec8", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:11] Set("SIP/200-08c5eec8", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:12] GotoIf("SIP/200-08c5eec8", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,16)
    -- Executing [s@macro-outbound-callerid:16] GotoIf("SIP/200-08c5eec8", "1?usercid") in new stack
    -- Goto (macro-outbound-callerid,s,18)
    -- Executing [s@macro-outbound-callerid:18] GotoIf("SIP/200-08c5eec8", "1?report") in new stack
    -- Goto (macro-outbound-callerid,s,22)
    -- Executing [s@macro-outbound-callerid:22] NoOp("SIP/200-08c5eec8", "CallerID set to "testy2a" <200>") in new stack
    -- Executing [s@macro-dialout-trunk:12] AGI("SIP/200-08c5eec8", "fixlocalprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
       >  fixlocalprefix: Using pattern 0X.
  ==  fixlocalprefix: Dialpattern 0X. matched. 0602751445 -> 0602751445
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/200-08c5eec8", "OUTNUM=0602751445") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/200-08c5eec8", "custom=SIP/freeconet") in new stack
    -- Executing [s@macro-dialout-trunk:15] GotoIf("SIP/200-08c5eec8", "1?gocall") in new stack
    -- Goto (macro-dialout-trunk,s,17)
    -- Executing [s@macro-dialout-trunk:17] Macro("SIP/200-08c5eec8", "dialout-trunk-predial-hook|") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/200-08c5eec8", "0?bypass|1") in new stack
    -- Executing [s@macro-dialout-trunk:19] GotoIf("SIP/200-08c5eec8", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:20] Dial("SIP/200-08c5eec8", "SIP/freeconet/0602751445|300|") in new stack
    -- Called freeconet/0602751445
    -- SIP/freeconet-08c7aa10 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [s@macro-dialout-trunk:21] Goto("SIP/200-08c5eec8", "s-CONGESTION|1") in new stack
    -- Goto (macro-dialout-trunk,s-CONGESTION,1)
    -- Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf("SIP/200-08c5eec8", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,s-CONGESTION,3)
    -- Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp("SIP/200-08c5eec8", "TRUNK Dial failed due to CONGESTION - failing through to other trunks") in new stack
    -- Executing [0602751445@from-internal:5] Macro("SIP/200-08c5eec8", "outisbusy|") in new stack
    -- Executing [s@macro-outisbusy:1] Playback("SIP/200-08c5eec8", "all-circuits-busy-now|noanswer") in new stack
    -- <SIP/200-08c5eec8> Playing 'all-circuits-busy-now' (language 'en')
    -- Executing [s@macro-outisbusy:2] Playback("SIP/200-08c5eec8", "pls-try-call-later|noanswer") in new stack
    -- <SIP/200-08c5eec8> Playing 'pls-try-call-later' (language 'en')
    -- Executing [s@macro-outisbusy:3] Macro("SIP/200-08c5eec8", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/200-08c5eec8", "w") in new stack
    -- Executing [s@macro-hangupcall:2] NoCDR("SIP/200-08c5eec8", "") in new stack
    -- Executing [s@macro-hangupcall:3] GotoIf("SIP/200-08c5eec8", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s@macro-hangupcall:6] GotoIf("SIP/200-08c5eec8", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] GotoIf("SIP/200-08c5eec8", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s@macro-hangupcall:11] Hangup("SIP/200-08c5eec8", "") in new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/200-08c5eec8' in macro 'hangupcall'
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/200-08c5eec8' in macro 'outisbusy'
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/200-08c5eec8'

If anyone know how to resolve my problem please, answer this post :smile:.

PS. Sorry if my english isn’t perfect i’m still learning :smile: