Asterisk always get wrong PIN

My Asterisk always get the wrong PIN from external line. I called in to do the DISA or conference. It will ask me for the PIN. For example: 1234. But from the monitor screen. The pin always 12234 or 112234 or 12334 or… something like that. How to fix that problem? Is that because of the echo? I have no problem when I talk to someone on the phone.

Thank you.

your problem is related to DTMF detection. how is Asterisk connected to the PSTN? if it’s via a SIP provider try setting dtmfmode=rfc2833 (even if they dont support RFC officially it often works). also try playing with the relaxdtmf setting

I am using Primus TBB, the problem for me is Primus TBB is not asterisk friendly, so I have to use a FXO card to connect to their ATA box. So the phone is on Zap/1 right now.

Any idea for those DTMF detection?

ugh. best option is to play with relaxdtmf setting and see if it gets you anything.

However sometimes on certain connections dtmf will be sort of echoed twice, try this with a normal analog phone. If you hear the dtmf twice there isn’t much that can be done.

You might also look into the gain settings…

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes

relaxdtmf=yes
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
#include zapata-auto.conf

group=1

;Include AMP configs
#include zapata_additional.conf

I add relaxdtmf=yes and reboot the server. Still problem…
== Parsing ‘/etc/asterisk/privacy.conf’: Found
– Playing ‘privacy-unident’ (language ‘en’)
– Playing ‘privacy-prompt’ (language ‘en’)
– Playing ‘privacy-thankyou’ (language ‘en’)
– Changed Caller*ID to 99003329911775, callerpres to 0

The number should be 9033291175. :frowning:

check the zaptel-auto and zapata-additional files that are included there… anything interesting?

auto…
; Autogenerated by /usr/local/sbin/genzaptelconf – do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;
callerid=asreceived

; Span 1: WCFXO/0 "Generic Clone Board 1"
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1
context=from-zaptel
group=0
channel => 1

; Span 2: ZTDUMMY/1 “ZTDUMMY/1 1”

nothing in additional config file.

try setting relaxdtmf=no?

this got me thinking … sometimes i get into an IVR that asks me to “press the star key” to continue … i wonder if this kind of thing could be used to establish whether there is DTMF-doubling and if so, split the DTMF rec’d. worth thinking about ??

asterisk1*CLI> zap show channel 1
Channel: 1CLI>
File Descriptor: 12
Span: 1
Extension:
Dialing: no
Context: from-zaptel
Caller ID:
Calling TON: 0
Caller ID name:
Destroy: 0
InAlarm: 0
Signalling Type: FXS Kewlstart
Radio: 0
Owner:
Real:
Callwait:
Threeway:
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: no
Relax DTMF: no
Dialing/CallwaitCAS: 0/0
Default law: ulaw
Fax Handled: no
Pulse phone: no
Echo Cancellation: 128 taps unless TDM bridged, currently OFF
Actual Confinfo: Num/0, Mode/0x0000
Actual Confmute: No
Hookstate (FXS only): Offhook

restart asterisk with Relax DTMF: no. Still the same.

I think the reason for that is baz the DTMF has been convert couple times. I am using primus. So the connection will be, PSTN ---- Primus VOIP ---- Asterisk FXO port ---- Internal line, VOIP.

So the signal has been convert from pstn - voip - pstn -voip. Then the DTMF is lost…

Am I right?

yeah def. something to do with the many conversions. what sometimes happens is if the ata is getting more than one type of dtmf (ie inband / rfc) it may generate two sets of dtmf tones thus the doubling… either way this probably wouldn’t happen if you had a real sip provider. I use broadvoice in the USA and it works perfectly with rfc2833 and nothing else.

Yes. I am trying to hack the primus setting so I can get ride of that ata box. The only problem is the password. Not like AU ppl, primus canada is using MD5 for encryption.

My MD5 password is 8c9d54d9d444830db0ec1a37f84043f1… Any resource to hack it?

I called from voip account to my Primus and it recognize right away…

how come?

i would guess that both the voip account you call from and primus are connected to the VPF, use enum, or by some other way route the call over VoIP or another reliable signalling method, thus the DTMF never leaves the digital domain. OTOH when you call from a landline phone it is converted from analog and thus the double dtmf. Try listening witha normal phone, do you hear two dtmf tones on the primus line?

Do you mean called from outside and listen from the internal line and see if I heard the two dtmf tone?

I may try that tomorrow…

I am using a clone 100p fxo card… Do you think that’s the reason I got that problem?

I am experiencing problems with DTMF digits doubling for calls coming in in-Band from the GSM network over EuroISDN PRI to asterisk.
We have recorded a wave file and found out that we need to have debouncing of about
400ms (make asterisk blind to DTMF for 400ms after receiving a valid DTMF digit).
However, I have lloked over the source code, including dsp.c, and could not find how to set this parameter.
Can someone advise how to do this.

[quote=“peter@ugol.ru”]I am experiencing problems with DTMF digits doubling for calls coming in in-Band from the GSM network over EuroISDN PRI to asterisk.
We have recorded a wave file and found out that we need to have debouncing of about
400ms (make asterisk blind to DTMF for 400ms after receiving a valid DTMF digit).
However, I have lloked over the source code, including dsp.c, and could not find how to set this parameter.
Can someone advise how to do this.[/quote]

Hi

How do you record that wav file? And if you find the solution, would you please let me know? I am still having that trouble…Damn Primus…

My engineer has set this recording thing up.
I will let you know how it is done tomorrow.

However, WE have an opposite problem -we have digits double. I hink it is a bit easier to solve then if they disppeared.