Pages

Tuesday, 3 December 2013

Incomming callerid in asterisk with digium TDM or analog cards

Troubleshooting the CalllerID issue in the FXO cards in Asteirsk

Troubleshoot No:1
If the analog phone shows the CallerID on every call, we could potentially be facing a misconfiguration of your Asterisk server. 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 
http://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,
========================

  1. define DTMF_THRESHOLD 8.0e7
  2. define FAX_THRESHOLD 8.0e7
  3. define FAX_2ND_HARMONIC 2.0 /* 4dB */
  4. define RADIO_RELAX // add this line
  5. ifdef RADIO_RELAX
  6. define DTMF_NORMAL_TWIST 
=========================
after editing, recompiling asterisk.  

ref: http://wiki.openvox.cn/index.php/Troubleshooting_of_Analog_cards#Q6.2C_You_can_not_get_the_callerid
http://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

        You can get it from alibaba.com
and

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

ref:http://wiki.sangoma.com/wanpipe-linux-asterisk-appendix

No comments:

Post a Comment