How to hangup incoming call after specific time?

hi there,

I am using asterisk 1.8 and i am having problem with both (SIP trunk and Dahdi channels), most of incoming channels does not hangup … it keep connected and keep the channel busy. is there anyway i can tell asterisk that hangup the call after 59 minutes or 1 hour? I mean i want to get the call hangup forcefully from asterisk.

Please let me know if there is anyway to do this.

Sohaib Khan

Use the L trigger in your dial command … ation_Dial

There are many workaround about this issue. But related to terminate the call after X amount of time. You could use AbsoluteTimeout() Set absolute maximum time of call.

Also on sip you have options like RTP timers.

rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity
; on the audio channel
; when we’re not on hold. This is to be able to hangup
; a call in the case of a phone disappearing from the net,
; like a powerloss or grandma tripping over a cable.

rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity
; on the audio channel

hi there,

Sorry late response, i was on leave. yes i have worked with rtptimeout. but it will work only for SIP trunk right?

I have some PRI channels as well, and this issue is also happening there.

let me try absolutetimeout option.

Sohaib Khan