Incoming CID 'UNKNOWN' Sangoma A200

Here is the deal, I have FreePBX 2.11.0.9, Asterisk 11.4, dahdi 2.6.2, wanpipe 7.0.3. I am using a Sangoma A200 FXO card and have 7 POTS lines from Verizon (New Jersey).

I have a DAHDI channel setup (g0) and it has the 6 lines in it. The last DAHDI group (g63) is just to segregate an empty channel, and DAHDI group (g62) is a line I want to always keep open for inbound calls in the event the other 5 are in use for outbound.

Everything seems to work, except that I don’t get any inbound CID. I have put the lines in a CID-enabled analog phone outside of FreePBX and have verified CID w/name does work and is displayed on the phones. All of the lines are clear, and plenty loud on both ends.

When I get an inbound call this is what comes across the Asterisk CLI:

[2013-07-17 13:22:59] VERBOSE[22378][C-0000001d] sig_analog.c: – Starting simple switch on ‘DAHDI/6-1’
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/6-1”, "Entering from-dahdi with DID == ") in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:2] Ringing(“DAHDI/6-1”, “”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:3] Set(“DAHDI/6-1”, “DID=s”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:4] NoOp(“DAHDI/6-1”, “DID is now s”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:5] GotoIf(“DAHDI/6-1”, “1?dahdiok:checkzap”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Goto (from-analog,s,9)
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:9] NoOp(“DAHDI/6-1”, “Is a DAHDi Channel”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:10] Set(“DAHDI/6-1”, “CHAN=6-1”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:11] Set(“DAHDI/6-1”, “CHAN=6”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:12] Macro(“DAHDI/6-1”, “from-dahdi-6,s,1”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/6-1”, “Entering macro-from-dahdi-6 with DID = s and setting to: 7326711073”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:2] Set(“DAHDI/6-1”, “__FROM_DID=7326711073”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:3] Goto(“DAHDI/6-1”, “from-trunk,7326711073,1”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Goto (from-trunk,7326711073,1)
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] app_macro.c: == Channel ‘DAHDI/6-1’ jumping out of macro ‘from-dahdi-6’
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/6-1”, “Catch-All DID Match - Found 7326711073 - You probably want a DID for this.”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:2] Goto(“DAHDI/6-1”, “ext-did,s,1”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Goto (ext-did,s,1)
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] ExecIf(“DAHDI/6-1”, “0?Set(__FROM_DID=s)”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:2] Gosub(“DAHDI/6-1”, “app-blacklist-check,s,1()”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] GotoIf(“DAHDI/6-1”, “0?blacklisted”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:2] Set(“DAHDI/6-1”, “CALLED_BLACKLIST=1”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:3] Return(“DAHDI/6-1”, “”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:3] Set(“DAHDI/6-1”, “CDR(did)=7326711073”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:4] ExecIf(“DAHDI/6-1”, “1 ?Set(CALLERID(name)=)”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:5] Set(“DAHDI/6-1”, “__CALLINGPRES_SV=allowed_not_screened”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:6] Set(“DAHDI/6-1”, “CALLERPRES()=allowed_not_screened”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:7] Goto(“DAHDI/6-1”, “timeconditions,1,1”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Goto (timeconditions,1,1)
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] GotoIfTime(“DAHDI/6-1”, “10:00-19:00,mon-fri,1-31,jan-dec?truestate”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Goto (timeconditions,1,7)
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:7] GotoIf(“DAHDI/6-1”, “0?falsegoto”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:8] ExecIf(“DAHDI/6-1”, “0?Set(DB(TC/1)=)”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:9] GotoIf(“DAHDI/6-1”, “1?ivr-1,s,1”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Goto (ivr-1,s,1)
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] Set(“DAHDI/6-1”, “TIMEOUT_LOOPCOUNT=0”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:2] Set(“DAHDI/6-1”, “INVALID_LOOPCOUNT=0”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:3] Set(“DAHDI/6-1”, “_IVR_CONTEXT_ivr-1=”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:4] Set(“DAHDI/6-1”, “_IVR_CONTEXT=ivr-1”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:5] Set(“DAHDI/6-1”, “__IVR_RETVM=”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:6] GotoIf(“DAHDI/6-1”, “0?skip”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:7] Answer(“DAHDI/6-1”, “”) in new stack
[2013-07-17 13:23:01] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:8] Wait(“DAHDI/6-1”, “1”) in new stack
[2013-07-17 13:23:01] WARNING[22378][C-0000001d] sig_analog.c: Ring/Off-hook in strange state 6 on channel 6
[2013-07-17 13:23:02] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:9] Set(“DAHDI/6-1”, “IVR_MSG=custom/PowersportsOpeningGreeting”) in new stack
[2013-07-17 13:23:02] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:10] Set(“DAHDI/6-1”, “TIMEOUT(digit)=3”) in new stack
[2013-07-17 13:23:02] VERBOSE[22378][C-0000001d] func_timeout.c: – Digit timeout set to 3.000
[2013-07-17 13:23:02] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:11] ExecIf(“DAHDI/6-1”, “1?Background(custom/PowersportsOpeningGreeting)”) in new stack
[2013-07-17 13:23:02] VERBOSE[22378][C-0000001d] file.c: – <DAHDI/6-1> Playing ‘custom/PowersportsOpeningGreeting.slin’ (language ‘en’)
[2013-07-17 13:23:15] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:12] WaitExten(“DAHDI/6-1”, “10,”) in new stack
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Timeout on DAHDI/6-1, going to ‘t’
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] Set(“DAHDI/6-1”, “TIMEOUT_LOOPCOUNT=1”) in new stack
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:2] GotoIf(“DAHDI/6-1”, “0?final”) in new stack
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:3] Set(“DAHDI/6-1”, “IVR_MSG=no-valid-responce-pls-try-again”) in new stack
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:4] Goto(“DAHDI/6-1”, “s,start”) in new stack
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Goto (ivr-1,s,10)
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:10] Set(“DAHDI/6-1”, “TIMEOUT(digit)=3”) in new stack
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] func_timeout.c: – Digit timeout set to 3.000
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:11] ExecIf(“DAHDI/6-1”, “1?Background(no-valid-responce-pls-try-again)”) in new stack
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] file.c: – <DAHDI/6-1> Playing ‘no-valid-responce-pls-try-again.slin’ (language ‘en’)
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: == Spawn extension (ivr-1, s, 11) exited non-zero on ‘DAHDI/6-1’
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: – Executing [[email protected]:1] Hangup(“DAHDI/6-1”, “”) in new stack
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] pbx.c: == Spawn extension (ivr-1, h, 1) exited non-zero on ‘DAHDI/6-1’
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] sig_analog.c: – Hanging up on ‘DAHDI/6-1’
[2013-07-17 13:23:25] VERBOSE[22378][C-0000001d] chan_dahdi.c: – Hungup ‘DAHDI/6-1’

In the CDR all the inbound caller ID show up as ‘UNKNOWN’ and none of the SIP phones show UNKNOWN on inbound calls.

Even though I’m in the United States and these settings are defaults, I have tried putting the following DAHDI settings in:
usecallerid=yes
cidsignalling=bell
cidstart=ring

These have no effect, I still don’t get CID. Occasionally I will see “no start bit found in fsk data” in the CLI, but not very often. Here are my config files:

dahdi-channels.conf:

; Autogenerated by /usr/sbin/dahdi_genconf on Wed Jul 17 08:27:12 2013
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WRTDM/0 “wrtdm Board 1” (MASTER)
;;; line="1 WRTDM/0/0 FXSKS (In use) (EC: WANPIPE_HWEC - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default

;;; line="2 WRTDM/0/1 FXSKS (In use) (EC: WANPIPE_HWEC - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 2
callerid=
group=
context=default

;;; line="3 WRTDM/0/2 FXSKS (In use) (EC: WANPIPE_HWEC - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
callerid=
group=
context=default

;;; line="4 WRTDM/0/3 FXSKS (In use) (EC: WANPIPE_HWEC - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 4
callerid=
group=
context=default

;;; line="5 WRTDM/0/4 FXSKS (In use) (EC: WANPIPE_HWEC - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 5
callerid=
group=
context=default

;;; line="6 WRTDM/0/5 FXSKS (In use) (EC: WANPIPE_HWEC - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 6
callerid=
group=
context=default

;;; line="7 WRTDM/0/6 FXSKS (In use) (EC: WANPIPE_HWEC - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 7
callerid=
group=
context=default

;;; line="8 WRTDM/0/7 FXSKS (In use) (EC: WANPIPE_HWEC - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 8
callerid=
group=
context=default

chan_dahdi.conf:

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=yes
busycount=5
usecallerid=yes
callwaiting=no
usecallingpres=no
threewaycalling=no
transfer=no
cancallforward=no
callreturn=no
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=no
faxdetect=no
rxgain=0
txgain=0

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf

chan_dahdi_additional.conf:

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

chan_dahdi_channels_custom.conf:
(it’s blank)

chan_dahdi_general.conf:

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

chan_dahdi_general_custom.conf
(it’s blank)

chan_dahdi_groups.conf:

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

signalling=fxs_ks
context=from-analog
group=0
channel=>1

signalling=fxs_ks
context=from-analog
group=0
channel=>2

signalling=fxs_ks
context=from-analog
group=0
channel=>3

signalling=fxs_ks
context=from-analog
group=0
channel=>4

signalling=fxs_ks
context=from-analog
group=0
channel=>5

signalling=fxs_ks
context=from-analog
group=0
channel=>6

signalling=fxs_ks
context=from-analog
group=62
channel=>7

signalling=fxs_ks
context=from-analog
group=63
channel=>8

/etc/dahdi/system.conf:

#--------------------------------------------------------------------------------;

Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;

this file must be done via the web gui. There are alternative files to make ;

custom modifications, details at: http://freepbx.org/configuration_files ;

#--------------------------------------------------------------------------------;

fxsks=1-8
loadzone=us
defaultzone=us

I can only assume that the default cistart & cidsignalling are correct since I’m using Verizon in the United States, but I have spent days on hold with Verizon and nobody has a clue what I’m talking about. Like I said, I have tried changing these settings but it doesn’t help.

I’m not sure where to turn, I’ve been ripping my hair out over this, someone PLEASE help!

I was able to catch the FSK error that occasionally appears. Here it is:

Hookstate (FXS only): Offhook
[2013-07-17 15:12:15] ERROR[28410][C-00000053]: callerid.c:566 callerid_feed: No start bit found in fsk data.
[2013-07-17 15:12:15] WARNING[28410][C-00000053]: chan_dahdi.c:1825 my_get_callerid: Failed to decode CallerID
[2013-07-17 15:12:16] ERROR[28410][C-00000053]: callerid.c:566 callerid_feed: No start bit found in fsk data.
[2013-07-17 15:12:16] WARNING[28410][C-00000053]: chan_dahdi.c:1825 my_get_callerid: Failed to decode CallerID

This error rarely comes up.

NANP service providers will never use FSK CID signaling. Check your work, the defaults for Asterisk/FreePBX will always work in NANP land if it is paid for and enabled.

Where else should I check? All of my DAHDI related configs are above.

I tried setting cidsignalling=bell and cidstart=ring but it didn’t make a difference.

In Asterisk, the CallerID detection is done by the chan_dahdi module. Normally its configuration file is located on /etc/asterisk/chan_dahdi.conf and there are three variables that control how the feature works: usecallerid: Sets whether to use caller ID, "yes" or "no" are the only available options cidsignalling: Determine type of caller ID signaling in use. The Caller ID signaling types supported by Asterisk are: bell: bell202 as used in US (default) v23: v23 as used in the UK v23_jp: v23 as used in Japan dtmf: DTMF as used in Denmark, Sweden and Netherlands smdi: Use SMDI for caller ID. Requires SMDI to be enabled cidstart: Determine signals the start of caller ID. The options supported by Asterisk are: ring: A ring signals the start (default) polarity: Polarity reversal signals the start polarity_IN: Polarity reversal signals the start, DTMF dialtone detection in India dtmf: DTMF Caller ID spill begins only with DTMF, at various times before the ring. This causes Asterisk to constantly listen for DTMF CallerID signals on the specified channels If cidstart is configured to use dtmf, the energy level on the line may need to be tuned to properly identify the DTMF tones. This tuning is done with the dtmfcidlevel configuration option. The specified value is compared to the average over a packet of audio level of the absolute value of 16 bit signed linear samples. The default is set to 256, but this is completely arbitrary. It must be set high enough to prevent false detections, while low enough to ensure no dtmf spills are missed.

Also, like I stated before, CID is definitely on the line, I put the lines in phones with caller-id, then called from my cell, and the phones displayed name & number.

Read your post

bell: bell202 as used in US (default)

If you are using the Sangoma driver, then I believe it preempts Dahdi here.

I’m not sure what you are talking about. I already stated I tried explicitly setting cidsignalling=bell and it didn’t work. Additionally you can’t install the sangoma driver (wanpipe) without first installing DAHDI. Can you please explain what you mean?

Can anyone help?

I need this working too.