Multiple DTMFs defined to leave_conference - asterisk

I need to be able to define multiple DTMF digits to exit a CONFBRIDGE conference. Once out of the conference, I need to know what DTMF digit was pressed.
I want to implement the following:
Press 4 for the previous conference
Press 6 for the next conference
Press the star key to exit the conference
Therefore, I need to define 3 keys for exiting the conference, but I need to know which key was pressed when I'm out of the conference.
I tried using dialplan_exec, but once you are out of the conference executing your dialplan snippet of code, you can't kick yourself out of the conference. I tried using AMI commands and CLI commands and the command appears to work, but confbridge list confirms that you are still in the conference. Therefore, if I have the code put me into another conference room, then confbridge list shows me as being in two conference rooms at the same time.
Any ideas??? Thanks in advance!

Use something like this:
exten => _X.,1,ConfBridge(500)
exten => _X.,2,Dumpchan
you will see variable it set on exit.

Related

Asterisk, keys don't work on background command,just after background

[out]
exten=>_X.,1,Answer()
exten=>_X.,n,Background(hello)
exten=>_X.,n,WaitExten(5)
exten=>1,1,Goto(check,s,1)
Audio menu are playing, but when I press 1, sound stop and after few second check command run. How to quickly respond to a user request?
You are doing begginer error which described in almost any asterisk book for beginer.
I recommend you read "Asterisk The Future of Telephony" by O'Relly.
This exact error is simple:
in your dialplan you have extension _X., which mean "any number starting with digit.
you ask asterisk waitfor extension selected in this context.
you are pressing digit, but acordinly to context you may want enter 1111(also fit you context). So asterisk wait upto TIMEOUT(digits) until you enter next digit.
your timeout is 5 second, so it go ext 1 in 5 second.
[Syntax]
BackGround(filename1[&filename2[&...]][,options[,langoverride[,context]]])
You can use other context for matching.

How To Set up Call Hold and Pick Up In Asterisk

I am quit new in asterisk.
My problem is: I have to implement call hold and pick up in asterisk.
Let's say we have an incoming call called incomingCallA.
As an operator I want to hold incomingCallA for a while to deal with other works, then come back soon, If i am not come back, others operator will pick up my held call.
I have done some researches that told me:
Call hold is sip client function, dont need to changes at asterisk server.
I can use call parking to dial to others operator if i am not come back.
Please help me to about the solution to deal with above problem.
Many thanks.
Simplest for begginer is create 100 conference rooms using Meetme after that just send to first availible room and record room number.
You can forward call using Transfer AMI function.

How to get the dialled number in parallel calling in asterisk

I want to set up a parallel calling dialplan in asterisk.I have searched a bit and found that we can call parallel in asterisk with the below command.
exten => _X.,1,Dial(DAHDI/g0/${NUMBER1}&DAHDI/g0/${NUMBER2})
So what i understood that asterisk server calls both number paralelly which one picks first the call is connected to that person and other hangup.
My problem in that how do i get the number which picks the call.Is there any variable to get the dialled number?
Thanks.
You can use on-answer-macro - M option of dial command to put any info into cdr.
Also you probably re-inventing queue with queue_log.

Asterisk No Audio in Extension

I have an inbound number that I want to connect to my cell. The problem I'm having is that unless I use the music on hold flag, I don't get any audio.
For example:
exten => 1**********,1,Dial(SIP/1**********#flowroute,30,m)
The above works great, ot rings on my cell and the call is connected and we can talk.
Now when I remove the music flag or try an ring flag because I need the ringing sound, it connects to my cell, but when I answer, all I get is silence:
exten => 1**********,1,Dial(SIP/1**********#flowroute,30)
exten => 1**********,1,Dial(SIP/1**********#flowroute,30,r)
Neither of the above works.
Anyone encountered this or have a fix?
[SOLVED]
I added progressinband=yes to sip.conf under the general area. Now when I call with no flags, it rings and there is audio after I pick up.
Do a SIP trace and see which of "180 Ringing" and/or "183 Session Progress" responses that 1** peer sends you when you dial it without "m" or "r", in what order, and which has SDP. If it differs from cases where you do get ringback, then the problem is the calling peer, and you need to try different progressinband settings for that peer (yes / no / never) to work around it.
It's very strange that you get silence after answering when you don't use "m" in Dial(). NAT problem?

Play a file to specific channel in a confbridge (asterisk) so that other channels in the conference cannot hear

I have 3 channels in a confRoom (using confbridge in asterisk), now I mute 2 channels so that only one channel at a time is able to talk, Now I want that all the channels who are muted get whispered or informed by playing any file that they are being muted.
There is an option in confbridge 'toggle_mute' which plays conf-mute file when a channels gets muted in a confbridge but this works only on the dtmf event, I am not muting the channel on any dtmf event hence it's not useful for me.
Please suggest me any other way so that I can play a file to a specific channel in a confbridge so that other channels cannot hear that file.
I will be really grateful for any kind of suggestions.
I am assuming that you have the control for these calls.. so you could trigger them with a delay and sequentially mute out.. Otherwise another way would be to use BackgroundDetect/WaitForNoise and wait for a specific noise event after muting.. and muting could be done in a time based manner

Resources