FreePBX
  1. FreePBX
  2. FREEPBX-5687

call waiting indication to caller in cases that the dialed extension is in use or busy

    Details

    • Type: Improvement Improvement
    • Status: Open (View Workflow)
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.10, 2.11
    • Fix Version/s: None
    • Component/s: Follow Me
    • Labels:
    • Target Release:
    • Backend Engine:
      Asterisk 1.8
    • Confirmation:
      Unreviewed
    • ToDo:

      Description

      Hello,

      I would like to offer a feature request that will indicate a call waiting tone to the caller in cases when the dialed extension is in use or busy.

      instead of this line in macro-dial-one:

      exten => s,n(godial),Dial(${DSTRING},${ARG1},${D_OPTIONS})
      

      you can replace this line with this code sample:

      exten => s,n(godial),GotoIf($["${EXTENSION_STATE(${DEXTEN})}"="UNAVAILABLE" | "${EXTENSION_STATE(${DEXTEN})}"="NOT_INUSE" | "${EXTENSION_STATE(${DEXTEN})}"="UNKNOWN"]?dial:dialbusy)
      exten => s,n(dialbusy),GotoIf($["${EXTENSION_STATE(${DEXTEN})}" = "BUSY"]?dialcallwaiting)
      exten => s,n(dialcallwaiting),Dial(${DSTRING},${ARG1},r(callwaiting))
      exten => s,n(dial),Dial(${DSTRING},${ARG1},${D_OPTIONS})
      

      There is still a problem with the dialparties.agi. When ever an extension has a followme (that uses the dialparties.agi), this change will not take effect.

      Moshe, can you please take a look at that and add a fix to all the dial macros (including the dialparties.agi)? all you need to add when the extension state's in-use or busy is to add the call waiting indication (it will take is from indications.conf).

      this is the syntax to add a tone to the r option in the Dial application:

      Dial(${DSTRING},${ARG1},r(callwaiting))
      

      Maybe you can add an option in the general settings page to let the users choose if they want to play a call waiting tone when the extension is in-use or busy.

      Thank you,

      Daniel Friedman
      Trixton

      Tel: 972.72.2557000
      Mobile: 972.50.6655579

      Email: dani@3xton.com

        Activity

        Hide
        jviegas added a comment -

        Hello,

        This is a great feature.

        I agree that should be global and I don't see any privacy issue.

        Best regards,

        João Viegas

        Show
        jviegas added a comment - Hello, This is a great feature. I agree that should be global and I don't see any privacy issue. Best regards, João Viegas
        Hide
        Tony Lewis added a comment -

        It can not be global. It has to be a per user settings. Something like this should not be forced onto all users no different then turning on or off call waiting is a per user settings.

        If you have this all done already in your own fork can you make this be a per user settings and also provide a proper patch against 2.11 and we can look at getting it into FreePBX 12. We will also need a code submission agreement back. http://literature.schmoozecom.com/EUA/CodeSubmissionsAgreement-r3.pdf

        Show
        Tony Lewis added a comment - It can not be global. It has to be a per user settings. Something like this should not be forced onto all users no different then turning on or off call waiting is a per user settings. If you have this all done already in your own fork can you make this be a per user settings and also provide a proper patch against 2.11 and we can look at getting it into FreePBX 12. We will also need a code submission agreement back. http://literature.schmoozecom.com/EUA/CodeSubmissionsAgreement-r3.pdf
        Hide
        danielf added a comment -

        Hello Tony,

        here is the code that i have added to the last version of the Freepbx web interface (Ver. 2.11.0.37):
        i have edited the core functions file (/var/www/html/admin/modules/core/functions.inc.php).

        //Original Line Code
        //      $ext->add($mcontext,$exten,'godial', new ext_dial('${DSTRING}', '${ARG1},${D_OPTIONS}'));
        //Originel Line Code - End
        
        //Daniel Friedman Change for adding call waiting indication
        
                $ext->add($mcontext,$exten,'godial', new ext_gotoif('$["${EXTENSION_STATE(${DEXTEN}}"="INUSE"]','dialcwbusy:dialnocw'));
                $ext->add($mcontext,$exten,'dialcwbusy', new ext_set('D_OPTIONS','r(callwaiting)'));
                $ext->add($mcontext,$exten,'', new ext_dial('${DSTRING}', '${ARG1},${D_OPTIONS}'));
        		$ext->add($mcontext,$exten,'dialnocw', new ext_set('D_OPTIONS', '${ARG1},${D_OPTIONS}'));
        		$ext->add($mcontext,$exten,'', new ext_dial('${DSTRING}', '${ARG1},${D_OPTIONS}'));
        
        //Daniel Friedman End
        

        you can use this simple logic to implement it in the core as an advanced feature (global variable) or to use it globally in the dial plan like i did.

        best regards,

        Daniel Friedman
        Trixton LTD.

        Email: dani@3xton.com

        Tel: 972.72.2557000
        Mobile: 972.50.6655579

        Show
        danielf added a comment - Hello Tony, here is the code that i have added to the last version of the Freepbx web interface (Ver. 2.11.0.37): i have edited the core functions file (/var/www/html/admin/modules/core/functions.inc.php). //Original Line Code // $ext->add($mcontext,$exten,'godial', new ext_dial('${DSTRING}', '${ARG1},${D_OPTIONS}')); //Originel Line Code - End //Daniel Friedman Change for adding call waiting indication $ext->add($mcontext,$exten,'godial', new ext_gotoif('$["${EXTENSION_STATE(${DEXTEN}}"="INUSE"]','dialcwbusy:dialnocw')); $ext->add($mcontext,$exten,'dialcwbusy', new ext_set('D_OPTIONS','r(callwaiting)')); $ext->add($mcontext,$exten,'', new ext_dial('${DSTRING}', '${ARG1},${D_OPTIONS}')); $ext->add($mcontext,$exten,'dialnocw', new ext_set('D_OPTIONS', '${ARG1},${D_OPTIONS}')); $ext->add($mcontext,$exten,'', new ext_dial('${DSTRING}', '${ARG1},${D_OPTIONS}')); //Daniel Friedman End you can use this simple logic to implement it in the core as an advanced feature (global variable) or to use it globally in the dial plan like i did. best regards, Daniel Friedman Trixton LTD. Email: dani@3xton.com Tel: 972.72.2557000 Mobile: 972.50.6655579
        Hide
        Tony Lewis added a comment -

        AS already stated we can not take patches or code without a signed Code Submissions Agreement. http://literature.schmoozecom.com/EUA/CodeSubmissionsAgreement-r3.pdf

        Show
        Tony Lewis added a comment - AS already stated we can not take patches or code without a signed Code Submissions Agreement. http://literature.schmoozecom.com/EUA/CodeSubmissionsAgreement-r3.pdf
        Hide
        danielf added a comment -

        ok, just sent the document.

        Show
        danielf added a comment - ok, just sent the document.

          People

          • Assignee:
            Unassigned
            Reporter:
            danielf
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:

              Development