Re: [asterisk-users] Answer()ing a local Originate takes 500ms!?

2022-11-11 Thread Joshua C. Colp
On Fri, Nov 11, 2022 at 12:15 PM Antony Stone <
antony.st...@asterisk.open.source.it> wrote:

> On Friday 11 November 2022 at 17:11:26, Joshua C. Colp wrote:
>
> > On Fri, Nov 11, 2022 at 12:09 PM Antony Stone wrote:
> > >
> > > https://wiki.asterisk.org/wiki/display/AST/Application_Answer tells me
> > > that the Answer() application takes an optional parameter which causes
> > > Asterisk to wait that number of milliseconds before returning to the
> > > dialplan after answering the call.
> > >
> > > Does this undocumentedly default to 500?
>
> > There is a hard coded minimum of 500 milliseconds for media to flow.
> You'd
> > have to modify the code to remove it.
>
> Urgh!
>
> Is there _anything_ I can do in either the Originate() or the Answer() to
> avoid this, without having to rebuild Asterisk?
>

Not really, it waits until media flows. That's the way it is written.


>
> And, separately, please can I request that:
>
> a) this minimum is documented
>
> b) it can be over-ridden at the user's own risk if the supplied parameter
> is
> lower than 500.
>

Any such things should go into a JIRA issue[1].

[1] https://issues.asterisk.org/jira

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Answer()ing a local Originate takes 500ms!?

2022-11-11 Thread Antony Stone
On Friday 11 November 2022 at 17:11:26, Joshua C. Colp wrote:

> On Fri, Nov 11, 2022 at 12:09 PM Antony Stone wrote:
> > 
> > https://wiki.asterisk.org/wiki/display/AST/Application_Answer tells me
> > that the Answer() application takes an optional parameter which causes
> > Asterisk to wait that number of milliseconds before returning to the
> > dialplan after answering the call.
> > 
> > Does this undocumentedly default to 500?

> There is a hard coded minimum of 500 milliseconds for media to flow. You'd
> have to modify the code to remove it.

Urgh!

Is there _anything_ I can do in either the Originate() or the Answer() to 
avoid this, without having to rebuild Asterisk?

And, separately, please can I request that:

a) this minimum is documented

b) it can be over-ridden at the user's own risk if the supplied parameter is 
lower than 500.


Thanks,


Antony.

-- 
A good conversation is like a miniskirt;
short enought to retain interest,
but long enough to cover the subject.

 - Celeste Headlee


   Please reply to the list;
 please *don't* CC me.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Answer()ing a local Originate() takes 500ms!?

2022-11-11 Thread Antony Stone
On Friday 11 November 2022 at 17:08:42, Antony Stone wrote:

> Hi.
> 
> Asterisk 16.2.1
> 
> I have a dialplan where one context (named "inbound") performs:
> 
> Originate(Local/${Target}@inOrig,exten,inbound,${EXTEN},208)
> 
> The idea is that this command will spawn a "call" to the context "inOrig"
> on the same machine, and then return to the "inbound" context at priority
> 208.
> 
> Priority 208 is simply a NoOp(Returned from inOrig)
> 
> The "inOrig" context does:
> 
> NoOp(Answering inbound call)
> Answer()
> NoOp(Returned to inbound context)
> Originate(Local/${EXTEN}@dialout,exten,BridgIt,${EXTEN},1)
> 
> It's all doing what I want / expect, but I am seeing, completely
> consistently, a 500ms delay in the Answer() application.
> 
> So, I get the following sequence of timings:
> 
> 08:41:49.514918 inbound:201 Originate(.)
> 08:41:49.516459 inOrig:1 NoOp(Answering inbound call)
> 08:41:49.517016 inOrig:2 Answer()
> 08:41:49.517489 inbound:208 NoOp(Returned from inOrig)
> 08:41:50.017454 inOrig:3 NoOp(Returned to inbound context)
> 
> I have analysed dozens of calls and there is always a ~500ms delay between
> when the Answer() has clearly completed (because control returns to
> priority 208 of the "inbound" context), and when the inOrig context
> continues with the following NoOp.
> 
> https://wiki.asterisk.org/wiki/display/AST/Application_Answer tells me that
> the Answer() application takes an optional parameter which causes Asterisk
> to wait that number of milliseconds before returning to the dialplan after
> answering the call.
> 
> Does this undocumentedly default to 500?

PS: It doesn't look like it - changing the dialplan to do Answer(1) instead 
makes no difference - there's still a 500ms delay (and it's astonishingly 
consistent).

> Are the results I'm seeing expected, is there something wrong with my
> dialplans, is there some way to eliminate this delay?
> 
> 
> Thanks for any insight.
> 
> 
> Antony.

-- 
Numerous psychological studies over the years have demonstrated that the 
majority of people genuinely believe they are not like the majority of people.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Answer()ing a local Originate takes 500ms!?

2022-11-11 Thread Joshua C. Colp
On Fri, Nov 11, 2022 at 12:09 PM Antony Stone <
antony.st...@asterisk.open.source.it> wrote:

> Hi.
>
> Asterisk 16.2.1
>
> I have a dialplan where one context (named "inbound") performs:
>
> Originate(Local/${Target}@inOrig,exten,inbound,${EXTEN},208)
>
> The idea is that this command will spawn a "call" to the context "inOrig"
> on
> the same machine, and then return to the "inbound" context at priority 208.
>
> Priority 208 is simply a NoOp(Returned from inOrig)
>
> The "inOrig" context does:
>
> NoOp(Answering inbound call)
> Answer()
> NoOp(Returned to inbound context)
> Originate(Local/${EXTEN}@dialout,exten,BridgIt,${EXTEN},1)
>
> It's all doing what I want / expect, but I am seeing, completely
> consistently,
> a 500ms delay in the Answer() application.
>
> So, I get the following sequence of timings:
>
> 08:41:49.514918 inbound:201 Originate(.)
> 08:41:49.516459 inOrig:1 NoOp(Answering inbound call)
> 08:41:49.517016 inOrig:2 Answer()
> 08:41:49.517489 inbound:208 NoOp(Returned from inOrig)
> 08:41:50.017454 inOrig:3 NoOp(Returned to inbound context)
>
> I have analysed dozens of calls and there is always a ~500ms delay between
> when the Answer() has clearly completed (because control returns to
> priority
> 208 of the "inbound" context), and when the inOrig context continues with
> the
> following NoOp.
>
> https://wiki.asterisk.org/wiki/display/AST/Application_Answer tells me
> that
> the Answer() application takes an optional parameter which causes Asterisk
> to
> wait that number of milliseconds before returning to the dialplan after
> answering the call.
>
> Does this undocumentedly default to 500?
>
> Are the results I'm seeing expected, is there something wrong with my
> dialplans, is there some way to eliminate this delay?
>

There is a hard coded minimum of 500 milliseconds for media to flow. You'd
have to modify the code to remove it.

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users