I’m trying to detect if caller/agent is weather on call or on hold run-time. I managed to insert CDR in MYSQL and get results from there but issue is it only inserts data when agent hangs up the call.
Also is there a way to generate an email whenever an extension changes status from “reachable” to “unreachable” or “unknown”?
Let’s say we use PHP, you can write your own script using or use an existing library to catch the desired event, then mail function you send the email with the data
If I don’t use AMI Events and read asterisk CLI, I can get the required details from it.
Please guide me how I can relate channels/caller ID to sip extensions?
When I dial a call I get
– Executing [s@macro-callrecout:1] Set(“SIP/200-00027f75”, “chan=SIP/200-00027f75”) in new stack
00027f75 is probably caller ID but if I press hold
-- Started music on hold, class 'default', on SIP/voxbeam-00027f76
I already told you use the AMI events, but you refuse to do it and keep trying trivial stuff on the command line. At least the positve thing about this is that it will help you to learn
You can use the hold and unhold events to track it down
Samples ouput :
Event: Hold
Privilege: call,all
Channel: SIP/101-0000000c
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 101
CallerIDName:
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: home
Exten: 103
Priority: 3
Uniqueid: 1514613827.12
Linkedid: 1514613827.12
MusicClass: default