[asterisk-bugs] [Asterisk 0015895]: When useragent was added to realtime_update_peer in chan_sip the necessary ldap changes were not made
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Sep 15 10:34:32 CDT 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15895
======================================================================
Reported By: jcovert
Assigned To: suretec
======================================================================
Project: Asterisk
Issue ID: 15895
Category: Resources/res_config_ldap
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: 1.6.1.6
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-09-14 18:39 CDT
Last Modified: 2009-09-15 10:34 CDT
======================================================================
Summary: When useragent was added to realtime_update_peer in
chan_sip the necessary ldap changes were not made
Description:
When useragent was added to realtime_update_peer in chan_sip the necessary
ldap changes were not made
The call to realtime_update_peer was modified in chan_sip to store
'useragent' This causes constant error messages:
[Sep 14 14:34:27] ERROR[30323]: res_config_ldap.c:1286 update_ldap:
Couldn't modify dn:uid=johncovert.test,ou=people,dc=onstate,dc=net because
Undefined attribute type
This problem last happened when "lastms" was added. See issue
https://issues.asterisk.org/view.php?id=15156.
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 AstAccountUserAgent AstAttrType:59
c. Add
attributetype ( AstAccountUserAgent
NAME 'AstAccountUserAgent'
DESC 'Ast Account User Agent'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
d. Add AstAccountUserAgent to objectclass AsteriskSIPUser and for
completeness to objectclass AsteriskIAXUser even though not yet used.
2. Modify configs/res_ldap.conf.sample to include
useragent = AstAccountUserAgent
in the Sip Users Table
3. This time also modify chan_sip.c 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
======================================================================
----------------------------------------------------------------------
(0110661) jcovert (reporter) - 2009-09-15 10:34
https://issues.asterisk.org/view.php?id=15895#c110661
----------------------------------------------------------------------
Alright. I'm uploading my patches just for your reference. Note that you
don't have to change LDAP_MOD_REPLACE to LDAP_MOD_DELETE. The
documentation says it does it if the pointer is null.
You might look at my patches and be sure you got everything I did,
especially the multi-valued area.
I'm not uploading the schema.
chan_sip.c.patch -- this is against 1.6.1.6 -- it's just a comment that I
think is important to put into chan_sip so that we don't have further
regressions. When the update fails, LDAP registered clients stop working
for outgoing calls.
res_ldap.conf.sample.patch -- this is against trunk. we need the mapping
from useragent to AstAccountUserAgent.
res_config_ldap.c.patch -- this is against 1.6.1.6. Please be sure you at
least fix the (sizeof(char), 2) -> (sizeof(char **), 1) at the first
occurence, and I see that at the second you have ast_calloc(sizeof(char *),
2), which will work, but should really only be one of them, and technically
should be sizeof(char **) even though in any normal architecture they'll be
the same.
/john
Issue History
Date Modified Username Field Change
======================================================================
2009-09-15 10:34 jcovert Note Added: 0110661
======================================================================
More information about the asterisk-bugs
mailing list