Asterisk does not detect inband DTMF tones - asterisk

Asterisk 14 (from Packages # tucny.com)
Connected to Twilio SIP trunk
Asterisk does not detect inband DTMF tones.
Other ways(INFO, rfc2833) to send DTMF works correctly.
I've played with tone duration and volume without success.
In DTMF debug I can see the asterisk reaction to incoming INFO or rfc2833 events, but nothing happens when inband tone is coming.
Seems like asterisk does not "hear" the line at all.
I couldn't find any information about modules requeried to detect inband DTMF.
Installed modules:
- asterisk
- asterisk-odbc
- asterisk-pjsip
- asterisk-hep
- asterisk-sounds-core-en-alaw
- asterisk-sounds-core-en-ulaw
Will be very thankfull for any information.

I do not speak English very well, but I can always try to learn. Sorry for bad interpretations.
DTMF tones need more dependencies as a codec.
Check the codec used on the channel and try changing the dtmfmode to inband. Another item can help is the tones / frequencies in cases of FXO.
In case of codec, check to use alaw.
I hope I have helped or at least give a light.
Hugs!

The cause of the problem was found.
Pjsip does not support Inband DTMF detection.
There is information that to detect inband DTMF with pjsip you need to write your own pjsip plugin:
https://trac.pjsip.org/repos/wiki/FAQ#dtmf

Related

Is it possible to receive eCall by Asterisk (PSAP)?

I found an interesting documeent about realisation of eCall (Emergency Call) in EU: http://www.heero-pilot.eu/ressource/static/files/heero_wp3_d3-3_final-operational-results_v2.3_final.pdf
Germany somehow did it on Asterisk. Whatever, I don't understand how they process MSD (minimal set of data) using Asterisk. In the call session for the first step caller sends DTMF signals to send MSD packet. As I understood, Asterisk must redirect this call to In-band modem on COM port or to another machine with such modem. After PSAP successfully received MSD for the second step caller switches to voice channel that must be redirected to some sip-client of PSAP operator. How they do it? Is there a way to receive DTMF signals w/o modem by using internal capabilities of Asterisk? How the same call to redirect to another SIP on the same time?
I suspect that you are referring to emergency services, rendered by emergency dialers - eg. for senior citizens. These are fairly common where I live, and I've created in the past a solution to handle the calls from these, based on Asterisk. The solution involved a way to intercept the various DTMF signals that the device generates, then making Asterisk do stuff with it. Back then, I used Asterisk 1.6 and it is pain staking, because I had to do everything from within a MeetMe bridge, and interact with Manager alot. Today, doing the same with Asterisk 12/13 and ARI is a breeze. Just remember one thing, most of these dialers will utilize the A,B,C,D DTMF signals, which are somewhat unknown to most people - they exist and Asterisk is very much capable of handling those.
The only snag is - make sure you are connected via a PRI, as most SIP carriers aren't aware of these signals, and their SIP trunks won't support this type of signalling.
Asterisk can send dtmf(natively,via command SendDTMF in dialplan or D option in Dial command) or any other sound(custom c/c++ app needed)
No, you not need special modem.
However there are no realisation acordinly to that document, you need do that yourself or hire someone

Not able to detect hangup for indian numbers in asterisk 10

I am not able to detect hangup event when I am using Indian numbers but for USA numbers the the hangup is detected. If an indian number is connected and he is in a conference (confbridge) then if he hangup his phone then the hangup event is not fired.
Please help.
Assuming this is a SIP channel... You could try to detect the hangup based on the RTP timeout.
The setting in your [device] or globally, is:
rtptimeout=60
Which is the default, 60 seconds. You could crank this down a lot lower if it helps you out.
That depend of provider used. Change sip provider/or choose more costly plan. Hangup detection in this case have be handled by provider's equipment.

Serial port handshake. What the difference between Hardware and None handshaking?

I'm trying to determine the difference when I open serial port with hardware handshake and none handshake.
It seems that in both cases I have to control RTS/CTS signals (just tested it with one COM device).
So what the difference between opening serial port with hardware handshake and without handshaking?
From my previous understanding, when we work without handshaking, we don't care about RTS/CTS and DTR/DSR signals. Just send and receive data whenever we want. Was I wrong?
One more question. Can we work without handshaking in full duplex mode only?
As you probably know, the issue is "flow control". Like the Clash song "Should I stay or should I go?".
RTS/CTS is hardware control. XON/XOFF is software control. Otherwise, "just keep going".
This link might explain further:
http://www.lammertbies.nl/comm/info/RS-232_flow_control.html
I suspect that when you were asking about "handshaking" with respect to "duplex", perhaps you meant this:
http://en.wikipedia.org/wiki/RS-232
In older versions of the specification, RS-232's use of the RTS and
CTS lines is asymmetric: The DTE asserts RTS to indicate a desire to
transmit to the DCE, and the DCE asserts CTS in response to grant
permission. This allows for half-duplex modems that disable their
transmitters when not required, and must transmit a synchronization
preamble to the receiver when they are re-enabled.
'Hope that helps!
The difference is more about whether the kernel will pay attention to the CTS/RTS lines when deciding whether to send more data or not. With hardware handshaking turned on, it will. With it set to none, it won't, even though the CTS/RTS lines may stay asserted, so that the peer will know it can send data.

Voice call through GSM modem

I would like to use a GSM modem to make a voice call to a phone number, play a recorded message, wait for a digit to be pressed and then disconnect the call. The system needs to know if the line was busy, if the user answered and which digit was pressed by user (if any). It should drop the line if nothing is pressed in 30 seconds. If user presses the digit before the question is completed then the voice should stop (user doesn't have to wait). Also, it would be nice if system could handle invalid digits (play "invalid digit" message, play original message and wait for input). Multiple calls in parallel would be nice, but I guess this is not possible?
I have found this article which explains low-level interface quite nicely. However, this question is more pragmatic - which libraries and which GSM modem would you recommend? OS is Linux, modem can be either RS232 or USB. I would prefer Python, but C(++) is ok too.
BTW: this is not telemarketing, it is a notification system. Not that it matters... ;)
EDIT: I learned this system is known by keyword "IVR" (added for future searchers).
A modem is generally used for data transmission but it sounds like you are actually transmitting voice, albeit prerecorded voice, and tones.
Although you can achieve this with the extra voice capability of a voice modem as you have identified, it might actually be easier to use a GSM to VoIP gateway, unless you actually need the modems data capability for some reason.
You could connect the VoIP to GSM gateway to a low cost or free open source PABX (such as Asterisk) and use this to build your particular application.
Some gateways even support multiple SIMS so you can target the SIM which gives the lowest call rate for the number you are calling - for example if you know that the number you want to call is on a particular operator, then that operator may offer free 'on network' calls between it's SIMs. This might be an advantage if you are expecting to make a large number of calls.
If you do a web search for 'VoIP GSM gateways' you will find some examples.
The following link provides an overview also:
http://www.voip-info.org/wiki/view/VOIP+GSM+Gateways
I am no expert in this field but it is something of a personal project that I have wanted to dive into.
Here is what I think will be the best way to do this.
1 Get yourself a VOIP GSM Gateway like this: VOIP+GSM+Gateways
2 Link into an existing PABX system or download a free one like asterisk
Then you will need to follow the instructions of the PABX development to create your dial plans and routing. I don't know if there are any already out there but I'm sure you will find many examples of the bits and pieces you need.

How to handle DTMF on outcall using call files in asterisk?

I'm making an outdial using call files in asterisk and application needs some DTMF input but DTMF not working for all mobile phones, It is not accepting digits from Nokia - 1100 and nokia 6030 where DTMF works if i make an incoming callfrom the same phone but on out dial using DTMF log i can see following messsage on asterisk CLI:
DTMF Begin '1' received on Dahdi-32
DTMF Begin ignored '1' on Dahdi-32
If someone knows the solution for this please let me know.
It works if i set overlapdial=no but in this case it doesn't make two simultaneous outdial on two different numbers.
Have you tried setting relaxdtmf=true in the chan_dahdi.conf file?

Resources