Ticket #964 (new Feature Requests)

Opened 7 years ago

Last modified 3 years ago

Limit the duration of the call per trunk

Reported by: jorgeci@hotmail.com Assigned to:
Priority: minor Milestone: Undetermined
Component: Core Version: 2.1
Keywords: Cc:
Confirmation: Unreviewed Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

That you can set the max duration of the call using the dial parameter S(seconds) for each trunk

Attachments

core.patch.zip (2.6 kB) - added by samdart on 04/10/09 17:20:51.
Patching the functions.inc.php and page.routing.php in modules/core directory
ticket964.diff (10.4 kB) - added by mickecarlsson on 04/09/10 06:58:23.
Patch for 2.8.0beta1.2
core-diff.diff (9.7 kB) - added by mickecarlsson on 04/09/10 17:14:46.
New diff for anither approach

Change History

01/11/07 09:34:15 changed by mbrevda

maybe this can be included with naftali5's custom context module? #1447

07/06/08 17:01:51 changed by mbrevda

  • confirmation set to Unreviewed.
  • engine_version changed.
  • svn_rev changed.

dupe of: 1460

07/24/08 21:43:22 changed by ryppn

  • milestone set to 4.0.

04/10/09 17:20:51 changed by samdart

  • attachment core.patch.zip added.

Patching the functions.inc.php and page.routing.php in modules/core directory

04/10/09 17:23:00 changed by samdart

Check out the attached patch for FreePBX 2.5.1 for setting the variable TIMEOUT(absolute) for the outbound route. The timeout is given in seconds and the files /var/www/html/admin/modules/core/page.routing.php and /var/www/html/admin/modules/core/functions.inc.php need to be patched.

The attached file core.patch.zip contains the above mentioned patches.

02/28/10 11:56:22 changed by p_lindheimer

  • milestone changed from Cut Line to 2.8.

04/09/10 06:58:23 changed by mickecarlsson

  • attachment ticket964.diff added.

Patch for 2.8.0beta1.2

04/09/10 06:59:19 changed by mickecarlsson

This is a complete patch for 2.8.0beta1.2. Only thing left to do is to add the proper sound file(s) so that the caller(s) hear the reason for the hangup.

I opted not to check it in as I feel it is up for discussion.

04/09/10 08:42:18 changed by mbrevda

Now if we could only make this conditional on minutes spoken during period X... (this week/month, etc.)

04/09/10 17:14:46 changed by mickecarlsson

  • attachment core-diff.diff added.

New diff for anither approach

04/09/10 17:19:13 changed by mickecarlsson

New diff file, new approach, I now set the S(x) option for the Dial command instead. Advantage is that the timeout period is started after the call is answered. Tested and working. Now I need to figure out if it is the 't' or 'T' extension that the call end up in after the timeout and what the HANGUPCAUSE is set to. For that I need a trunk, that I don't have at home. So this will have to wait until next week, in the mean time I will continue to code the setup and validation for the page.routing.php

04/12/10 03:46:02 changed by mickecarlsson

OK, so now I have tested the S(sec) version and there is no way to detect that the call was ended due to a timeout, it goes straight to the 'h' extension with dialstatus ANSWER and HANGUPCAUSE 16, which is Normal Call Clearing (I have added a new NoOp? to the h extension just to see the response)

rtp.c: Oooh, got a hangup
 -- Executing [h@macro-dialout-trunk:1] NoOp("SIP/2476-0a1f2120", "Call Hangup - Dialstatus is ANSWER HANGUPCAUSE: 16") in
 new stack

So, we can't detect that there was a timeout, IMHO this is bad, I need to think hard about this and discuss this with the other devs.

04/12/10 04:57:08 changed by mbrevda

"So, we can't detect that there was a timeout, IMHO this is bad" Why do we need the timeout, and why is it bad?

04/12/10 13:10:35 changed by mickecarlsson

Well, the timeout in a route is a good thing to have, for example, limit calls to 1-900 numbers. However, I would prefer that when the timeout was reached an optional message file should play something like "I am sorry, this number has a time limit of x minutes".

The TIMEOUT(absolute)="xxx" (seconds) goes to the T-context when the timeout is reached, The difference between these two are:

  • S(x) in Dial starts counting down when call is answered.
  • TIMEOUT(absolute) starts counting down the same second is is set.

05/20/10 14:34:12 changed by p_lindheimer

  • milestone changed from 2.8 to Cut Line.