[Home]

Summary:ASTERISK-11407: add address to some PeerStatus events, and add some PeerStatus Rejected events to chan_sip.c
Reporter:Mostyn Bramley-Moore (mostyn)Labels:
Date Opened:2008-02-08 20:41:47.000-0600Date Closed:2008-03-18 10:51:00
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) peerstatus.patch
( 1) peerstatus2.patch
( 2) peerstatus3.patch
Description:This small patch to chan_sip.c adds the address to PeerStatus: Registered events,
and adds PeerStatus: Rejected events which are triggered when a sip clients' authentication fails.  
Comments:By: Olle Johansson (oej) 2008-02-14 08:02:18.000-0600

One issue I have is that you will get a flood of manager events, since the client usually keeps trying forever. You want to send ONE event per client and a period, or maybe a call-id or something.
You also need to add port number, since IP address isn't always unique for the client.

By: Mostyn Bramley-Moore (mostyn) 2008-02-14 22:28:20.000-0600

The second patch (replaces the first patch) adds the port to PeerStatus events that also have an address property, so you can identify multiple sip clients at the same address.  

My motivation for this patch is so that manager processes can recognise registration failure floods, in which case I'm not sure if it's wise to rate-limit the generation of these events.  Is there an easy way to filter out these events if the manager isn't interested in registration failures?  I could rename these to PeerRegistration or similar, but that will require changing PeerStatus: Registered events.

By: Olle Johansson (oej) 2008-02-15 01:24:17.000-0600

We could add a new config option in sip.conf for "ami-auth-failures" or something like that. I think it would be interesting to have events for invite and subscribe auth failures too.

By: Mostyn Bramley-Moore (mostyn) 2008-02-16 08:07:11.000-0600

The third version of this patch adds authfailureevents setting to the general section of sip.conf, and only sends PeerStatus: Rejected events if this setting is enabled.

By: Digium Subversion (svnbot) 2008-03-18 02:19:40

Repository: asterisk
Revision: 109316

U   trunk/CHANGES
U   trunk/channels/chan_sip.c
U   trunk/configs/sip.conf.sample

------------------------------------------------------------------------
r109316 | oej | 2008-03-18 02:19:39 -0500 (Tue, 18 Mar 2008) | 7 lines

Add manager peerstatus events when peer can't authenticate.

(closes issue ASTERISK-11407)
Reported by: mostyn
Patches:
     peerstatus3.patch uploaded by mostyn (license 398)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=109316

By: Digium Subversion (svnbot) 2008-03-18 10:51:00

Repository: asterisk
Revision: 109457

_U  branches/1.6.0/

------------------------------------------------------------------------
r109457 | russell | 2008-03-18 10:50:59 -0500 (Tue, 18 Mar 2008) | 14 lines

Blocked revisions 109316 via svnmerge

........
r109316 | oej | 2008-03-18 02:23:45 -0500 (Tue, 18 Mar 2008) | 7 lines

Add manager peerstatus events when peer can't authenticate.

(closes issue ASTERISK-11407)
Reported by: mostyn
Patches:
     peerstatus3.patch uploaded by mostyn (license 398)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=109457