https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r284415 | tilghman | 2010-08-31 15:22:10 -0500 (Tue, 31 Aug 2010) | 21 lines
Merged revisions 284399 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r284399 | tilghman | 2010-08-31 15:18:32 -0500 (Tue, 31 Aug 2010) | 14 lines
Merged revisions 284393 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r284393 | tilghman | 2010-08-31 15:13:21 -0500 (Tue, 31 Aug 2010) | 7 lines
Don't send a devstate change on poke_noanswer if the state did not change.
(closes issue #17741)
Reported by: schmidts
Patches:
chan_sip.c.patch uploaded by schmidts (license 1077)
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284440
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
static int sip_poke_noanswer(const void *data)
{
struct sip_peer *peer = (struct sip_peer *)data;
-
+
peer->pokeexpire = -1;
if (peer->lastms > -1) {
peer->call = dialog_unref(peer->call, "unref dialog peer->call");
/* peer->call = sip_destroy(peer->call);*/
}
-
- peer->lastms = -1;
- ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
+
+ /* Don't send a devstate change if nothing changed. */
+ if (peer->lastms > -1) {
+ peer->lastms = -1;
+ ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
+ }
/* Try again quickly */
AST_SCHED_REPLACE_UNREF(peer->pokeexpire, sched,