Summary: | ASTERISK-14166: [patch] When lastms was added to realtime_update_peer in chan_sip the necessary ldap changes were not made | ||
Reporter: | John Covert (jcovert) | Labels: | |
Date Opened: | 2009-05-19 12:31:19 | Date Closed: | 2009-05-28 06:40:47 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_config_ldap |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk.ldap-schema.patch ( 1) asterisk.ldif.patch ( 2) res_ldap.conf.sample.patch | |
Description: | When lastms was added to realtime_update_peer in chan_sip the necessary ldap changes were not made In the process of fixing issue ASTERISK-13323, calls to realtime_update_peer were added to chan_sip to store 'lastms' (the number of milliseconds for the last qualify). This causes constant error messages: [May 19 11:56:01] ERROR[6670]: res_config_ldap.c:1292 update_ldap: Couldn't modify dn:uid=sipaccount009,ou=people,dc=company,dc=net because Undefined attribute type Whenever a new item is added to realtime, it is necessary to update the ldap definitions to support it. I propose making the following changes required to eliminate this error: 1. Modify contrib/scripts/asterisk.ldap-schema as follows: a. update version number and list this bug number in the changes. b. Add objectIdentifier AstAccountLastQualifyMilliseconds AstAttrType:49 c. Add attributetype ( AstAccountLastQualifyMilliseconds NAME 'AstAccountLastQualifyMilliseconds' DESC 'Asterisk Account Last Qualify Milliseconds' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15) d. Add AstAccountLastQualifyMilliseconds to objectclass AsteriskSIPUser and for completeness to objectclass AsteriskIAXUser even though not yet used. 2. Modify configs/res_ldap.conf.sample to include lastms = AstAccountLastQualifyMilliseconds in the Sip Users Table 3. Modify SOMETHING, somewhere (chan_sip.c if no one suggests a better place, or maybe in more than one place) to refer future developers to the need to update these two files whenever adding new realtime updates. I expect to submit patches within the next two or three days once I have actually tested this; I cannot do this while production is running today. Regards/john | ||
Comments: | By: John Covert (jcovert) 2009-05-20 10:33:29 Patches have now been uploaded. asterisk.ldap-schema is tested and running in production. identical lines added to res_ldap.conf production version and diffed (and the changed line doesn't show in the diff). asterisk.ldif carefully inspected. Note: version 3.1.6 of the ldif was missing the following three attribute definitions that were in version 3.1.6 of the ldap-schema: olcAttributeTypes: AstAccountIPAddress, AstAccountDefaultUser, AstAccountRegistrationServer. They appeared in all places other than the olcAttributeTypes section. Version 3.1.7 of both files are now in synch. /john By: Gavin Henry (suretec) 2009-05-20 15:00:43 Thanks John. We're due to add another attribute for another bug anyway and will check this out. Can you tell us a bit about your "production" setup? Which Directory, volume etc. Maybe best off this ticket? I guess we've become the official maintainers for res_config_ldap now... By: Gavin Henry (suretec) 2009-05-20 16:16:19 I presume this would be also put in 1.6.1.x ? What is the difference between these branches from a code/dev pov? By: John Covert (jcovert) 2009-05-20 18:03:01 Based on the diffs below, I think these changes should be committed all the way forward. $ diff 1.6.0-res_ldap.conf.sample trunk-res_ldap.conf.sample $ diff 1.6.0-res_ldap.conf.sample 1.6.1-res_ldap.conf.sample $ diff 1.6.0-res_ldap.conf.sample 1.6.2-res_ldap.conf.sample $ diff 1.6.0-asterisk.ldif trunk-asterisk.ldif $ diff 1.6.0-asterisk.ldif 1.6.1-asterisk.ldif $ diff 1.6.0-asterisk.ldif 1.6.2-asterisk.ldif $ diff 1.6.0-asterisk.ldap-schema trunk-asterisk.ldap-schema $ diff 1.6.0-asterisk.ldap-schema 1.6.1-asterisk.ldap-schema $ diff 1.6.0-asterisk.ldap-schema 1.6.2-asterisk.ldap-schema Give me a call and we can talk about ldap and Asterisk. /john By: Gavin Henry (suretec) 2009-05-22 09:47:58 Just a quick one to say I've asked for svn access and will either commit the changes or upload a new schema depending on the result of the question. Thanks. By: Gavin Henry (suretec) 2009-05-25 03:59:38 My svn access has been approved, so will commit when the account is ready. Thanks. By: Digium Subversion (svnbot) 2009-05-28 05:43:52 Repository: asterisk Revision: 197406 U trunk/configs/res_ldap.conf.sample U trunk/contrib/scripts/asterisk.ldap-schema U trunk/contrib/scripts/asterisk.ldif U trunk/doc/ldap.txt ------------------------------------------------------------------------ r197406 | ghenry | 2009-05-28 05:43:52 -0500 (Thu, 28 May 2009) | 1 line closes issue ASTERISK-14166 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=197406 By: Digium Subversion (svnbot) 2009-05-28 06:40:17 Repository: asterisk Revision: 197439 U branches/1.6.0/configs/res_ldap.conf.sample U branches/1.6.0/contrib/scripts/asterisk.ldap-schema U branches/1.6.0/contrib/scripts/asterisk.ldif U branches/1.6.0/doc/ldap.txt ------------------------------------------------------------------------ r197439 | ghenry | 2009-05-28 06:40:15 -0500 (Thu, 28 May 2009) | 1 line issue ASTERISK-14165 and issue ASTERISK-14166 from trunk ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=197439 By: Digium Subversion (svnbot) 2009-05-28 06:40:32 Repository: asterisk Revision: 197440 U branches/1.6.1/configs/res_ldap.conf.sample U branches/1.6.1/contrib/scripts/asterisk.ldap-schema U branches/1.6.1/contrib/scripts/asterisk.ldif U branches/1.6.1/doc/ldap.txt ------------------------------------------------------------------------ r197440 | ghenry | 2009-05-28 06:40:31 -0500 (Thu, 28 May 2009) | 1 line issue ASTERISK-14165 and issue ASTERISK-14166 from trunk ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=197440 By: Digium Subversion (svnbot) 2009-05-28 06:40:47 Repository: asterisk Revision: 197441 U branches/1.6.2/configs/res_ldap.conf.sample U branches/1.6.2/contrib/scripts/asterisk.ldap-schema U branches/1.6.2/contrib/scripts/asterisk.ldif U branches/1.6.2/doc/ldap.txt ------------------------------------------------------------------------ r197441 | ghenry | 2009-05-28 06:40:44 -0500 (Thu, 28 May 2009) | 1 line issue ASTERISK-14165 and issue ASTERISK-14166 from trunk ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=197441 |