Skip to content

app_dial: Properly handle callee hangup while sending digits.#1916

Open
InterLinked1 wants to merge 1 commit intoasterisk:masterfrom
InterLinked1:master-issue-1915
Open

app_dial: Properly handle callee hangup while sending digits.#1916
InterLinked1 wants to merge 1 commit intoasterisk:masterfrom
InterLinked1:master-issue-1915

Conversation

@InterLinked1
Copy link
Copy Markdown
Contributor

If we are sending digits (either DTMF, MF, or SF) to the called channel
after receiving progress or a wink, and the callee hangs up before we
have finished sending it digits, there are several problems that can ensue:

  • If the callee hung up without answering, the calling channel would
    hang up and not continue in the dialplan.
  • If the callee did answer before hanging up, the answer was never
    passed through to the caller, since this gets "eaten" by the various
    digit streaming functions and is never processed by app_dial.

This is generally an edge case that occurs due to some kind of signaling
failure, but to better handle this:

  • Set to_answer to 0 to prevent hangup on the exit path, just like other
    parts of wait_for_answer.
  • Better document this usage of to_answer.
  • If the channel did answer while it was receiving digits, manually
    answer the calling channel before we abort. The call would not continue
    in the dialplan anyways (either before or after this fix), but technically
    the call was answered, so the CDRs should probably reflect that, and this
    mirrors the behavior of calls which normally do not continue.

Resolves: #1915

@InterLinked1
Copy link
Copy Markdown
Contributor Author

cherry-pick-to: 23
cherry-pick-to: 22
cherry-pick-to: 20

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Workflow Check completed successfully

If we are sending digits (either DTMF, MF, or SF) to the called channel
after receiving progress or a wink, and the callee hangs up before we
have finished sending it digits, there are several problems that can ensue:

* If the callee hung up without answering, the calling channel would
  hang up and not continue in the dialplan.
* If the callee *did* answer before hanging up, the answer was never
  passed through to the caller, since this gets "eaten" by the various
  digit streaming functions and is never processed by app_dial.

This is generally an edge case that occurs due to some kind of signaling
failure, but to better handle this:

* Set to_answer to 0 to prevent hangup on the exit path, just like other
  parts of wait_for_answer.
* Better document this usage of to_answer.
* If the channel did answer while it was receiving digits, manually
  answer the calling channel before we abort. The call would not continue
  in the dialplan anyways (either before or after this fix), but technically
  the call was answered, so the CDRs should probably reflect that, and this
  mirrors the behavior of calls which normally do not continue.

Resolves: asterisk#1915
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Workflow Check failed
master-ari1: FAILED TEST: rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: app_dial: Channel not handled properly if callee disconnects while caller is sending it digits prior to answer

1 participant