lee
2014-Oct-25 22:43 UTC
[asterisk-users] make asterisk do something when an outgoing call is picked up
Hi, how can I make asterisk do something when an outgoing call is picked up? The background is that I would like to record incoming and outgoing phone calls. In order to do this, I need to play an announcement telling the person calling or being called that the call will be recorded. Here's what I'm trying to do: call comes in: if(I pick up) { play announcement to caller; start recording; let me talk to the caller; end recording when call ends; send recording to my email account; } else { record voice mail; } call goes out: if(call is picked up) { play announcement to callee; if(callee hangs up) { end call; } else { start recording; let me talk to callee; end recording when call ends; send recording to my email account; } } else { call ends; offer me to automatically call again later; } Please keep in mind that I'm new to asterisk and just got it to work. Searching for having asterisk do something when an outgoing call is picked up has been unsuccessful other than that I found out that you can have it make outgoing calls automatically to play pre-recorded messages: So asterisk does have a way to detect when a call is picked up and a way of doing something when that happens. What I have working so far is incoming and outgoing calls and voicemail for one phone/user, which is a basic set up I'm trying extend and improve now. -- Again we must be afraid of speaking of daemons for fear that daemons might swallow us. Finally, this fear has become reasonable.
Thorsten Göllner
2014-Oct-27 10:54 UTC
[asterisk-users] make asterisk do something when an outgoing call is picked up
Am 26.10.2014 00:43, schrieb lee:> Hi, > > how can I make asterisk do something when an outgoing call is picked up? > > > The background is that I would like to record incoming and outgoing > phone calls. In order to do this, I need to play an announcement > telling the person calling or being called that the call will be > recorded. > > Here's what I'm trying to do: > > > call comes in: > if(I pick up) { > play announcement to caller; > start recording; > let me talk to the caller; > end recording when call ends; > send recording to my email account; > } else { > record voice mail; > } > > > call goes out: > if(call is picked up) { > play announcement to callee; > if(callee hangs up) { > end call; > } else { > start recording; > let me talk to callee; > end recording when call ends; > send recording to my email account; > } > } else { > call ends; > offer me to automatically call again later; > } > > > Please keep in mind that I'm new to asterisk and just got it to work. > Searching for having asterisk do something when an outgoing call is > picked up has been unsuccessful other than that I found out that you can > have it make outgoing calls automatically to play pre-recorded messages: > So asterisk does have a way to detect when a call is picked up and a way > of doing something when that happens. > > What I have working so far is incoming and outgoing calls and voicemail > for one phone/user, which is a basic set up I'm trying extend and > improve now. >Maybe this will do a good job for recording all calls: http://www.voip-info.org/wiki/view/Asterisk+cmd+ChanSpy And playing an announcement, when a call is picked, should be done within your dialplan with this function: http://www.voip-info.org/wiki/view/Asterisk+cmd+Playback -Thorsten-
Maybe Matching Threads
- Announcement to caller when called party has picked up - without initial Answer()?
- asterisk-users Digest, Vol 123, Issue 38
- Record call without caller interference
- Play audio file for both Caller and Callee in a call
- problems with some incoming/outgoing calls