Incoming callerid digium TDM or analog cards

  Troubleshooting the CalllerID issue in the FXO cards in Asteirsk



Troubleshoot No:1

The following section will discuss how Caller ID detection works in Asterisk and the different options that you have avaialble.
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.

useincomingcalleridondahditransfer = yes
callerid = asreceived

sendcalleridafter = 2
dtmfcidlevel=256

Troubleshoot No:2

Wctdm.c patch by Openvox team
1) you MUST subscribe callerid from your provider.
2) you MUST know the format of callerid(dtmf or fsk). you can ask your provider for that info, if you do not know that.
3) this patch ONLY supports callerid with DTMF format.
4) you MUST know how the callerid is sent(beforeing first ring, or after first ring). You can hear that.
5) you SHOULD know how to compile dahdi  and asterisk.

1) download the patch from https://downloads.openvox.cn/pub/drivers/callerid_patches/
    download based on your dahdi version to be installed , un tar the file , u can see filename wctdm.c
2) If it is wctdm.c, you replace original wctdm.c(under dahdi-2.5.X/linux/drivers/dahdi) with the newpatched wctdm.c.
3) run command: make all, make install. after rebooting it, you can edit the chan_dahdi.conf and load the module by:
1) you MUST change the two parameters in zapata.conf to this:
cidsignalling=dtmf // MUST BE dtmf
cidstart=polarity // MUST BE polarity
2) modprobe dahdi // load dahdi driver

Optional changes which also have imapact in callerid

edit the line:
in asterisk/main/dsp.c,
========================
define DTMF_THRESHOLD 8.0e7
define FAX_THRESHOLD 8.0e7
define FAX_2ND_HARMONIC 2.0 /* 4dB */
define RADIO_RELAX // add this line
ifdef RADIO_RELAX
define DTMF_NORMAL_TWIST
=========================
after editing, recompiling asterisk. 

ref: https://wiki.openvox.cn/index.php/Troubleshooting_of_Analog_cards#Q6.2C_You_can_not_get_the_callerid
https://bbs.openvox.cn/viewthread.php?tid=831&extra=page%3D1

Troubleshoot No:3

link : https://wiki.asterisk.org/wiki/display/AST/Caller+ID+in+India

Troubleshoot No:4

 ( worked for me and best solution)

Dtmf to FSk  callerid Converter


       

Callerid in Sangoma cards

How To Enable DTMF CID (Caller ID)
The average analog line uses what is called FSK caller ID. This sends the CID info via the FSK format. Now in some areas the CID info is sent through DTMF tones; these are the same tones you use to navigate an IVR.
Below is the steps to enable DTMF CID in Asterisk and Wanpipe.
Add the line "RM_FAKE_POLARITY = YES" into /etc/wanpipe/wanpipe*.conf in the wanpipeX section. 
Add "cidsignalling=dtmf" and "cidstart=polarity" into /etc/asterisk/chan_dahdi.conf
Or in some regions the following needs to be done, the difference is "polarity_IN" for details on this see https://www.voip-info.org/wiki/view/Asterisk+Documentation+1.6.1+India-CID.txt  
Add the line "RM_FAKE_POLARITY = YES" into /etc/wanpipe/wanpipe*.conf in the wanpipeX section.
Add "cidsignalling=dtmf" and "cidstart=polarity_IN" into /etc/asterisk/chan_dahdi.conf

ref:https://wiki.sangoma.com/wanpipe-linux-asterisk-appendix
Next Post Previous Post
1 Comments
  • gopi baskar
    gopi baskar April 4, 2022 at 11:40 AM

    Troubleshooting the CalllerID issue in the FXO cards in Asteirsk

Add Comment
comment url