[asterisk-bugs] [JIRA] (ASTERISK-27920) app_queue: Queue member considered inuse after immediately hanging up during dialing.
Cao Minh Hiep (JIRA)
noreply at issues.asterisk.org
Wed Aug 22 02:37:54 CDT 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-27920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=244578#comment-244578 ]
Cao Minh Hiep commented on ASTERISK-27920:
------------------------------------------
Hello,
Here are results that we have investigated.
This issue related to setting of holdtime, announcements, member delays.
It works well if we set the member delays to "0" and no announcements and no holdtime.
This issue will happen if we set member delays to "1", "2"... or announcements or holdtime and hangs up the call during processing it.
And here is the reason:
(At the step of answering a phone.)
It takes care any holdtime, announcements, member delays, or other options after a call has been answered if it exists. (We can see the following the part of the source code to know it.)
Normally, After the call has been aswered, and we wait for the processing one of the cases of the member delays or hold time or announcements finished, "if (ast_check_hangup(peer))" will be not executed, then queue will be updated at update_queue(). Here, pending member will be removed.
However, after the call has been aswered, if we hangs up the call during one of the cases of the member delays or hold time or announcements, "if (ast_check_hangup(peer))" will be executed.
In this case, outgoing = NULL and at hangupcalls, pending members will not be removed.
In try_calling () process:
{noformat}
if (announce || qe->parent->reportholdtime || qe->parent->memberdelay) {
int res2;
res2 = ast_autoservice_start(qe->chan);
if (!res2) {
if (qe->parent->memberdelay) {
...
}
if (!res2 && announce) {
...
}
if (!res2 && qe->parent->reportholdtime) {
...
}
if (ast_check_hangup(peer)) {
/* Agent must have hung up */
...
}
...
}
{noformat}
That's why we suggest removing the pending members in case of "if (ast_check_hangup(peer)) " executes.
Please consider it and have a look at these points.
Thank you.
> app_queue: Queue member considered inuse after immediately hanging up during dialing.
> -------------------------------------------------------------------------------------
>
> Key: ASTERISK-27920
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27920
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Applications/app_queue
> Affects Versions: 13.21.0
> Environment: Asterisk v13.21.0, Telephone.
> Reporter: Cao Minh Hiep
> Assignee: Unassigned
> Attachments: ast_configs.csv, ast_extensions.csv, Unconditional_call_forward-CLI_logs_13.21.txt, Unconditional_call_forward_failed_full_logs_13.21.txt, Unconditional_call_forward_failed_queue-logs_13.21.txt
>
>
> Hello,
> We found an issue when making an Unconditional Call Forward as the following:
> 1. Two phones A and phone B in two work groups.
> 2. Setup an Unconditional Call Forward from phone A to phone B.
> 3. Make a call from outside to phone A.
> 4. Phone A will be not ringing, it forwards to phone B.
> 5. Phone B will be ringing, then pick up phone B.
> 6. After picking up phone B, immediately hang up phone B.
> 7. Phone B has been hung up, however still hear ringing sound from the outside phone.
> 8. Queue log will output the message of "has another call trying, can't receive the call "
> 9. Hang up the outside phone then try to make another call.
> 10. Now we can hear ringing sound from outside phone but, phone B now is not ringing.
> We investigated the issue and understood that:
> 1). It will happen 100% with the scenario above.
> 2). And It will not happen if picking up the phone and answer.
> 3). When making an unconditional call forward,
> the queue member of the phone A will be added to pending members container,
> and the queue member of the phone B will be not added to.
> 4). Normally, the added queue member will be removed after hung up the phone at update_queue().
> 5). When the issue happens, It will not be hung up in this way, therefore
> the added queue member will not be removed.
> 6). We tried to fix this issue by adding "pending_members_remove(member)" into the following code:
> {noformat}
> if (ast_check_hangup(peer)) {
> /* Agent must have hung up */
> ast_log(LOG_WARNING, "Agent on %s hungup on the customer.\n", ast_channel_name(peer));
> + pending_members_remove(member);
> ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "AGENTDUMP", "%s", "");
> blob = ast_json_pack("{s: s, s: s, s: s}", "Queue", queuename,
> "Interface", member->interface,
> "MemberName", member->membername);
> queue_publish_multi_channel_blob(qe->chan, peer,
> queue_agent_dump_type(), blob);
> ast_channel_publish_dial(qe->chan, peer, member->interface,
> ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));
> ast_autoservice_chan_hangup_peer(qe->chan, peer);
> ao2_ref(member, -1);
> goto out;
> } else if (ast_check_hangup(qe->chan)) {
> {noformat}
> Then, issue does not happen.
> Please take a look at them and tell us the correct way to solve this issue.
> Thank you.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list