Revision: 16763
Author: [email protected]
Date: Wed Feb  2 06:03:31 2011
Log: Update Issue 2297

Forgot to commit client
http://code.google.com/p/mobicents/source/detail?r=16763

Added:
/trunk/servers/sip-servlets/sip-servlets-client/src/javadoc/org/mobicents/javax/servlet/sip/dns /trunk/servers/sip-servlets/sip-servlets-client/src/javadoc/org/mobicents/javax/servlet/sip/dns/package.html /trunk/servers/sip-servlets/sip-servlets-client/src/main/java/org/mobicents/javax/servlet/sip/dns /trunk/servers/sip-servlets/sip-servlets-client/src/main/java/org/mobicents/javax/servlet/sip/dns/DNSResolver.java

=======================================
--- /dev/null
+++ /trunk/servers/sip-servlets/sip-servlets-client/src/javadoc/org/mobicents/javax/servlet/sip/dns/package.html Wed Feb 2 06:03:31 2011
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Package</title>
+</head>
+<body>
+JSR 289 Extensions not defined in the specification that can prove useful and might be proposed for inclusion in a next release of the SIP Servlets specification.
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/servers/sip-servlets/sip-servlets-client/src/main/java/org/mobicents/javax/servlet/sip/dns/DNSResolver.java Wed Feb 2 06:03:31 2011
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.mobicents.javax.servlet.sip.dns;
+
+import javax.servlet.sip.SipURI;
+import javax.servlet.sip.URI;
+
+/**
+ * Allows for an application to perform DNS queries to modify the SIP Message before it is sent out.<br/>
+ * To get the DNSResolver from your application just use
+ * <pre>
+ * DNSResolver dnsResolver = (DNSResolver) getServletContext().getAttribute("org.mobicents.servlet.sip.DNS_RESOLVER");
+ * </pre>
+ *
+ * @author [email protected]
+ *
+ */
+public interface DNSResolver {
+
+       /**
+ * <p>From the uri passed in parameter, try to find the corresponding SipURI. + * If the uri in parameter is already a SipURI without a user=phone param, it is just returned + * If the uri in parameter is a TelURL or SipURI with a user=phone param, the phone number is converted to a domain name
+        * then a corresponding NAPTR DNS lookup is done to find the SipURI</p>
+        *
+        * <p> Usage Example </p>
+        * <pre>
+ * DNSResolver dnsResolver = (DNSResolver) getServletContext().getAttribute("org.mobicents.servlet.sip.DNS_RESOLVER");
+        * try {
+        *              URI uri = sipFactory.createURI("tel:+358-555-1234567");
+        *              SipURI sipURI = dnsResolver.getSipURI(uri);
+        * } catch (ServletParseException e) {
+        *              logger.error("Impossible to create the tel URL", e);
+        * }
+        * </pre>
+        *
+        * @param uri the uri used to find the corresponding SipURI
+ * @return the SipURI found through ENUM methods or the uri itself if the uri is already a SipURI without a user=phone param
+        */
+       SipURI getSipURI(URI uri);
+}

Reply via email to