I'm trying to setup an emergency service for our company, and this is the need:
A person that is involved into an emergency situation have to dial a number with his mobile phone and automatically all ermergency squad's people phones will ring and all must be placed in conference call automatically.
I'm near to the solution but I have some difficult with call files , I'm also not sure this is the right way but this is what I made
I've created a conference ( extn 419 ) and also I've created one call file like this
Channel: SIP/123456789#from-internal
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: ext-meetme
Extension: 419
Priority: 1
where 123456789 is one of the emergency squad number and 419 is the conference room number
this is working but I have to manually put the call file in the outgoing directory to generate the call
I would like to have the call originate when someone call the 419 extension.
Could someone help me please?
Thanks in advance
For your approach you need to trigger AGI script when somebody calls emergency number. And then this script can create call files and copy them to spool directory.
http://www.voip-info.org/wiki/view/Asterisk+cmd+AGI
If I was building similar solution, then I will probably will do all logic inside AGI script even triggering a call with originate command instead of call files.
My dialpaln:
[dialplan-for-emergency]
; 123456 - emergency number
exten => 123456,1,Answer()
exten => 123456,n,AGI(myscript.pl)
exten => 123456,n,Hangup()
myscript.pl # in pseudo code
create conference
create a calls to all other participants into conference
connect callee into conference
Related
As a beginner that just installed his first asterix server I came across a small issue. i want to check if a number that i dial is busy or not before actually dialing it.
So for example I would call 0904 => number busy => redirect to 0905
However I don't want it to dial 0904 first if its busy but just instantly redirect it to 0905 instead.
I have a very basic setup with just 3 users. 2 of them are in a queue "support" one of them is in the queue "admin"
I have seen and read a little about checking if a channel is available but i didn't fully understand that and I'm not sure if it could be done easier.
Here is my simple dialplan, if i call *12 my simple python script will just execute the Dial command to the 0904.
exten => *12,1,Answer()
same => n,set(PHONE_EXTEN=0904)
same => n,AGI(test-agi.py,${PHONE_EXTEN})
same => n,Hangup()
There is no way know if external number is busy.
If number is your extension, you can count calls using GROUP/GROUP_COUNT or you can check extensions states and hints, like described in docs
https://wiki.asterisk.org/wiki/display/AST/Extension+State+and+Hints
https://wiki.asterisk.org/wiki/display/AST/Device+State
Set up Asterisk 13.1 on Ubuntu 16.04,Calls are Working fine as well as conference calls.However I have two Question regarding the recording of calls in asterisk.
This is the extensions.conf.
[default]
exten => 1000,1,MixMonitor(${CALLERID(num)}-${STRFTIME(|EST5EDT|%m%d%Y-%H%M%S)}.gsm)
same => n,Dial(SIP/1000)
exten => 1001,1,MixMonitor(${CALLERID(num)}-${STRFTIME(|EST5EDT|%m%d%Y-%H%M%S)}.gsm)
same => n,Dial(SIP/1001)
exten => 100,1,Answer()
exten => 100,n,Authenticate(234)
same => n,MixMonitor(${CALLERID(num)}-${STRFTIME(|EST5EDT|%m%d%Y-%H%M%S)}.gsm)
same => n,ConfBridge(1234)
And this is confbridge.conf
conf => 1234
[1234]
record_conference = yes
1)Is it necessary to define MixMonitor for every call(As I have done above for user 1000 and 1001) ,or is there a possibility where you can define it once and all calls in your asterisk server get recorded.
2)When the Conference call is recorded ,suppose if there are two users in the conf room,there are two audio files generated instead of one,What changes do I make so theres is only one recorded audio file of the full conference?
In asterisk it is nessesary do any action you want DO.
In your case you can use mixmonitor command in every dialplan, use pattern to do that command for large list, use external macro or gosub function and call it for calls you want be recorded.
For conference you can start enother call with mixmon(third call) using Originate or you can use internal recording.
For ANY record you can have Monitor(two files for each side of call) or mixmonitor(same, but 1st party in left channel, 2nd party in right channel, so file is single).
So if you have 2 files, you just have non-mixed variant. Consult conference room options for mixed version.
I am developing a custom application to control an Asterisk based pbx using ami/agi interface. What I have to do is:
receive a call from a pstn external line
answer the call
play a welcome message
transfer the call to a specific extension
park the call
reconnect to the call from a different extension
Everything should be done using ami/agi interfaces. I succesfully developed everything up to point 5) but I am unable to understand how to transfer (using ami/agi) the parked call to a runtime-defined extension.
Can someone give me an idea on how to do it ?
you should originate from Local/XXX#parked_context to the extension you want.
something like this..
Action: Originate Channel: Local/XXX#parked_context (XXX is the number of parked call)
Context: default (here you put the context where you can reach the second party)
Exten: 123 (number who will receive the call)
Priority: 1
Callerid: 3125551212
Timeout: 30000
Variable:
ActionID:
Simplest way is just use async agi or conference or Wait extension instead of parking, i.e redo parking-like logic yourself.
That way you will 100% know channel name and how to transfer it back.
Considering you are gooing use ami - AsyncAGI is best option for you.
I want to play a sound file to both call legs whenever the caller clicks a DTMF,
I used asterisk features so if the caller clicks the dtmf 6 a sound file will be played to both call legs, The problem is asterisk features only allow the feature to run on one side of the call: self OR peer,
I tried configuring 2 features with the same DTMF like that:
features.conf:
[applicationmap]
PlaySound6p => 6,peer/peer,Playback,tt-monkeys
PlaySound6s => 6,self/peer,Playback,tt-monkeys
but the playback of tt-monkeys works only 1 time, here is the log:
-- Feature Found: PlaySound6p exten: PlaySound6p
-- Playing 'tt-monkeys.slin' (language 'en')
writting asterisk features show command returns:
Dynamic Feature Default Current
--------------- ------- -------
PlaySound6s no def 6
PlaySound6p no def 6
It appears asterisk doesn't fire 2 features when they are configured on the same DTMF,
Anyone knows a way this can be done?
Thanks,
Rami.
Only one feature can be fired by digit.
Digits will be "consumed" and not go after that.
However you can start on that digit one or more OTHER call, each one you can connect to this channel by ChanSpy or audiohooks and whatever you want.
agiphp guru of stack flow
My question is
I'm developing an application where a junk of work is about making conference call.I want to write Agi preferably PHP based where user A holds DID using SIP trunk which is connected to asterisk server need to make conference call(outgoing) like calling B,C,D....n and puting them in conference.If there is any example please share or give ur valuable feedback to implement it. I'm currently using asterisk 1.8
but meet me and confbridge is not much of use for me as well as auto dial out.I need something like for example user A with exten 1234 calling user B with exten 5678 and both are in a call now user A or B need to call to user c with exten 1111 and try to call him and put all user A,B,C in one conference
Please read this pages
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out
http://www.voip-info.org/wiki/view/Asterisk+cmd+MeetMe
But note, dialout can have very tricky issues, so not recommended do dialout application if you are not expert.
For more info consider check opensource diallers like vicidial.