Hey all Looking for a way to limit all calls to a maximum of 10 minutes, when originating a call using the event socket. I’ve tried using sched_hangup like this: originate {origination_caller_id_number=01234567890,execute_on_answer=sched_hangup +600 alloted_timeout}sofia/. . . . But no dice… R
I think you should also use uuid of call. This is from confluence: <action application="export" data="nolocal:api_on_answer=sched_hangup +60 ${uuid} alloted_timeout" /> 2018-07-03 16:38 GMT+02:00 Rick Jarvis <rick@magicmail.mooo.com>:
Hey all
Looking for a way to limit all calls to a maximum of 10 minutes, when originating a call using the event socket.
I’ve tried using sched_hangup like this:
originate {origination_caller_id_number=01234567890,execute_on_answer=sched_hangup +600 alloted_timeout}sofia/. . . .
But no dice…
R
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Gregor Nanger *CTO* t./f.: 00386 (0) 7 6000 308/309 • m:. 00386 (0)41 756485 • Infomedia d.o.o. • Jerebova 3, Novo mesto, Slovenia • www.infomedia.si
originate {origination_caller_id_number=01234567890,execute_on_answer='sched_hangup +10 alloted_timeout'}sofia/... Regards, David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337 ᐧ On Wed, Jul 4, 2018 at 12:52 AM Rick Jarvis <rick@magicmail.mooo.com> wrote:
Hey all
Looking for a way to limit all calls to a maximum of 10 minutes, when originating a call using the event socket.
I’ve tried using sched_hangup like this:
originate {origination_caller_id_number=01234567890,execute_on_answer=sched_hangup +600 alloted_timeout}sofia/. . . .
But no dice…
R _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
I'm not sure how it works with originate -- but there's two versions as per the docs <https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools:+sched+hangup>. There's sched_hangup and calling it as an api. If you call it as an API, then you need to put the ${uuid} in, which I don't know if that's available in an originate unless you specify it. What do the logs say when the time expires? I have an api_on_answer in my bridge string, to only cut off the b leg: <action application="export" data="nolocal:api_on_answer=sched_transfer +999 ${uuid} cutoff_incall"/> -Avi Marcus BestFone On Wed, Jul 4, 2018 at 1:12 AM Rick Jarvis <rick@magicmail.mooo.com> wrote:
Hey all
Looking for a way to limit all calls to a maximum of 10 minutes, when originating a call using the event socket.
I’ve tried using sched_hangup like this:
originate {origination_caller_id_number=01234567890,execute_on_answer=sched_hangup +600 alloted_timeout}sofia/. . . .
But no dice…
R _________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
have you tried setting the time to minutes (10) instead of 600? thanks Matt Matt Broad Tel: +44 (0)203 011 1313 <+44%2020%203011%201313> Web: www.supportedbusiness.com The content of this email, including any files or documents attached, are confidential and may also be legally privileged, protected from disclosure and/or protected by other legal rules. It is written without prejudice and is intended for the individual specified in the message only. The views and opinions included in this email belong to their author and do not necessarily mirror the views and opinions of the company. Full security of this email cannot be ensured as, despite our best efforts, the data included in emails could be infected, intercepted, or corrupted. Do not share any part of this message with any third party, without a written consent of the sender. If you have received this message in error, please notify us and remove it from your system. On 3 July 2018 at 15:38, Rick Jarvis <rick@magicmail.mooo.com> wrote:
Hey all
Looking for a way to limit all calls to a maximum of 10 minutes, when originating a call using the event socket.
I’ve tried using sched_hangup like this:
originate {origination_caller_id_number=01234567890,execute_on_answer=sched_hangup +600 alloted_timeout}sofia/. . . .
But no dice…
R
_________________________________________________________________________ Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
This is how I do it (in javascipt)… if (session.ready()) { session.answer(); endSecs = 600; // 10 minutes var sessOut = new Session(trunk + dialedNum); if (sessOut.ready()) { sessOut.execute("set", "execute_on_answer_2=sched_hangup +" + endSecs); bridge(session, sessOut); } sessOut.hangup(); session.hangup(); } From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> On Behalf Of Rick Jarvis Sent: martedì 3 luglio 2018 16:38 To: FreeSWITCH Help <freeswitch-users@lists.freeswitch.org> Subject: [Freeswitch-users] Limiting call length Hey all Looking for a way to limit all calls to a maximum of 10 minutes, when originating a call using the event socket. I’ve tried using sched_hangup like this: originate {origination_caller_id_number=01234567890,execute_on_answer=sched_hangup +600 alloted_timeout}sofia/. . . . But no dice… R
participants (6)
-
Avi Marcus
-
David Villasmil
-
Francesco Facco de Lagarda
-
Gregor Nanger
-
Matt Broad
-
Rick Jarvis