mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 07:18:15 +00:00
SIP session timeout AMI event
Add an AMI event in the Call category that is issued when a call is terminated due to either RTP stream inactivity or SIP session timer expiration. Event description: Event: SessionTimeout Source: source Channel: channel-name Uniqueid: channel-unique-id `source` can be either RTPTimeout or SIPSessionTimer (closes issue ASTERISK-16467) Patch-by: Kirill Katsnelson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -52,6 +52,9 @@ SIP
|
|||||||
===
|
===
|
||||||
- A new option "tonezone" for setting default tonezone for the channel driver
|
- A new option "tonezone" for setting default tonezone for the channel driver
|
||||||
or individual devices
|
or individual devices
|
||||||
|
- A new manager event, "SessionTimeout" has been added and is triggered when
|
||||||
|
a call is terminated due to RTP stream inactivity or SIP session timer
|
||||||
|
expiration.
|
||||||
|
|
||||||
users.conf:
|
users.conf:
|
||||||
- A defined user with hasvoicemail=yes now finally uses a Gosub to stdexten
|
- A defined user with hasvoicemail=yes now finally uses a Gosub to stdexten
|
||||||
|
|||||||
@@ -26395,6 +26395,8 @@ static int check_rtp_timeout(struct sip_pvt *dialog, time_t t)
|
|||||||
}
|
}
|
||||||
ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n",
|
ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n",
|
||||||
ast_channel_name(dialog->owner), (long) (t - dialog->lastrtprx));
|
ast_channel_name(dialog->owner), (long) (t - dialog->lastrtprx));
|
||||||
|
manager_event(EVENT_FLAG_CALL, "SessionTimeout", "Source: RTPTimeout\r\n"
|
||||||
|
"Channel: %s\r\nUniqueid: %s\r\n", ast_channel_name(dialog->owner), dialog->owner->uniqueid);
|
||||||
/* Issue a softhangup */
|
/* Issue a softhangup */
|
||||||
ast_softhangup_nolock(dialog->owner, AST_SOFTHANGUP_DEV);
|
ast_softhangup_nolock(dialog->owner, AST_SOFTHANGUP_DEV);
|
||||||
ast_channel_unlock(dialog->owner);
|
ast_channel_unlock(dialog->owner);
|
||||||
@@ -26647,6 +26649,8 @@ static int proc_session_timer(const void *vp)
|
|||||||
sip_pvt_lock(p);
|
sip_pvt_lock(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
manager_event(EVENT_FLAG_CALL, "SessionTimeout", "Source: SIPSessionTimer\r\n"
|
||||||
|
"Channel: %s\r\nUniqueid: %s\r\n", ast_channel_name(p->owner), p->owner->uniqueid);
|
||||||
ast_softhangup_nolock(p->owner, AST_SOFTHANGUP_DEV);
|
ast_softhangup_nolock(p->owner, AST_SOFTHANGUP_DEV);
|
||||||
ast_channel_unlock(p->owner);
|
ast_channel_unlock(p->owner);
|
||||||
sip_pvt_unlock(p);
|
sip_pvt_unlock(p);
|
||||||
|
|||||||
Reference in New Issue
Block a user