[Devel] [ openser-Feature Requests-1451511 ] lookup() enhancement

SourceForge.net noreply at sourceforge.net
Thu Mar 16 19:16:27 CET 2006


Feature Requests item #1451511, was opened at 2006-03-16 20:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1451511&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Dan (dan_pascu)
Assigned to: Nobody/Anonymous (nobody)
Summary: lookup() enhancement

Initial Comment:
It would be useful to filter what kind of contacts are
returned after lookup("location") is executed.
A REGISTER request can register different kinds of
contacts, not only SIP and those contacts cannot be
handled by t_relay(). For example snom phones register
http:// and https:// contacts with the SIP proxy.
When these contacts are passed to t_relay() errors
occur since they cannot be used to place a SIP call.
Different types of contacts may be useful for other
types of modules (for example presence).

The enhancement I suggest is to allow an extra optional
parameter to the lookup() function. If that is not
specified, lookup should return all contacts like it
does now.
However if that extra parameter is present it should
contain a regular expression match (or maybe a prefix
match) for the type of contact we want to use.
lookup() should use that regular expression to filter
out the complete list of registered contacts and only
pick up the types requested by the regexp match.
If the resulted list is not empty it should be returned
along with a status of success (True), else False
should be returned in the script.

example:

if (lookup("location")) {
   t_relay(); // t_relay() will get all contacts
}

if (lookup("location", "^sips?:")) {
   t_relay(); // t_relay() will only get sip contacts
}

if (lookup("location", "^https?:")) {
   my_fancy_presence_application();
}



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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1451511&group_id=139143



More information about the Devel mailing list