Incoming calls not reaching a working extension

I have spent countless hours trying to properly set up the trunk/extension; i have read dozens of forms messages before posting here. I’m new to asterisk and FreePbx, I apologize if somebody finds this post elementary.

System: Asterisk 1.8.5.0 + FreePbx 2.9 running on CentOS 5.6

Hardware: Pc with Pentium 4; 2 analog phones (on ATA Sipura SPA2002 with admin-advanced access).
Software: X-lite

Extensions: 2609 (Line 1 on the ATA); 502 (Line 2 on teh ATA); 701 on the X-Lite.

SIP providers:

  1. Line 1 and Line 2 have two different providers; Line 1, (US provider) can call the US (local and long distance) and receive calls from anywhere.
  2. Line 2 can only receive calls; Line 2 is configured with an italian provider.
    The softphone does not have any SIP provider registered and is used only for testing, but can be also used to receive calls.

The trunk registers and is online; the phones also appear on line. The softphone also is online. In summary: 1 Trunk registers; 1 trunk online; 3 phones online.

Current situation:

  1. Internal calls: if I place a call to/from the extensions (internal calls) it all works great.
  2. When i place a call from my cell phone to Line 1 (ATA, US number with US provider) the call is properly received by the extension (2609).
  3. If a call is received on the italian number it is not forwarded to the extension; the IVR picks up the call and “looks for somebody to take the call” and is forwarded to the softphone (ext 701) when on, otherwise it goes to the softphone’voicemail (voicemail of extension 701).

I configured the trunk and the extensions in this way through FreePbx (GUI):
(the italian provider i want to use is messagenet.it)

Trunk Name: UID assigned by messagenet.it;
outbound callerID: tel # (assigned by messagenet.it)
DNM Rules: empty

[Outgoing]
Trunk name: UserID Messagenet
authname=UserID Messagenet
authuser=USerID Messagenet
canreinvite=no
dtmfmode=rfc2833
fromdomain=sip.messagenet.it
fromuser=USerID Messagenet
host=sip.messagenet.it
insecure=invite,port
nat=yes
port=5061
regexten=UserID
secret=password
type=peer&peer
username=UserID
qualify=no
auth=md5
context=from-trunk

[incoming]
user context: tel # (assigned by messagenet.it)
register=USerID:[email protected]:5061/tel#
context=from-trunk
fromuser=UserID
host=sip.messagenet.it
insecure=very
secret=Password
type=friend
user=UserID
username=UserID
exten=>tel#,1,Dial(SIP/502,20)

[extension]
User Extension: 502
Display name: 502

Device Options
secret:password
dtmfmode :RFC2833
canreinvite :no
host :dynamic
trustrpid :yes
sendrpid :no
type :friend
nat :yes
port :5061
qualify :yes
qualifyfreq :60
transport :udp only
encryption :no
callgroup
pickupgroup
disallow
allow
dial :SIP/502
accountcode
mailbox :502@device
vmexten
deny 0.0.0.0/0.0.0.0
permit 192.168.0.0/255.255.255.
Custom Context: allow all

What am i missing???

Thanks,
Robert

But; did you configure your phone? meaning going to the phone menu and setting up the SIP Information. Also make sure you check the register phone option and that is necessary otherwise it will not work.

Also can you please post your freepbx status? It will show if they phones are registered or if its even online.

This configuration i have set on the ATA:

Line enabled: yes
Sas Enabled:no
Sas Refresh int: 30
Nat Mapping enable:no
Nat keep alive:no
Nat keep alive msg: $NOTIFY
Nat keep alive dest:$PROXY
Network Jitter: low
Jitter buff. Adj: up and down
Sip port: 5061
Sip100REL Enable:no
ext sip port: [empty]
Sip Proxy-Require: [empty]
Sip-Remote party:yes
sip guide:no
sip debug option:none;
Rtp Log intvl: 0
restrict source ip:no
referor by delay:4
refer target:0
referee by delay:0
refer to target contact: no

Blind attn-xfer enable:no
MOH server:[empty]
Xfer hen hung up:yes
Conference bridge:[empty]
conference ports:3

Proxy and Registration
Proxy: 192.168.0.195 (Asterisk server)
Use Outbound Proxy: NO
Outbound Proxy:[empty]
Use OB Proxy In Dialog: yes
Register:yes
Make Call Without Reg: yes
Register Expires:300
Ans Call Without Reg:yes
Use DNS SRV:no
DNS SRV Auto Prefix: no
Proxy Fallback Intvl:3600
Proxy Redundancy Method:normal
Voice Mail Server: [empty]
Mailbox Subscribe Expires:2147483647

Subscriber Information
Display Name:502
User ID:502
Password:(502 ext’password)
Use Auth ID:yes
Auth ID:502
Mini Certificate:empty
SRTP Private Key:empty

hope this helps. seriously i’m going crazy. i don’t know what esle to check