Automatic Send DTMF for Survey Campaign, Goautodial v3 - asterisk

I am using Goautodial V3 and i want to setup a campaign that sends automatic DTMF *2 as soon as the call has been answered, I have tried changing the agi-dtmf.agi file but it did not help, i also changed the outbound carrier dialplan but it still did not work. Can anyone help me out ? below is the carrier configuration that i used.
exten => _4416658289.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _4416658289.,2,Dial(SIP/${EXTEN:10}#TFM,,tTo)
exten => _4416658289.,3,Wait(10)
exten => _4416658289.,4,AGI(agi-dtmf.agi,signalonly---*2)
exten => _4416658289.,5,Set(TIMEOUT(absolute)=5)
exten => _4416658289.,6,Hangup

You should use option D of Dial command.
D([called][:calling[:progress]]): Send the specified DTMF strings *after*
the called party has answered, but before the call gets bridged. The
<called> DTMF string is sent to the called party, and the <calling> DTMF
string is sent to the calling party. Both arguments can be used alone. If
<progress> is specified, its DTMF is sent to the called party immediately
after receiving a 'PROGRESS' message.
See 'SendDTMF' for valid digits.

Related

Asterisk won't does as extension_custom.conf says

I'm currently working on a project where I need to do some specific tasks using asterisk.
WHAT I DID
I run the asterisk through a raspberry pi and convert PSTN call to VoIP using Obi110 device. However it routes incoming calls to my FreePBX. As extension file says it comes as"from trunk" context name. So to be able to answer the incoming call and play a sound file, I followed online tutorial and as an example I used provided code to check whether it actually works. So in extension_custom.conf I wrote following code,
[from-trunk]
exten => s,1,Answer ;
exten => s,2,Playback(tt-weasels) ;
exten => s,3,Hangup ;
exten => ste,1,Set(VOLUME(RX)=10) ; set the RX volume
exten => ste,2,Set(VOLUME(TX)=10) ; set the RX volume
exten => ste,hint,SIP/ste; hint 'ste' used for presence notification
exten => ste,3,Dial(SIP/ste) ; call the user ste'
exten => steand,1,Set(VOLUME(RX)=10) ; set the RX volume
exten => steand,2,Set(VOLUME(TX)=10) ; set the RX volume
exten => steand,hint,SIP/ste; hint 'steand' used for presence notification
exten => steand,3,Dial(SIP/steand) call the user 'steand' used for presence
notification
My Problem
After saving that and restarting asterisk and make a call to the PSTN line phone, it still rings rather than following the commands. Am I doing something wrong? I'm new to this. Thanks.
Extension s mean "no extension". More then likly, that you have no any goto to that extension in your dialplan.
Use
asterisk -rvvv
Check output of asterisk when call come in, you will see context and extension used.
Also you SHOULD not use SAME context in custom. You should use from-trunk-custom.

Send DTMF to DAHDI channel

I am trying to figure out a way to send DTMF commands to my ISDN modem (throught BRI Card) to enable some services it provides. For example, for call forward I need to send the DTMF 21#. I have successfully did that with mISDN but I need to do it with DAHDI now.
So far I have managed to do this that does not work:
[from-internal-custom]
exten => 4321,1,Answer
exten => 4321,n,Noop(Enable Callforward)
exten => 4321,n,Dial(DAHDI/g0/,10,M(dtmf))
[macro-dtmf]
exten => s,1,SendDTMF(*21*<number>#,,DAHDI)
Where number is the number I want to to do the call forward (without the <>).
If I put a ISDN Phone on the ISDN Modem I just need to dial the featurecode 21< number ># and it works.
Is there a way to do this with DAHDI?
There is special key for that
D([called][:calling[:progress]]): Send the specified DTMF strings
*after* the called party has answered, but before the call gets bridged.
The <called> DTMF string is sent to the called party, and the <calling>
DTMF string is sent to the calling party. Both arguments can be used
alone. If <progress> is specified, its DTMF is sent immediately after
receiving a PROGRESS message.

Receive Talk Detect events From Receiving channels in asterisk?

Let me explain my scenario first, what i am trying is to detect channel talking and silence events during call, and perform some task on event detection, i have successfully detect 'talk_detect' events on the channel who initiated the call but i am not able to detect the 'talk_detect' events on the channel who receives the call, here is a code sample:
Dailing channel:
exten =111,1,Answer()
exten =111,n,Set(SPYGROUP=3300)
exten =111,n,Set(DENOISE(rx)=on)
exten =111,n,Set(TALK_DETECT(set)=1000)
exten =111,n,Dail(SIP/111,100)
exten =111,n,Hangup()
Receiving channel:
exten =222,1,Answer()
exten =222,n,Set(SPYGROUP=3300)
exten =222,n,Set(DENOISE(rx)=on)
exten =222,n,Set(TALK_DETECT(set)=1000)
exten =222,n,Dail(SIP/222,100)
exten =222,n,Hangup()
but it only enables the talk_detect events on dailing channel please guide how can i detect talk events on both channel.
Answer in this question describes exactly how to do it. They key is that you need to dial with b parameter (doesn't seem to be documented). b parameter is where you specify pre-dial code that triggers the other channel's talk detection

asterisk 11.9 issue with read() function and dtmf

I have two asterisk servers one with PBX inflash and other only just Asterisk installed on CentOS . I need to migrate the stuff from PBXINFLASH to Asterisk 11.9.0 . The PbX in flash is running Asterisk 10.12.1.
I have a dialplan which works perfectly fine on the Asterisk 10.12.1 but on my new box with Asterisk 11.9.0 the DTMF or user key input is not working one one part of the dialplan. I have tried to do debug for dtmf both the servers are same no difference in debug resul, also strange this is my dialplan on one machine works fine and other works partially. The dial plan is call screen where caller presses 1 to proceed and recipient gets call and system ask to press 1 to accept call or hangup now one Asterisk 11.9.0 caller press 1 input is working fine but second user/recipient press 1 does not do any thing at all.
I am using sip account to test my dtmf. I have swapped my sip accounts and sip softphones to test still the same issue. Following are two parts of same macro half working and second half not taking user input
First Half that works and takes user input.
exten => _X.,n,GotoIf($[${GROUP_COUNT(${CallerNum})} > 1]?Exceeded) ;Exceeded?
exten => _X.,n,Set(HngupCount=1);Hangup
exten => _X.,n,Flite(Please press 1 to speak with ${destUID})
exten => _X.,n,Read(yesno,sip-silence,1,,2,5)
exten => _X.,n,GotoIf($[${yesno} = 1]?continue:hangup)
Second half which not working or taking user's input :-
[macro-Dial2]
exten => s,1,Wait(1);ResetCDR
exten => s,n,Set(_StartTime=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})
exten => s,n,ResetCDR
exten => s,n,Set(_RCount=1)
exten => s,n(Repeat),Flite(Hi there)
exten => s,n,Flite(${ARG1} wants to speak to you. Please press 1 to accept the call. 2 to forward the call to voicemail or 3 to reject the call.)
exten => s,n,Flite(we are connecting you)
exten => s,n,Read(ACCEPT,sip-silence,1,,1,5)
exten => s,n,Set(_RCount=$[${RCount} + 1])
exten => s,n,NoOp(Counter is ${RCount} -- the user selected: ${ACCEPT});
exten => s,n,Gotoif($[${ACCEPT} = 1]?accept:vm) ;Accept the call
exten => s,n(vm),Gotoif($[${ACCEPT} = 2]?voicemail:rej) ;forward the call to dummy voicemail (Actually just record the callers message)
exten => s,n(rej),Gotoif($[${ACCEPT} = 3]?reject) ;Reject the call and hangup
exten => s,n,Gotoif($[${RCount} > 2]?reject:Repeat) ; If no key pressed, just hangup the call and inform the User.
exten => s,n(accept),set(SecLeg=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})
In second half it works fine till the following lines :
exten => s,n,Flite(${ARG1} wants to speak to you. Please press 1 to accept the call. 2 to forward the call to voicemail or 3 to reject the call.)
exten => s,n,Flite(we are connecting you)
Note, in your dialplan user input will be taken only after all flite message playback finished
It is highly recommended play by flite only ${ARG1}, while all other(static part) record to file and use in READ command
You can get more info by enable dtmf debug in your asterisk.
For that you need edit logger.conf

Ring Group # Asterisk. Is it possible to use dial and goto on the same priority?

I need to create a ring group (222) which would dial several SIP accounts, and PSTN numbers as well.
For PSTN I have a different context (ToPSTN) with it's own billing rules, so the question is:
How can I ring several SIP acc's and PSTN's simultaneously ?
Here is how I am trying to do that:
exten => 222,1,Dial(SIP/ca-444&SIP/ca-433)
exten => 433,1,Goto(ToPSTN,0035853855453,1)
Or maybe it's possible to do several tasks at the same priority somehow ?
To make dialing into dialplan instead of real channel driver you should use Local channel. This is how it look in your case:
exten => 222,1,Dial(SIP/ca-444&Local/0035853855453#ToPSTN)
So first call goes to SIP peer ca-444 and second directly to dialplan extension 0035853855453 and context ToPSTN.

Resources