Asterisk problems with outgoing calls

Hi, I am newbie in Asterisk and I have a problem with outgoing call’s from my asterisk to my voip provider (freeconet)…

Softwear:
CentOS 6.4
Asterisk 1.8.24
FreePBX 2.9
X-Lite (soft phone)

Topology:

My provider (freeconet) - Asterisk (on CentOS) - X-lite

I can call on my voip number with succes, unfortunately when I tried to call from X-lite my call is automatically terminated.

Statement on ma soft phone:

Failed to estabilish call
Statement in terminal from Asterisk :
==Using SIP RTP TOS bits 184 ==Using SIP RTP CoS mark 5
Logfiles from my freePBX when i call to voip phone and from voip phone:
[Nov 29 08:18:55] VERBOSE[3647] asterisk.c: Asterisk Ready. [Nov 29 08:19:03] VERBOSE[3649] asterisk.c: -- Remote UNIX connection [Nov 29 08:19:08] VERBOSE[3672] netsock2.c: == Using SIP RTP TOS bits 184 [Nov 29 08:19:08] VERBOSE[3672] netsock2.c: == Using SIP RTP CoS mark 5 [Nov 29 08:19:08] VERBOSE[3691] pbx.c: -- Executing [przychodzace1@freeconet:1] Set("SIP/freeconet-in1-00000000", "TOHDR=") in new stack [Nov 29 08:19:08] VERBOSE[3691] pbx.c: -- Executing [przychodzace1@freeconet:2] GotoIf("SIP/freeconet-in1-00000000", "1?wew,133,1") in new stack [Nov 29 08:19:08] VERBOSE[3691] pbx.c: -- Goto (wew,133,1) [Nov 29 08:19:08] VERBOSE[3691] pbx.c: -- Executing [133@wew:1] Dial("SIP/freeconet-in1-00000000", "SIP/3784433,45,Tt") in new stack [Nov 29 08:19:08] VERBOSE[3691] netsock2.c: == Using SIP RTP TOS bits 184 [Nov 29 08:19:08] VERBOSE[3691] netsock2.c: == Using SIP RTP CoS mark 5 [Nov 29 08:19:08] VERBOSE[3691] app_dial.c: -- Called SIP/3784433 [Nov 29 08:19:09] VERBOSE[3691] app_dial.c: -- SIP/3784433-00000001 is ringing [Nov 29 08:19:12] VERBOSE[3691] pbx.c: == Spawn extension (wew, 133, 1) exited non-zero on 'SIP/freeconet-in1-00000000' [Nov 29 08:21:39] VERBOSE[3672] netsock2.c: == Using SIP RTP TOS bits 184 [Nov 29 08:21:39] VERBOSE[3672] netsock2.c: == Using SIP RTP CoS mark 5

My sip configuration:

context=default bindport=5060

srvlookup=yes
defaultexpiry=60
allowguest=no
dtmfmode=rfc2833
nat=yes

defaultexpiry=60
localnet=192.168.2.1/255.255.255.0
externip=77.252.253.170

register => login:[email protected]/przychodzace1

[freeconet-out]
type=peer

username=login
secret=pass
fromdomain=sip.freeconet.pl

context=freeconet
host=sip.freeconet.pl
port=5060
outboundproxy=sip.freeconet.pl
outboundproxyport=5060
insecure=no

[freeconet-in1]
type=peer
fromdomain=sip.freeconet.pl
port=5060
context=freeconet

My extensions file:

[defaul] exten => _.,1,Hangup

[freeconet]

exten =>przychodzace1,1,Set(TOHDR=${SIP_HEADER(To)})

exten =>przychodzace1,2,GotoIf($[“${REGEX(“223784433” ${TOHDR})}” = “1”]?wew,133,1)

[freeconet1]

include => wew

exten => t,1,Hangup

exten => h,1,Hangup

exten => _XXX.,1,SIPAddHeader(X-Fid: ${SIPCALLID})
exten => _XXX.,2,Set(CALLERID(num)=48223784433)
exten => _XXX.,3,Dial(SIP/${EXTEN}@freeconet-out)

[wew]

exten => 133,1,Dial(SIP/3784433,45,Tt)

sip show peers:

Name/username Host Dyn Forcerport ACL Port Status 3784433/3784433 192.168.2.104 D N 5060 Unmonitored freeconet-in1 213.218.116.65 N 5060 Unmonitored freeconet-in2 213.218.116.66 N 5060 Unmonitored freeconet-out/lukaszbiele 213.218.116.66 N 5060 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 4 online, 0 offline]

sip show registry:

Host dnsmgr Username Refresh State Reg.Time sip.freeconet.pl:5060 N lukaszbielec 45 Registered Thu, 28 Nov 2013 12:33:59 1 SIP registrations.

Support from my voip provider don’t want help…
In connection with this I ask you for help…

<--- SIP read from UDP:192.168.2.104:52610 ---> INVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-a1f24a611943cb62-1---d8754z-;rport Max-Forwards: 70 Contact: To: From: ;tag=18b3b07c Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc CSeq: 1 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/sdp Supported: replaces User-Agent: X-Lite release 4.5.5 stamp 71236 Content-Length: 306

v=0
o=- 13030197534578821 1 IN IP4 192.168.2.104
s=X-Lite 4 release 4.5.5 stamp 71236
c=IN IP4 192.168.2.104
t=0 0
m=audio 57762 RTP/AVP 125 9 8 0 100 101
a=rtpmap:125 opus/48000/2
a=fmtp:125 useinbandfec=1
a=rtpmap:100 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
— (13 headers 12 lines) —
Sending to 192.168.2.104:52610 (NAT)
Using INVITE request as basis request - MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
Found peer ‘3784433’ for ‘3784433’ from 192.168.2.104:52610

<— Reliably Transmitting (NAT) to 192.168.2.104:52610 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-a1f24a611943cb62-1—d8754z-;received=192.168.2.104;rport=52610
From: sip:[email protected];tag=18b3b07c
To: sip:[email protected];tag=as4b6ee874
Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
CSeq: 1 INVITE
Server: FPBX-2.9.0(1.8.24.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“6896b6b2”
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc’ in 32000 ms (Method: INVITE)
Retransmitting #1 (NAT) to 192.168.2.104:52610:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-a1f24a611943cb62-1—d8754z-;received=192.168.2.104;rport=52610
From: sip:[email protected];tag=18b3b07c
To: sip:[email protected];tag=as4b6ee874
Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
CSeq: 1 INVITE
Server: FPBX-2.9.0(1.8.24.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“6896b6b2”
Content-Length: 0


<— SIP read from UDP:192.168.2.104:52610 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-a1f24a611943cb62-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:52610
To: sip:[email protected]
From: sip:[email protected];tag=18b3b07c
Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.5.5 stamp 71236
Content-Length: 306

v=0
o=- 13030197534578821 1 IN IP4 192.168.2.104
s=X-Lite 4 release 4.5.5 stamp 71236
c=IN IP4 192.168.2.104
t=0 0
m=audio 57762 RTP/AVP 125 9 8 0 100 101
a=rtpmap:125 opus/48000/2
a=fmtp:125 useinbandfec=1
a=rtpmap:100 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
— (13 headers 12 lines) —
Ignoring this INVITE request

<— SIP read from UDP:192.168.2.104:52610 —>
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-a1f24a611943cb62-1—d8754z-;rport
Max-Forwards: 70
To: sip:[email protected];tag=as4b6ee874
From: sip:[email protected];tag=18b3b07c
Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
CSeq: 1 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— SIP read from UDP:192.168.2.104:52610 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-37ad243a1a026a1b-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:52610
To: sip:[email protected]
From: sip:[email protected];tag=18b3b07c
Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.5.5 stamp 71236
Authorization: Digest username=“3784433”,realm=“asterisk”,nonce=“6896b6b2”,uri="sip:[email protected]",response=“b51c87ea9ae3dc3488bc9a234340b1c7”,algorithm=MD5
Content-Length: 306

v=0
o=- 13030197534578821 1 IN IP4 192.168.2.104
s=X-Lite 4 release 4.5.5 stamp 71236
c=IN IP4 192.168.2.104
t=0 0
m=audio 57762 RTP/AVP 125 9 8 0 100 101
a=rtpmap:125 opus/48000/2
a=fmtp:125 useinbandfec=1
a=rtpmap:100 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
<------------->
— (14 headers 12 lines) —
Sending to 192.168.2.104:52610 (NAT)
Using INVITE request as basis request - MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
Found peer ‘3784433’ for ‘3784433’ from 192.168.2.104:52610
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Found RTP audio format 125
Found RTP audio format 9
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 100
Found RTP audio format 101
Found unknown media description format opus for ID 125
Found audio description format speex for ID 100
Found audio description format telephone-event for ID 101
Capabilities: us - 0x80030c7fffff (g723|gsm|ulaw|alaw|g726|adpcm|slin|lpc10|g729|speex|speex16|ilbc|g726aal2|g722|slin16|jpeg|png|h261|h263|h263p|h264|mpeg4|red|t140|siren7|siren14|testlaw|g719), peer - audio=0x20000100c (ulaw|alaw|speex16|g722)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x20000100c (ulaw|alaw|speex16|g722)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.2.104:57762
Looking for 900 in freeconet1 (domain 192.168.2.111)

<— Reliably Transmitting (NAT) to 192.168.2.104:52610 —>
SIP/2.0 484 Address Incomplete
Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-37ad243a1a026a1b-1—d8754z-;received=192.168.2.104;rport=52610
From: sip:[email protected];tag=18b3b07c
To: sip:[email protected];tag=as4b6ee874
Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
CSeq: 2 INVITE
Server: FPBX-2.9.0(1.8.24.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:192.168.2.104:52610 —>
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-a1f24a611943cb62-1—d8754z-;rport
Max-Forwards: 70
To: sip:[email protected];tag=as4b6ee874
From: sip:[email protected];tag=18b3b07c
Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
CSeq: 1 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— SIP read from UDP:192.168.2.104:52610 —>
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.2.104:52610;branch=z9hG4bK-d8754z-37ad243a1a026a1b-1—d8754z-;rport
Max-Forwards: 70
To: sip:[email protected];tag=as4b6ee874
From: sip:[email protected];tag=18b3b07c
Call-ID: MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc
CSeq: 2 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— SIP read from UDP:192.168.2.104:52610 —>

<------------->
Really destroying SIP dialog ‘MzQ4MTg2MTc1Nzc3MGI1NGFmYjUyNzViNDA5NzNlOTc’ Method: ACK

<— SIP read from UDP:192.168.2.104:52610 —>

<------------->

Anyone ??

You do not appear to be using “freepbx”