Re: [asterisk-users] Handling a non-responsive peer after it answers

2019-12-30 Thread Joshua C. Colp
On Mon, Dec 30, 2019 at 5:49 PM David P  wrote:

> Response below...
>
> On Fri, Dec 27, 2019 at 12:02 PM David P 
>> wrote:
>>
>> >
>> > I'm looking for a way of detecting in my dialplan when a peer becomes
>> > non-responsive after answering. [deleted] Is there a way to configure
>> > a handler for this state?
>> >
>> > We use v14.7.6 and we dial the peer this way:
>> >
>> >  same =>
>> >
>> n,Set(CHANNEL(hangup_handler_push)=${CONTEXT},handleHangupByCaller,1(args))
>> >  same =>
>> >
>> n,Dial(${AddressToReachPeer},2,b(${CONTEXT}^afterDialingPeerLogIpOfCb^1(${UUID}^${StartEpoch})))
>> >  same => n,Goto(handle${DIALSTATUS},1)
>> >
>>
>
> "Joshua C. Colp"  replied:
>
>> [deleted] As for hanging up a call when the remote
>> goes away that depends on the channel driver. For SIP both chan_sip and
>> chan_pjsip provide session timers which use SIP messages to determine if
>> the call is no longer valid, or RTP timeout which hangs up the call if
>> media is not flowing for a period of time. These are configured in the
>> respective channel driver configuration file.
>>
>
> Thanks, Joshua.
>
> We want to check if a peer is responsive every few seconds, because it's a
> person-to-bot call and we want to respond gracefully if the bot fails.
>
> I tried adding
> rtptimeout=4
> to the config of the peer in sip.conf, but this causes hangup during the
> person's turn.
>
> Then I looked into session timers, and found that
> https://issues.asterisk.org/jira/secure/attachment/28201/AsteriskSipSessionTimers.pdf
> says the shortest period supported for such checks is 90 seconds, which is
> much too long for us.
>
> Is there another option? Would it allow calling a script or playing a
> prompt on the way to hanging up?
>

Those are the available options. There is no capability to call a script or
play a prompt or anything like that that I can think of.

-- 
Joshua C. Colp
Asterisk Technical 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] Handling a non-responsive peer after it answers

2019-12-30 Thread David P
Response below...

On Fri, Dec 27, 2019 at 12:02 PM David P  wrote:
>
> >
> > I'm looking for a way of detecting in my dialplan when a peer becomes
> > non-responsive after answering. [deleted] Is there a way to configure
> > a handler for this state?
> >
> > We use v14.7.6 and we dial the peer this way:
> >
> >  same =>
> >
> n,Set(CHANNEL(hangup_handler_push)=${CONTEXT},handleHangupByCaller,1(args))
> >  same =>
> >
> n,Dial(${AddressToReachPeer},2,b(${CONTEXT}^afterDialingPeerLogIpOfCb^1(${UUID}^${StartEpoch})))
> >  same => n,Goto(handle${DIALSTATUS},1)
> >
>

"Joshua C. Colp"  replied:

> [deleted] As for hanging up a call when the remote
> goes away that depends on the channel driver. For SIP both chan_sip and
> chan_pjsip provide session timers which use SIP messages to determine if
> the call is no longer valid, or RTP timeout which hangs up the call if
> media is not flowing for a period of time. These are configured in the
> respective channel driver configuration file.
>

Thanks, Joshua.

We want to check if a peer is responsive every few seconds, because it's a
person-to-bot call and we want to respond gracefully if the bot fails.

I tried adding
rtptimeout=4
to the config of the peer in sip.conf, but this causes hangup during the
person's turn.

Then I looked into session timers, and found that
https://issues.asterisk.org/jira/secure/attachment/28201/AsteriskSipSessionTimers.pdf
says the shortest period supported for such checks is 90 seconds, which is
much too long for us.

Is there another option? Would it allow calling a script or playing a
prompt on the way to hanging up?
-- 
_
-- 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] Handling a non-responsive peer after it answers

2019-12-27 Thread Joshua C. Colp
On Fri, Dec 27, 2019 at 12:02 PM David P  wrote:

>
> I'm looking for a way of detecting in my dialplan when a peer becomes
> non-responsive after answering. It seems that Asterisk knows when the peer
> becomes non-responsive because it logs "Remote UNIX connection
> disconnected" around the same time, and it seems that
> if there is no following "Remote UNIX connection" within a short time,
> then the peer can be considered non-responsive. Is there a way to configure
> a handler for this state?
>
> We use v14.7.6 and we dial the peer this way:
>
>  same =>
> n,Set(CHANNEL(hangup_handler_push)=${CONTEXT},handleHangupByCaller,1(args))
>  same =>
> n,Dial(${AddressToReachPeer},2,b(${CONTEXT}^afterDialingPeerLogIpOfCb^1(${UUID}^${StartEpoch})))
>  same => n,Goto(handle${DIALSTATUS},1)
>

The referenced message is not related to the call at all. It occurs when an
"asterisk -r" console disconnects. As for hanging up a call when the remote
goes away that depends on the channel driver. For SIP both chan_sip and
chan_pjsip provide session timers which use SIP messages to determine if
the call is no longer valid, or RTP timeout which hangs up the call if
media is not flowing for a period of time. These are configured in the
respective channel driver configuration file.

-- 
Joshua C. Colp
Asterisk Technical 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

[asterisk-users] Handling a non-responsive peer after it answers

2019-12-27 Thread David P
I'm looking for a way of detecting in my dialplan when a peer becomes
non-responsive after answering. It seems that Asterisk knows when the peer
becomes non-responsive because it logs "Remote UNIX connection
disconnected" around the same time, and it seems that
if there is no following "Remote UNIX connection" within a short time, then
the peer can be considered non-responsive. Is there a way to configure a
handler for this state?

We use v14.7.6 and we dial the peer this way:

 same =>
n,Set(CHANNEL(hangup_handler_push)=${CONTEXT},handleHangupByCaller,1(args))
 same =>
n,Dial(${AddressToReachPeer},2,b(${CONTEXT}^afterDialingPeerLogIpOfCb^1(${UUID}^${StartEpoch})))
 same => n,Goto(handle${DIALSTATUS},1)

Cheers,
David
-- 
_
-- 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