by blackbird2306 » Wed Aug 29, 2018 5:58 pm
You don't need to post any asterisk logs. There is nothing wrong with your setup. It is "normal" behavior, that on-hook phone stays active after hanging up customer connection. And there is no option/setting to change this "bug/behavior" without making changes in the code. And I have a "dirty", but very easy one line solution for this:
1. Make sure that "Status Display Fields" in campaign settings is set to something with "CALLID" (NAME_CALLID_LISTID is also OK)
2. Copy "vicidial.php" to "vicidialhangup.php" or whatever you like before you make any changes
3. Make your changes in the new vicidialhangup.php file:
There is a function dialedcall_send_hangup (starting about line 12238 in svn revision 3020). You need to add only one line just at the end of the function before the closing bracket (about line 12754):
function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo,nodeletevdac,DSHclick)
{
...
...
ShoWTransferMain('OFF');
}
}
// ADD THIS HERE:
if(no_empty_session_warnings == 1 && document.getElementById("MainStatuSSpan").innerHTML.match(/UID: Y/) != null) { livehangup_send_hangup(agentchannel); setTimeout(function() {hideDiv('AlertBox');}, 1200);}
}
The above example will hangup only on-hook phone line after inbound call!! If you want the hangup for both inbound and outbound calls then add this line instead:
if(no_empty_session_warnings == 1) { livehangup_send_hangup(agentchannel); setTimeout(function() {hideDiv('AlertBox');}, 1200); }
Just use the vicidialhangup.php (where you made the changes) for login and be aware that this is a beta version solution. Sure there are many other ways to accomplish this (dialplan, AGI...), but this is the easiest and shortest way.
Last edited by
blackbird2306 on Wed Aug 29, 2018 6:07 pm, edited 1 time in total.
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.12-560a build: 160617-1427 | Asterisk 1.8.32.3