Problem with Ivcomming calls

I have last version of FreePBX.
The outgoing calls is OK, but I have a trouble with Incomming.
The asterisk and X-lite soft phone is behind NAT.
IP address of the Asterisk server is
In my sip_general_custom.conf I add these lines:

externhost = XXX.XXX.XXX.XXX ; My External IP 
externrefresh = 60
bindport = 5060 ; Port to bind to (SIP is 5060)
bindaddr = ; Address to bind to (all addresses on machine)
localnet =

Here is a snapshot of the Trunk and Inbounde Route:

When I try to make a call from outside telephone, in my Asterisk*CLI nothing is comming.An other side is busy tone.
Please help.

This looks as NAT issue.
Try to set qualify=yes in your peer details and check if the incoming INVITE reaches your server.

I try to add “qualify=yes” in Peers Details in Trunks, also in the User Details in Incomming Settings , but not is happend.
In my Router I forward UDP-5060 to 5061 to my Asterisk internal IP(
The CLI is stay empty.

Can you check with your provider how they see your SIP registration? We need to see the string like [email protected]:port

Make sure you have sip debug enabled for that peer.

My mistake, I forgot to set debug for this peer.After that:

<--- SIP read from --->
INVITE sip:[email protected] SIP/2.0
Record-Route: <sip:;lr=on;ftag=5B282A04-3E0;nat=yes>
Via: SIP/2.0/UDP;branch=z9hG4bKedf6.0c327f7.0
Via: SIP/2.0/UDP;rport=52681;branch=z9hG4bKBDD881534
Remote-Party-ID: "35932XXXXXX " <sip:[email protected]>;party=calling;screen=no;privacy=off
From: "359XXXXXXX " <sip:[email protected]>;tag=5B282A04-3E0
To: <sip:[email protected]>
Date: Mon, 01 Jun 2009 13:27:30 GMT
Call-ID: [email protected]
Supported: 100rel,timer,resource-priority,replaces
Min-SE:  1800
Cisco-Guid: 3400172442-1306923486-3028413264-2550145183
User-Agent: Cisco-SIPGateway/IOS-12.x
CSeq: 101 INVITE
Timestamp: 1243862850
Contact: <sip:[email protected]:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 67
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 330

o=CiscoSystemsSIP-GW-UserAgent 7744 2716 IN IP4
s=SIP Call
c=IN IP4
t=0 0
m=audio 18316 RTP/AVP 8 0 18 101
c=IN IP4
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

--- (23 headers 14 lines) ---
Sending to : 5060 (no NAT)
Using INVITE request as basis request - [email protected]
Found peer 'CoolBox511'
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x10c (ulaw|alaw|g729)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port
Looking for s in from-CoolBox511 (domain XXX.XXX.XXX.XXX (My IP))

<--- Reliably Transmitting (no NAT) to --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP;branch=z9hG4bKedf6.0c327f7.0;received=
Via: SIP/2.0/UDP;rport=52681;branch=z9hG4bKBDD881534
From: "35932XXXXXX " <sip:[email protected]>;tag=5B282A04-3E0
To: <sip:[email protected]>;tag=as35ad7e9c
Call-ID: [email protected]
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Supported: replaces
Content-Length: 0

Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
<--- SIP read from --->
ACK sip:[email protected] (My IP) SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bKedf6.0c327f7.0
From: "35932XXXXXX " <sip:[email protected]>;tag=5B282A04-3E0
Call-ID: [email protected]
To: <sip:[email protected]>;tag=as35ad7e9c
CSeq: 101 ACK
Max-Forwards: 70
Content-Length: 0

--- (8 headers 0 lines) ---
Really destroying SIP dialog '[email protected]' Method: ACK

In my log file :

[Jun  1 16:26:18] NOTICE[5310] chan_sip.c: Call from '35932XXXXXX' to extension 's' rejected because extension not found.

put “context=from-trunk” into your PEER Details

Please look the screenshot:

In User Details, I have: context=from-trunk.

Please look into my answer. I’m not talking about “User Details”.

OK, I understand.Tomorow mornig I try to change in peer details: context=from-CoolBoxx511 to context=from-internal.But from my memorys, in this case I don’t make a Outgoing calls.After this attempt, I post the results.Thank You very much in advance for Your help.

After I cahnge the context=from-trunk everythig is OK.
Thank You very much for Your help.