[solved] Additional DID number not in service?

I had this problem when I was first setting up FreePBX where all calls made to my system were getting a not in service message. Once I removed the DID Number under the Incoming Route it started working.

I am now trying to setup another DID number to route to the same IVR but I’m getting the same not in service message again. I am really at loss as to what the problem could be. The following is what I see (DID number 61865557905):

-- Executing [[email protected]:1] Set("SIP/46.19.209.14-0000000e", "__FROM_DID=61865557905") in new stack -- Executing [[email protected]:2] NoOp("SIP/46.19.209.14-0000000e", "Received an unknown call with DID set to 61865557905") in new stack -- Executing [[email protected]:3] Goto("SIP/46.19.209.14-0000000e", "s,a2") in new stack -- Goto (from-trunk,s,2) -- Executing [[email protected]:2] Answer("SIP/46.19.209.14-0000000e", "") in new stack -- Executing [[email protected]:3] Wait("SIP/46.19.209.14-0000000e", "2") in new stack -- Executing [[email protected]:4] Playback("SIP/46.19.209.14-0000000e", "ss-noservice") in new stack -- <SIP/46.19.209.14-0000000e> Playing 'ss-noservice.gsm' (language 'en')

A working call to the catch-all route:

-- Executing [[email protected]:1] Set("SIP/46.19.209.14-00000001", "__FROM_DID=16042484822") in new stack -- Executing [[email protected]:2] Gosub("SIP/46.19.209.14-00000001", "app-blacklist-check,s,1()") in new stack -- Executing [[email protected]:1] GotoIf("SIP/46.19.209.14-00000001", "0?blacklisted") in new stack -- Executing [[email protected]:2] Set("SIP/46.19.209.14-00000001", "CALLED_BLACKLIST=1") in new stack -- Executing [[email protected]:3] Return("SIP/46.19.209.14-00000001", "") in new stack -- Executing [[email protected]:3] Set("SIP/46.19.209.14-00000001", "CDR(did)=16042484822") in new stack -- Executing [[email protected]:4] ExecIf("SIP/46.19.209.14-00000001", "1 ?Set(CALLERID(name)=778861xxxx)") in new stack -- Executing [[email protected]:5] Ringing("SIP/46.19.209.14-00000001", "") in new stack ...

The DID Number is not set to anything for the catch-all route.

I have added these (http://www.flynumber.com/asterisk-pbx-configuration) to my sip_custom.conf (minus the context=from-fly).

pbx*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 46.19.209.10 46.19.209.10 N 5060 Unmonitored 46.19.209.11 46.19.209.11 N 5060 Unmonitored 46.19.209.12 46.19.209.12 N 5060 Unmonitored 46.19.209.13 46.19.209.13 N 5060 Unmonitored 46.19.209.14 46.19.209.14 N 5060 Unmonitored 46.19.209.15 46.19.209.15 N 5060 Unmonitored 46.19.209.75 46.19.209.75 N 5060 Unmonitored 46.19.209.76 46.19.209.76 N 5060 Unmonitored 46.19.209.77 46.19.209.77 N 5060 Unmonitored 46.19.209.78 46.19.209.78 N 5060 Unmonitored 46.19.209.79 46.19.209.79 N 5060 Unmonitored 46.19.209.80 46.19.209.80 N 5060 Unmonitored 46.19.210.10 46.19.210.10 N 5060 Unmonitored 46.19.210.11 46.19.210.11 N 5060 Unmonitored 46.19.210.12 46.19.210.12 N 5060 Unmonitored 46.19.210.13 46.19.210.13 N 5060 Unmonitored 46.19.210.14 46.19.210.14 N 5060 Unmonitored 46.19.210.15 46.19.210.15 N 5060 Unmonitored 46.19.210.75 46.19.210.75 N 5060 Unmonitored 46.19.210.76 46.19.210.76 N 5060 Unmonitored 46.19.210.77 46.19.210.77 N 5060 Unmonitored 46.19.210.78 46.19.210.78 N 5060 Unmonitored 46.19.210.79 46.19.210.79 N 5060 Unmonitored 46.19.210.80 46.19.210.80 N 5060 Unmonitored voipms/144481 74.54.54.178 N 5060 Unmonitored 25 sip peers [Monitored: 0 online, 0 offline Unmonitored: 25 online, 0 offline]

Any help will greatly be appreciated.

Asterisk 1.8.14.1
Freepbx 2.10
CentOS 5.6

The second example did not come from the DID you cited.

It also looks like neither of them is matching your peer settings anyway.

I have updated the original post to make a little more sense. The DID number is empty under Incoming Route (catch-all) which was set-up that way because when I put a number in I would get the no service message.

So to recap when I put a DID number in I get a not in service message. I can leave it blank and it works but I need to add another DID number.

What context did you put in sip_custom.conf? Also it should be insecure-port,invite

Not sure why your did did not match. Put the route back in and make sure the context is frm_trunk. Instead of naming the peers the IP address change it to fly1, fly2 etc. Will make the log easier to read.

Also once you add the route send us a DB list:

login to mysql then:

user asterisk;
select * from incoming;

Post the results in a fixed pitch font (like you did your trunk details, nice job) so we can read it.

This is what my updated sip_custom.conf looks like:

[code]context=from-trunk
insecure=port,invite

[f10]
host=46.19.209.10
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f11]
host=46.19.209.11
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f12]
host=46.19.209.12
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f13]
host=46.19.209.13
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f14]
host=46.19.209.14
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f15]
host=46.19.209.15
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f75]
host=46.19.209.75
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f76]
host=46.19.209.76
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f77]
host=46.19.209.77
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f78]
host=46.19.209.78
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f79]
host=46.19.209.79
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[f80]
host=46.19.209.80
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g10]
host=46.19.210.10
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g11]
host=46.19.210.11
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g12]
host=46.19.210.12
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g13]
host=46.19.210.13
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g14]
host=46.19.210.14
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g15]
host=46.19.210.15
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g75]
host=46.19.210.75
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g76]
host=46.19.210.76
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g77]
host=46.19.210.77
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g78]
host=46.19.210.78
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g79]
host=46.19.210.79
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all

[g80]
host=46.19.210.80
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-trunk
insecure=port,invite
nat=never
allow=all[/code]

MySQL:

mysql> select * from incoming; +-------------+-------------+-------------+----------+----------+--------+------+------------+-----------+---------+----------+-------------+--------+--------------+--------+--------------+-------------+ | cidnum | extension | destination | faxexten | faxemail | answer | wait | privacyman | alertinfo | ringing | mohclass | description | grppre | delay_answer | pricid | pmmaxretries | pmminlength | +-------------+-------------+-------------+----------+----------+--------+------+------------+-----------+---------+----------+-------------+--------+--------------+--------+--------------+-------------+ | | 16042484822 | ivr-1,s,1 | NULL | NULL | NULL | NULL | 0 | | CHECKED | default | from-fly | | 0 | | 3 | 10 | | 61865557905 | 61865557905 | ivr-1,s,1 | NULL | NULL | NULL | NULL | 0 | | | default | Australia | | 0 | | 3 | 10 | +-------------+-------------+-------------+----------+----------+--------+------+------------+-----------+---------+----------+-------------+--------+--------------+--------+--------------+-------------+ 2 rows in set (0.00 sec)

You need to take the cidnum out of the route also. It will only match calls with that cid.

Perfect it’s working now. Thank you very much for your help!