How to hangup a call when Endpoint goes unreachable?

I have asked this question elsewhere (other forums), I hope that’s not a violation of anything nor offensive to those who’ve offered help, I am just trying to cast a wide net.

In this scenario I am using a sip.js browser-based softphone which works perfectly into pjsip via web sockets.

If I have an ongoing call which is terminated for reason of network connection failure, asterisk picks it up almost straight away with something like:


[Aug 28 21:20:26] WARNING[22370]: res_http_websocket.c:523 ws_safe_read: Web socket closed abruptly
-- Removed contact 'sip:pehgks63@86.18.XX.XXX:41453;transport=ws' from AOR 'adrian' due to shutdown
== Contact adrian/sip:pehgks63@86.18.XX.XXX:41453;transport=ws has been deleted
== Endpoint adrian is now Unreachable
== WebSocket connection from '86.18.XX.XXX:41453' closed

However, the call itself is not terminated, it just ticks along happily in the background until I manually issue a hangup request.

How can I make asterisk disconnect the call when one of the endpoints participating in it drops offline?

I have tried lowering timers_min_se and timers_sess_expires as low as they’ll go to no avail, surely there is some way to connect these dots - asterisk knows the endooint is gone, why isn’t it throwing away the associated channel?

Thank you all!

You need to use RTP timeouts. Asterisk will continue transmitting media and that could well work, as,in general media end points can differ from the signalling ones.

Are you referring to rtp_timeout in my pjsip.conf endpoint, David?

Probably. I’ve only used the similarly named option in chan_sip.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.