Incoming call says "number not in service"

I am new to asterisk/freepbx. After installing FreePBX, I set up a couple extensions, configured a couple phones, and they successfully made internal calls. I then added a Sipgate trunk, and an inbound route to ring one of my extensions. When I call the sipgate number, the system status page shows:
Total active calls 1
Internal calls 0
External calls 0
Total active channels 1
and plays the message "The number you have dialed is not in service…"
I have been trying various settings for the trunk and inbound route that people have said worked for them, to no avail.

my settings follow, accounts and passwords have been changed.

Extensions: 101, 102, 103

Trunk PEER Details:
allow=ulaw
caninvite=no
canreinvite=no
context=from-trunk
disallow=all
fromdomain=sipgate.com
fromuser=9999999e9
host=sipgate.com
insecure=invite
nat=no
secret=999999
type=peer
username=9999999e9

Inbound Route:
DID number: 10 digit number in account
Destination: Extensions <101>

Since the status numbers change when I call my Sipgate number, I assume asterisk is receiving the call but doesn’t know what to do with it. How do I start troubleshooting this?

You have no allowed codecs.

disallow=all

I read a bit about the trunk settings and now realize how the order matters, and how the disallow was overriding the allow. I have copied a new configuration I found on my providers help section:
type=peer
secret=999999
insecure=invite
username=9999999e9
defaultuser=9999999e9
fromuser=9999999e9
context=from-trunk
fromdomain=sipgate.com
host=sipgate.com
outboundproxy=sipgate.com
qualify=yes
disallow=all
allow=ulaw
dtmfmode=rfc2833

This produces the same result as before. On the help page, sipgate uses a context of ‘sipgate_in’, which they define, but I don’t know what it means or how to add it to FreePBX.
http://www.sipgate.com/faq/article/394/How_do_I_configure_Asterisk

What it my next step?

In the inbound route I changed the DID number from my pstn number to the username for my sip connection (9999999e9) and the call went through.
I did that after looking in the asterisk console. I read enough to figure out “sip set debug on” and read through the log. I saw this line:
INVITE sip:[email protected]:5060 SIP/2.0

Was that the right thing to do or did I just make a lucky guess?

If that is what they send you, then that is what you will have to use but I note that 9999999e9 is not e164 so what happens when you call your “real” number from outside the system? Maybe look further into the sip transactions and see if your real DID is in there somewhere in another header.

I guess it only works with the username as the DID. It kind of makes since this isn’t really a DID. Sipgate is really a pbx service, with multiple DIDs and extensions that you can route. I used them because I’ve had an account with them for a while. They have a free account (1 DID) and free incoming calls. FreePBX is registering as one of the extensions on my account.

Everything seems to be working fine now. Thank you for your help.