[asterisk-users] dtmf Caller-id detection before first ring
Ashik Ali
beaasteriskguru at gmail.com
Tue May 31 03:05:56 CDT 2011
We don't have polarity reversal before first ring I think so. Not confirmed.
I able to see and hear dtmf and ring tones while playing recorded
wave file using audacity. As per the instruction given by Mr. Pezhman
Lai. I found somthing
while googling . The bug instructions as follows
https://issues.asterisk.org/view.php?id=9096&nbn=2.
I am using 8 port digium tdm card. So I decided edit
wctdm24xxp/base.c as per the instruction written in above issue. As
of now I didn't touch asterisk chan_dahdi.c.
I modified base.c code as follows,
static void wctdm_dtmfcheck_fakepolarity(struct wctdm *wc, int card, u8 sample8)
{
u32 sample16;
struct fxo *const fxo = &(wc->mods[card].fxo);
/* only look for sound on the line if dtmf flag is on, it is an fxo
* card and line is onhook */
if (!dtmf || !(wc->cardflag & (1 << card)) ||
(wc->modtype[card] != MOD_TYPE_FXO) || fxo->offhook) {
return;
}
/* don't look for noise if we're already processing it, or there is a
* ringing tone */
if (!fxo->readcid && !fxo->wasringing &&
wc->intcount > fxo->cidtimer + 400) {
sample16 = DAHDI_XLAW(sample8, wc->chans[card]);
if (sample16 > 2000 || sample16 < -2000) {
fxo->readcid = 1;
fxo->cidtimer = wc->intcount;
if (debug && ( card == 2 )) {
printk(KERN_DEBUG "DTMF CLIP on
<<<%i>>> <%X>\n",
card + 1,sample16);
}
// dahdi_qevent_lock(wc->chans[card],
// DAHDI_EVENT_POLARITY);
}
} else if (fxo->readcid && wc->intcount > fxo->cidtimer + 2000) {
/* reset flags if it's been a while */
fxo->cidtimer = wc->intcount;
fxo->readcid = 0;
}
}
After compilation of above, I just restarted dahdi and monitored
kernel message. I got following messages before receiving call
DTMF CLIP on <<<3>>> <68>
DTMF CLIP on <<<3>>> <84>
DTMF CLIP on <<<3>>> <58>
DTMF CLIP on <<<3>>> <78>
DTMF CLIP on <<<3>>> <60>
DTMF CLIP on <<<3>>> <48>
DTMF CLIP on <<<3>>> <60>
RING on 1/3!
NO RING on 1/3!
DTMF CLIP on <<<3>>> <84>
DTMF CLIP on <<<3>>> <78>
RING on 1/3!
NO RING on 1/3!
DTMF CLIP on <<<3>>> <68>
DTMF CLIP on <<<3>>> <68>
DTMF CLIP on <<<3>>> <70>
DTMF CLIP on <<<3>>> <A4>
DTMF CLIP on <<<3>>> <70>
But some calls, I am getting long hexadecimall value as follows,
DTMF CLIP on <<<3>>> <48>
DTMF CLIP on <<<3>>> <FFFFB64>
RING on 1/3!
NO RING on 1/3!
DTMF CLIP on <<<3>>> <84>
DTMF CLIP on <<<3>>> <78>
RING on 1/3!
NO RING on 1/3!
Can u guide me on right Mr.Lali and Cohen.. ?
Thanks & Regards,
Ashik Ali
On Sun, May 29, 2011 at 12:13 PM, Tzafrir Cohen
<tzafrir.cohen at xorcom.com> wrote:
> On Sat, May 28, 2011 at 02:34:36PM +0300, Ashik Ali wrote:
>> Hi dears,
>>
>> I am from saudi arabia and using asterisk 1.6.2.13,Dahdi-2.3.0 and
>> Digium, Inc. Wildcard AEX800 8-port analog card (PCI-Express) .
>>
>> I am facing problem with detecting caller id before first ring.I
>> recorded the dahdi channel using dahdi_monitor command. Where I am
>> able to see and hear caller-id dtmf tones.
>
> Is there a polarity reversal before the caller ID string is sent?
>
> --
> Tzafrir Cohen
> icq#16849755 jabber:tzafrir.cohen at xorcom.com
> +972-50-7952406 mailto:tzafrir.cohen at xorcom.com
> http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list