<div dir="ltr"><div dir="ltr">On Mon, Dec 30, 2019 at 5:49 PM David P <<a href="mailto:davidswalkabout@gmail.com">davidswalkabout@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Response below...</div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Dec 27, 2019 at 12:02 PM David P <<a href="mailto:davidswalkabout@gmail.com" target="_blank">davidswalkabout@gmail.com</a>> wrote:<br>
<br>
><br>
> I'm looking for a way of detecting in my dialplan when a peer becomes<br>
> non-responsive after answering. [deleted] Is there a way to configure<br>
> a handler for this state?<br>
><br>
> We use v14.7.6 and we dial the peer this way:<br>
><br>
>  same =><br>
> n,Set(CHANNEL(hangup_handler_push)=${CONTEXT},handleHangupByCaller,1(args))<br>
>  same =><br>
> n,Dial(${AddressToReachPeer},2,b(${CONTEXT}^afterDialingPeerLogIpOfCb^1(${UUID}^${StartEpoch})))<br>
>  same => n,Goto(handle${DIALSTATUS},1)<br>
><br></blockquote><div><br></div><div>"Joshua C. Colp" <<a href="mailto:jcolp@sangoma.com" target="_blank">jcolp@sangoma.com</a>> replied: </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[deleted] As for hanging up a call when the remote<br>
goes away that depends on the channel driver. For SIP both chan_sip and<br>
chan_pjsip provide session timers which use SIP messages to determine if<br>
the call is no longer valid, or RTP timeout which hangs up the call if<br>
media is not flowing for a period of time. These are configured in the<br>
respective channel driver configuration file.<br></blockquote><div><br></div><div>Thanks, Joshua.</div><div><br></div><div>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.</div><div><br></div><div>I tried adding</div><div>rtptimeout=4</div><div>to the config of the peer in sip.conf, but this causes hangup during the person's turn.</div><div><br></div><div>Then I looked into session timers, and found that <a href="https://issues.asterisk.org/jira/secure/attachment/28201/AsteriskSipSessionTimers.pdf" target="_blank">https://issues.asterisk.org/jira/secure/attachment/28201/AsteriskSipSessionTimers.pdf</a> says the shortest period supported for such checks is 90 seconds, which is much too long for us.</div><div><br></div><div>Is there another option? Would it allow calling a script or playing a prompt on the way to hanging up? </div></div></div></blockquote><div><br></div><div>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.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><font color="#073763">Joshua C. Colp</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Asterisk Technical Lead</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Sangoma Technologies</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Check us out at <a href="http://www.sangoma.com" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a></font><br></div></div></div></div></div></div></div></div></div></div></div>