Issue with Dynamic Route freepbx 17

Hello FreePBX Support,

I am experiencing an issue with my FreePBX setup involving a dynamic route that is not correctly playing the “Invalid Recording” prompt when the user fails to input any digits. Here’s a summary of the setup and the problem:

Setup Details:

  • Dynamic Route Name: aminut_type_your_mobile
  • Max Digits: 11
  • Timeout: 5 seconds
  • Validation Regex: ^05[0-9]{8}$ (requiring a 10-digit mobile number starting with “05”)
  • Invalid Retries: 3
  • Invalid Retry Recording: “bad_input_please_try_again”
  • Invalid Recording: “system_is_waiting_for_a_choice”
  • Invalid Destination: Trunks (LG - pjsip)

Issue Description: The dynamic route is supposed to prompt the user to enter their mobile number. If the user provides invalid input or no input, the system should handle it by playing appropriate prompts.

However, the issue is that when the user does not enter anything at all, the expected “Invalid Recording” (“system_is_waiting_for_a_choice”) prompt is not being played. Instead, the system directly proceeds to retry the input collection, playing “bad_input_please_try_again” and looping back to prompt the user again.

From the logs, I see that when no input is provided, the following occurs:

  1. The system detects no input but immediately retries.
  2. It skips over the step where it should play the “Invalid Recording” and jumps straight to a retry.
  3. This results in the system repeating the prompt and creating a frustrating loop without giving the user a clear indication that no input was detected.

Below is a snippet of the relevant Asterisk log:

-- User entered nothing.
-- Executing [s@dynroute-6:3] Set("PJSIP/LG-00000026", "__DYNROUTE_mobile=") in new stack
-- Executing [s@dynroute-6:4] Set("PJSIP/LG-00000026", "__DYNROUTE_REGEX=0") in new stack
-- Executing [s@dynroute-6:5] GotoIf("PJSIP/LG-00000026", "1?dynroute-6,2,1") in new stack
-- Goto (dynroute-6,2,1)
-- Executing [2@dynroute-6:3] Playback("PJSIP/LG-00000026", "custom/bad_input_please_try_again") in new stack

What I’ve Tried:

  • I double-checked the configuration for the Invalid Recording to ensure that the correct audio file is selected.
  • The dynamic route validation seems to be working properly for invalid inputs, but it doesn’t differentiate between “no input” and “incorrect input” effectively.

Request for Help: Could anyone guide me on how to properly configure the dynamic route so that the “Invalid Recording” is played when the user enters nothing? I want to make sure the system prompts the user appropriately before looping back to retry.

Any insights into the dialplan, custom code, or settings that could help me address this issue would be greatly appreciated.

Thank you in advance for your support!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.