Asterisk
  1. Asterisk
  2. ASTERISK-8155

wrong behavior of 'L(x:y:z)' parameters in Dial application

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Applications/app_dial
    • Labels:
      None
    • Mantis ID:
      8386
    • Regression:
      No

      Description

      the example of it is so:

      – Executing Set("SIP/phone3-0817b868", "LIMIT_PLAYAUDIO_CALLER=yes") in new stack
      – Executing Set("SIP/phone3-0817b868", "LIMIT_PLAYAUDIO_CALLEE=no") in new stack
      – Executing Set("SIP/phone3-0817b868", "LIMIT_TIMEOUT_FILE=hello-world") in new stack
      – Executing Set("SIP/phone3-0817b868", "LIMIT_CONNECT_FILE=hello-world") in new stack
      – Executing Set("SIP/phone3-0817b868", "LIMIT_WARNING_FILE=hello-world") in new stack
      – Executing Dial("SIP/phone3-0817b868", "SIP/phone1|20|L(15000:10000:5000)") in new stack
      – Limit Data for this call:
      – - timelimit = 15000
      – - play_warning = 10000
      – - play_to_caller= yes
      – - play_to_callee= no
      – - warning_freq = 5000
      – - start_sound = hello-world
      – - warning_sound = hello-world
      – - end_sound = hello-world
      – Called phone1
      – SIP/phone1-08181790 is ringing
      – SIP/phone1-08181790 answered SIP/phone3-0817b868
      – Playing 'hello-world' (language 'en')
      == Spawn extension (l_call, 1, 6) exited non-zero on 'SIP/phone3-0817b868'

      So it plays only the first sound (start_sound) with starting the call.
      And then it makes hungup after 'x-y' ! ms with no 'warning sound' or even 'end_sound' . But it should do hungup after 'x' ms.

                • ADDITIONAL INFORMATION ******

      my context for example:

      [l_call]
      exten => 1,1,SET(LIMIT_PLAYAUDIO_CALLER=yes)
      exten => 1,n,SET(LIMIT_PLAYAUDIO_CALLEE=no)
      exten => 1,n,SET(LIMIT_TIMEOUT_FILE=hello-world)
      exten => 1,n,SET(LIMIT_CONNECT_FILE=hello-world)
      exten => 1,n,SET(LIMIT_WARNING_FILE=hello-world)
      exten => 1,n,Dial(SIP/phone1,20,L(15000:10000:5000))

        Activity

        No builds found.
        Yuri Sklar created issue -
        Hide
        Yuri Sklar added a comment -

        Please tell me if I missed somethihg, because it's my first issue

        Show
        Yuri Sklar added a comment - Please tell me if I missed somethihg, because it's my first issue
        Hide
        Nickolay Kharchevin added a comment -

        Asterisk dont play any sound if nowtime - starttime - timelimit < 5000 ms
        Problem in ast_bridge_call. I make some modifications in channels.c (see patch) and now it work for me.
        Test needed.

        Show
        Nickolay Kharchevin added a comment - Asterisk dont play any sound if nowtime - starttime - timelimit < 5000 ms Problem in ast_bridge_call. I make some modifications in channels.c (see patch) and now it work for me. Test needed.
        Hide
        jsolares added a comment -

        Works fine here, i had it fixed a different way but this is simpler.

        I think L(x:y:z) was not working at all, i had L(30000:10000) and the calls were dying after aprox 20000ms into it without playing the warning file.

        Show
        jsolares added a comment - Works fine here, i had it fixed a different way but this is simpler. I think L(x:y:z) was not working at all, i had L(30000:10000) and the calls were dying after aprox 20000ms into it without playing the warning file.
        Hide
        Nickolay Kharchevin added a comment -

        Dial(SIP/phone1,20,L(15200:10000:5000)) - will make hangup after 20200 ms.

        see yet.another.patch

        Show
        Nickolay Kharchevin added a comment - Dial(SIP/phone1,20,L(15200:10000:5000)) - will make hangup after 20200 ms. see yet.another.patch
        Hide
        jsolares added a comment -

        Tried the new patch with L(60000:20000:5000), got warnings played at around 40s, 45s, 50s. no warning at around 55s, call got hung up at 62s.

        Not sure if it should play the one at aprox 55s, which seems to have been scheduled at 56 or 57. The call got hungup at 62s, all calls seem to overshoot by 1 or 2s, without the patch it would have gotten hangup at around 41s. so the 1 or 2 extra seconds dont seem to be from the patch but due to timing.

        Show
        jsolares added a comment - Tried the new patch with L(60000:20000:5000), got warnings played at around 40s, 45s, 50s. no warning at around 55s, call got hung up at 62s. Not sure if it should play the one at aprox 55s, which seems to have been scheduled at 56 or 57. The call got hungup at 62s, all calls seem to overshoot by 1 or 2s, without the patch it would have gotten hangup at around 41s. so the 1 or 2 extra seconds dont seem to be from the patch but due to timing.
        Hide
        Steve Murphy added a comment -

        OK, I've committed these changes to the 1.2 tree in r47910.

        I tested them on a local 1.2 copy, and verified that the bug exists, and the supplied patch fixed it.

        A test on the 1.4 branch shows it works OK, and needs no fixing.

        Show
        Steve Murphy added a comment - OK, I've committed these changes to the 1.2 tree in r47910. I tested them on a local 1.2 copy, and verified that the bug exists, and the supplied patch fixed it. A test on the 1.4 branch shows it works OK, and needs no fixing.
        Hide
        Steve Murphy added a comment -

        Since 1.4 already works OK, I blocked 47910 from 1.4 with r47911.

        Show
        Steve Murphy added a comment - Since 1.4 already works OK, I blocked 47910 from 1.4 with r47911.
        Erin Spiceland made changes -
        Field Original Value New Value
        issue.field.mantisimportkey 8386 31923
        Erin Spiceland made changes -
        Workflow jira [ 73743 ] Subtask and Courtesy Workflow [ 93886 ]
        Erin Spiceland made changes -
        Assignee Steve Murphy [ murf ]

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development