/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* Portions of this software are based upon public domain software
* originally written at the National Center for Supercomputing Applications,
* University of Illinois, Urbana-Champaign.
*/
package it.unica.net.jvoip.sip;
import it.unica.net.jvoip.common.Console;
import it.unica.net.jvoip.common.NetworkAddressManager;
import it.unica.net.jvoip.common.Utils;
import it.unica.net.jvoip.sip.event.CallEvent;
import it.unica.net.jvoip.sip.event.CallRejectedEvent;
import it.unica.net.jvoip.sip.event.CommunicationsErrorEvent;
import it.unica.net.jvoip.sip.event.ICommunicationsListener;
import it.unica.net.jvoip.sip.event.MessageEvent;
import it.unica.net.jvoip.sip.event.RegistrationEvent;
import it.unica.net.jvoip.sip.event.UnknownMessageEvent;
import it.unica.net.jvoip.sip.security.ISecurityAuthority;
import it.unica.net.jvoip.sip.security.SipSecurityManager;
import it.unica.net.jvoip.sip.security.UserCredentials;
import it.unica.net.jvoip.sip.simple.ContactGroup;
import it.unica.net.jvoip.sip.simple.ContactListController;
import it.unica.net.jvoip.sip.simple.MessageProcessing;
import it.unica.net.jvoip.sip.simple.PresenceAgent;
import it.unica.net.jvoip.sip.simple.PresenceStatusManager;
import it.unica.net.jvoip.sip.simple.PresenceTuple;
import it.unica.net.jvoip.sip.simple.ISubscriptionAuthority;
import it.unica.net.jvoip.sip.simple.Watcher;
import it.unica.net.jvoip.sip.simple.event.IStatusListener;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.TooManyListenersException;
import javax.sip.ClientTransaction;
import javax.sip.Dialog;
import javax.sip.InvalidArgumentException;
import javax.sip.ListeningPoint;
import javax.sip.ObjectInUseException;
import javax.sip.PeerUnavailableException;
import javax.sip.RequestEvent;
import javax.sip.ResponseEvent;
import javax.sip.ServerTransaction;
import javax.sip.SipException;
import javax.sip.SipFactory;
import javax.sip.SipListener;
import javax.sip.SipProvider;
import javax.sip.SipStack;
import javax.sip.TimeoutEvent;
import javax.sip.Transaction;
import javax.sip.TransactionAlreadyExistsException;
import javax.sip.TransactionUnavailableException;
import javax.sip.TransportNotSupportedException;
import javax.sip.address.Address;
import javax.sip.address.AddressFactory;
import javax.sip.address.SipURI;
import javax.sip.header.CSeqHeader;
import javax.sip.header.ContactHeader;
import javax.sip.header.FromHeader;
import javax.sip.header.HeaderFactory;
import javax.sip.header.MaxForwardsHeader;
import javax.sip.header.SubscriptionStateHeader;
import javax.sip.header.ToHeader;
import javax.sip.header.ViaHeader;
import javax.sip.message.Message;
import javax.sip.message.MessageFactory;
import javax.sip.message.Request;
import javax.sip.message.Response;
/**
* The SipManager provides wrapping of the underlying stack's functionalities.
* It also implements the SipListener interface and handles incoming
* SIP messages.
*
* @author Emil Ivov
* @version 1.0
*/
public class SipManager
implements SipListener
{
/**
* Specifies the number of retries that should be attempted when deleting
* a sipProvider
*/
protected static final int RETRY_OBJECT_DELETES = 10;
/**
* Specifies the time to wait before retrying delete of a sipProvider.
*/
protected static final long RETRY_OBJECT_DELETES_AFTER = 500;
protected static final Console console = Console.getConsole(SipManager.class);
protected static final String DEFAULT_TRANSPORT = "udp";
//jain-sip objects - package accessibility as they should be
//available for XxxProcessing classes
/**
* The SipFactory instance used to create the SipStack and the Address
* Message and Header Factories.
*/
public SipFactory sipFactory;
/**
* The AddressFactory used to create URLs ans Address objects.
*/
public AddressFactory addressFactory;
/**
* The HeaderFactory used to create SIP message headers.
*/
public HeaderFactory headerFactory;
/**
* The Message Factory used to create SIP messages.
*/
public MessageFactory messageFactory;
/**
* The sipStack instance that handles SIP communications.
*/
SipStack sipStack;
/**
* The default (and currently the only) SIP listening point of the
* application.
*/
ListeningPoint listeningPoint;
/**
* The JAIN SIP SipProvider instance.
*/
public SipProvider sipProvider;
/**
* An instance used to provide user credentials
*/
private ISecurityAuthority securityAuthority = null;
/**
* The field is queried when user authorization is needed.
*/
private ISubscriptionAuthority subscriptionAuthority = null;
/**
* Used for the contact header to provide firewall support.
*/
private InetSocketAddress publicIpAddress = null;
//properties
protected String sipStackPath = null;
protected String currentlyUsedURI = null;
protected String displayName = null;
protected String transpo
没有合适的资源?快使用搜索试试~ 我知道了~
VoIP 网络电话源码 java
共878个文件
java:252个
class:171个
png:63个
4星 · 超过85%的资源 需积分: 49 482 下载量 10 浏览量
2012-03-26
12:48:20
上传
评论 14
收藏 5.85MB RAR 举报
温馨提示
本代码包含基本的VoIP 技术实现的代码和技巧
资源推荐
资源详情
资源评论
收起资源包目录
VoIP 网络电话源码 java (878个子文件)
SipManager.class 36KB
CallProcessing.class 23KB
PresenceAgent.class 16KB
jVoIP.class 16KB
Watcher.class 15KB
RegisterProcessing.class 12KB
XmlPresenceInformationFactory.class 12KB
MediaManager.class 11KB
AuthenticationSplash.class 10KB
ContactListController.class 10KB
PropertiesDepot.class 10KB
SipSecurityManager.class 9KB
MessageProcessing.class 9KB
XMLUtils.class 8KB
ContactListSerializer.class 8KB
ContactListFrame.class 8KB
SubscriptionAuthorizationDialog.class 8KB
AddressSelectionPage.class 8KB
Console.class 8KB
IdentityPage.class 7KB
ServerInformationPage.class 7KB
PresenceStatusManager.class 7KB
ConfigurationPropertyPanel.class 7KB
NewContactDialog.class 6KB
SimpleContactList.class 6KB
WizardDialog.class 6KB
MediaDetectionPage.class 6KB
AVReceiver.class 6KB
Configuration.class 6KB
SetupWizard.class 6KB
SummaryPage.class 6KB
Call.class 5KB
NetworkAddressManager.class 5KB
Subscription.class 5KB
ConsoleUI.class 5KB
InfoFrame.class 5KB
ContactListModel.class 4KB
AVReceiver$SessionLabel.class 4KB
AVTransmitter$StateListener.class 4KB
PhoneFrame.class 4KB
NetworkAddressSelector.class 4KB
InterlocutorsTableModel.class 4KB
ConfigurationTreeUI.class 4KB
Timer.class 4KB
PresenceTuple.class 4KB
ConfigurationPanel.class 4KB
PresenceStatusControllerUIModel.class 4KB
GuiManager.class 4KB
GenericURI.class 4KB
SipCommunicatorColorTheme.class 4KB
MessageDigestAlgorithm.class 4KB
AVTransmitter.class 4KB
ContactGroup.class 4KB
SipCommHop.class 4KB
CallDispatcher.class 4KB
JMFInit.class 3KB
SipCommRouter.class 3KB
ContactListPopupMenu.class 3KB
ContactListController$DummyEventGenerationDialog.class 3KB
Interlocutor.class 3KB
ContactListController$SubscriberThread.class 3KB
WelcomePage.class 3KB
ContactsComboBoxModel.class 3KB
Contact.class 3KB
PresenceStatusController.class 3KB
JMFRegistry.class 3KB
ContactListActions.class 2KB
Scheduler.class 2KB
TaskQueue.class 2KB
ContactListActions$AddContactAction.class 2KB
PropertiesTableModel.class 2KB
MessageEvent.class 2KB
NetworkInterfaceTreeNode.class 2KB
MenuBar.class 2KB
AlertManager.class 2KB
ContactListActions$RemoveContactAction.class 2KB
Utils.class 2KB
TimerThread.class 2KB
ConfigurationPropertyPanel$ChangesListener.class 2KB
Property.class 2KB
RegisterProcessing$ReRegisterTask.class 2KB
WizardPropertySet.class 2KB
ConfiguraionTree.class 2KB
NetworkAddressSelector$TsListener.class 2KB
ConfigurationTreeUI$1.class 2KB
Test.class 2KB
PresenceStatusManager$ListNotificationThread.class 2KB
NetworkAddressSelector$TRenderer.class 2KB
ContactListFrame$FrameSizeSaver.class 1KB
NotificationReceivedEvent.class 1KB
ConfigFrame.class 1KB
PhoneFrame$ChangeConfListener.class 1KB
ContactsTree.class 1KB
ContactAdditionRequest.class 1KB
AuthenticationSplash$FocusTraversalPol.class 1KB
ConfigNode.class 1KB
ContactUri.class 1KB
TransferProcessing.class 1KB
SubscriptionAuthorizationDialog$1.class 1KB
Test$Task.class 1KB
共 878 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
mardan0126
- 粉丝: 5
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页