[Home]

Summary:ASTERISK-17888: [patch] In Manager Interface, SIP registry event does not show username on Status: Registered
Reporter:Stefan Gofferje (sgofferj)Labels:
Date Opened:2011-05-19 07:22:42Date Closed:2011-11-02 13:31:49
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:1.6.2.18 Frequency of
Occurrence
Related
Issues:
is the original version of this clone:ASTERISK-21201 [patch] In Manager Interface, SIP registry event does not show username on Status: Registered
Environment:Attachments:( 0) __20110519-Manager-SIP-Registry-Username.txt
Description:While other events like Status: Request sent do report the respective SIP username, the Status: Registered does NOT. This is bad if your asterisk is connecting to more than one account with the same provider.

Examples:

Event: Registry
Privilege: system,all
ChannelType: SIP
Username: xxxxxxx
Domain: sipgate.de
Status: Request Sent

Good, I know which account we are talking about.

Event: Registry
Privilege: system,all
ChannelType: SIP
Domain: sipgate.de
Status: Registered

Bad, I don't know which account we are talking about.
Comments:By: Leif Madsen (lmadsen) 2011-05-19 14:19:28

This patch is against trunk (as I believe this is technically a "new feature") but it will probably apply fine to 1.6.2 for you. Let me know if this works.

I didn't compile or test it myself.

By: Stefan Gofferje (sgofferj) 2011-05-26 04:40:35

Does not work against latest 1.6.2 SVN.

patching file channels/chan_sip.c
Hunk #1 FAILED at 20144.
1 out of 1 hunk FAILED -- saving rejects to file channels/chan_sip.c.rej
k-tanco:/usr/src/asterisk-1.6/asterisk # cat channels/chan_sip.c.rej
--- channels/chan_sip.c (revision 318193)
+++ channels/chan_sip.c (working copy)
@@ -20144,7 +20144,7 @@

               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) {
k-tanco:/usr/src/asterisk-1.6/asterisk #

By: Stefan Gofferje (sgofferj) 2011-05-26 04:43:03

I could do it by hand but I believe, this would be worth backporting?

By: Leif Madsen (lmadsen) 2011-11-02 13:31:49.462-0500

I can't seem to find WHEN this was fixed, but it was fixed a very long time ago.