]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Include the Username field in SIP Registry events when Status is registered
authorMatthew Jordan <mjordan@digium.com>
Tue, 12 Mar 2013 16:20:30 +0000 (16:20 +0000)
committerMatthew Jordan <mjordan@digium.com>
Tue, 12 Mar 2013 16:20:30 +0000 (16:20 +0000)
In ASTERISK-17888, the AMI Registry event during SIP registrations was supposed
to include the Username field. Somehow, one of the events was missed. This
patch corrects that - the Username field should be included in all AMI Registry
events involving SIP registrations.

(issue ASTERISK-17888)

(closes issue ASTERISK-21201)
Reported by: Dmitriy Serov
patches:
  chan_sip.c.diff uploaded by Dmitriy Serov (license 6479)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@382847 65c4cc65-6c06-0410-ace0-fbb531ad65f3

UPGRADE.txt
channels/chan_sip.c

index 4d6ab330ca54d47a90b150520b2052bdbf23f693..0cbbbf72ea3cda552270fa7c4e297f40ed22fff2 100644 (file)
@@ -25,6 +25,10 @@ from 1.8.21.0 to 1.8.22.0:
   if a denoiser is attached to the channel; this option gives them the ability
   to remove the denoiser without having to unload func_speex.
 
+* The Registry AMI event for SIP registrations will now always include the
+  Username field. A previous bug fix missed an instance where it was not
+  included; that has been corrected in this release.
+
 from 1.8.20.0 to 1.8.20.1:
 * Asterisk would previously not output certain error messages when a remote
   console attempted to connect to Asterisk and no instance of Asterisk was
index 2ac56a88e708a143c7644ffc61dc7d04c1f7ab30..0c655847ddab1dff3ef446c5666a2651c396e632 100644 (file)
@@ -21373,7 +21373,7 @@ static int handle_response_register(struct sip_pvt *p, int resp, const char *res
                
                r->regstate = REG_STATE_REGISTERED;
                r->regtime = ast_tvnow();               /* Reset time of last successful registration */
-               manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelType: SIP\r\nDomain: %s\r\nStatus: %s\r\n", r->hostname, regstate2str(r->regstate));
+               manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelType: SIP\r\nUsername: %s\r\nDomain: %s\r\nStatus: %s\r\n", r->username, r->hostname, regstate2str(r->regstate));
                r->regattempts = 0;
                ast_debug(1, "Registration successful\n");
                if (r->timeout > -1) {