Revision: b7c721da8f0e
Author: dmisol <[email protected]>
Date: Wed Sep 4 15:12:34 2013 UTC
Log: still coding
http://code.google.com/p/isup2sip/source/detail?r=b7c721da8f0e
Added:
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/MgcpManagementSbb.java
/core/slee/services-du/src/main/resources/services/managementService.xml
Modified:
/core/domain/pom.xml
/core/domain/src/main/java/org/mobicents/isup2sip/management/Channel.java
/core/domain/src/main/java/org/mobicents/isup2sip/management/CicManagement.java
/core/domain/src/main/java/org/mobicents/isup2sip/management/Isup2SipManagement.java
/core/domain/src/main/java/org/mobicents/isup2sip/management/Isup2SipPropertiesManagement.java
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/CauseCodeMapping.java
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/CodingShemes.java
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/Isup2SipSbb.java
/core/slee/sbbs/src/main/resources/META-INF/sbb-jar.xml
=======================================
--- /dev/null
+++
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/MgcpManagementSbb.java
Wed Sep 4 15:12:34 2013 UTC
@@ -0,0 +1,171 @@
+/**
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.isup2sip.sbb;
+
+import jain.protocol.ip.mgcp.JainMgcpCommandEvent;
+import jain.protocol.ip.mgcp.JainMgcpEvent;
+import jain.protocol.ip.mgcp.JainMgcpResponseEvent;
+import jain.protocol.ip.mgcp.message.RestartInProgress;
+import jain.protocol.ip.mgcp.message.RestartInProgressResponse;
+import jain.protocol.ip.mgcp.message.parms.EndpointIdentifier;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.slee.ActivityContextInterface;
+import javax.slee.FactoryException;
+import javax.slee.RolledBackContext;
+import javax.slee.SbbContext;
+import javax.slee.SbbLocalObject;
+import javax.slee.UnrecognizedActivityException;
+import javax.slee.facilities.Tracer;
+import javax.slee.serviceactivity.ServiceStartedEvent;
+
+import net.java.slee.resource.mgcp.event.TransactionTimeout;
+
+import org.mobicents.isup2sip.management.CicManagement;
+import org.mobicents.isup2sip.management.Isup2SipManagement;
+import org.mobicents.isup2sip.management.Isup2SipPropertiesManagement;
+
+/**
+ * @author dmitri soloviev
+ *
+ */
+public abstract class MgcpManagementSbb implements javax.slee.Sbb {
+ private SbbContext sbbContext;
+ private static Tracer tracer;
+
+ private static final Isup2SipPropertiesManagement
isup2SipPropertiesManagement =
+ Isup2SipPropertiesManagement.getInstance();
+
+ private final CicManagement cicManagement =
isup2SipPropertiesManagement.getCicManagement();
+
+
+
+
+ public void onRestartInProgressResponse(RestartInProgressResponse event,
ActivityContextInterface aci) {
+ tracer.info("RSIP RESP " + event);
+/*
+ final EndpointIdentifier endpointID =
event.getEndpointIdentifier();
+ final int cic = this.getCic(endpointID);
+
+ if(cic == -1) {
+ tracer.severe("invalid endpoint id " + endpointID);
+ aci.detach(sbbContext.getSbbLocalObject());
+ return;
+ }
+
+ if(cicManagement.isActive(cic)){
+ tracer.severe("need to skip this event (TODO!!!), to make it processed
by call control SBB");
+ return;
+ }
+
+ cicManagement.setIdle(cic);
+*/
+ aci.detach(sbbContext.getSbbLocalObject());
+ }
+
+ public void onMgcpTIMEOUT(TransactionTimeout event,
ActivityContextInterface aci){
+ tracer.severe("Mgcp Timeout" + event);
+
+ final JainMgcpCommandEvent mgcpEvent =
event.getJainMgcpCommandEvent();
+ final EndpointIdentifier endpointID =
mgcpEvent.getEndpointIdentifier();
+ final int cic = this.getCic(endpointID);
+
+ if(cic == -1) {
+ tracer.severe("invalid endpoint id " + endpointID);
+ aci.detach(sbbContext.getSbbLocalObject());
+ return;
+ }
+
+ if(cicManagement.isActive(cic)){
+ tracer.severe("need to skip this event (TODO!!!), to make it processed
by call control SBB");
+ return;
+ }
+
+ if(mgcpEvent instanceof RestartInProgress){
+ tracer.severe("endpoint state is UNKNOWN");
+ cicManagement.setUnknown(cic);
+ }
+ }
+
+ public void onServiceStartedEvent(ServiceStartedEvent event,
ActivityContextInterface aci){
+ tracer.severe("onServiceStartedEvent()" + event);
+ try {
+ final Context ctx = (Context) new
InitialContext().lookup(Isup2SipManagement.CONTEXT);
+ final SbbLocalObject sbbLocalObject =
sbbContext.getSbbLocalObject();
+ cicManagement.resetChannels(this, ctx, sbbLocalObject);
+ } catch(Exception e) {
+ tracer.severe("Exception e " + e.getMessage());
+ }
+
+ }
+
+ public void setSbbContext(SbbContext context) {
+ this.sbbContext = context;
+ if (tracer == null) {
+ tracer = sbbContext.getTracer(MgcpManagementSbb.class
+ .getSimpleName());
+ }
+ }
+
+ public void unsetSbbContext() {
+ this.sbbContext = null;
+
+ }
+
+ public void sbbCreate() throws javax.slee.CreateException {
+ }
+
+ public void sbbPostCreate() throws javax.slee.CreateException {
+ }
+
+ public void sbbActivate() {
+ }
+
+ public void sbbPassivate() {
+ }
+
+ public void sbbRemove() {
+ }
+
+ public void sbbLoad() {
+ }
+
+ public void sbbStore() {
+ }
+
+ public void sbbExceptionThrown(Exception exception, Object event,
+ ActivityContextInterface activity) {
+ }
+
+ public void sbbRolledBack(RolledBackContext context) {
+ }
+
+ private int getCic(EndpointIdentifier epId){
+ String epStr = epId.toString();
+ int pos = epStr.indexOf("@");
+ if(pos == -1) return pos;
+ return Integer.parseInt(epStr.substring(0, pos), 16);
+ }
+}
=======================================
--- /dev/null
+++
/core/slee/services-du/src/main/resources/services/managementService.xml
Wed Sep 4 15:12:34 2013 UTC
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE service-xml PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JAIN SLEE Service 1.1//EN"
+ "http://java.sun.com/dtd/slee-service-xml_1_1.dtd">
+<service-xml>
+ <service>
+ <service-name>MgcpManagementService</service-name>
+ <service-vendor>org.mobicents</service-vendor>
+ <service-version>1.0</service-version>
+ <root-sbb>
+ <sbb-name>MgcpManagementSbb</sbb-name>
+ <sbb-vendor>org.mobicents</sbb-vendor>
+ <sbb-version>1.0</sbb-version>
+ </root-sbb>
+ <default-priority>10</default-priority>
+ </service>
+</service-xml>
=======================================
--- /core/domain/pom.xml Sun Aug 4 00:08:46 2013 UTC
+++ /core/domain/pom.xml Wed Sep 4 15:12:34 2013 UTC
@@ -15,6 +15,20 @@
<name>Core : Domain</name>
<dependencies>
+
+ <!-- needed to fire RSIP -->
+ <dependency>
+ <groupId>org.mobicents.servers.jainslee.api</groupId>
+ <artifactId>jain-slee-11-ext</artifactId>
+ <version>${mobicents.core.ext.version}</version>
+ </dependency>
+ <dependency>
+ <artifactId>mgcp-ratype</artifactId>
+ <groupId>org.mobicents.resources</groupId>
+ <version>${mobicents.resources.mgcp.version}</version>
+ </dependency>
+ <!-- up to this -->
+
<dependency>
<artifactId>shell-server-api</artifactId>
<groupId>org.mobicents.protocols.ss7.management</groupId>
=======================================
---
/core/domain/src/main/java/org/mobicents/isup2sip/management/Channel.java
Sat Aug 3 10:50:58 2013 UTC
+++
/core/domain/src/main/java/org/mobicents/isup2sip/management/Channel.java
Wed Sep 4 15:12:34 2013 UTC
@@ -1,5 +1,30 @@
-package org.mobicents.isup2sip.management;
+/**
+ * TeleStax, Open Source Cloud Communications
+ * Copyright 2012, Telestax Inc 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.isup2sip.management;
+/**
+ * @author dmitri soloviev
+ *
+ */
public class Channel{
public enum State {
UNKNOWN,
=======================================
---
/core/domain/src/main/java/org/mobicents/isup2sip/management/CicManagement.java
Tue Sep 3 23:15:26 2013 UTC
+++
/core/domain/src/main/java/org/mobicents/isup2sip/management/CicManagement.java
Wed Sep 4 15:12:34 2013 UTC
@@ -1,10 +1,58 @@
+/**
+ * TeleStax, Open Source Cloud Communications
+ * Copyright 2012, Telestax Inc 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.isup2sip.management;
+/**
+ * @author dmitri soloviev
+ *
+ */
+
+import jain.protocol.ip.mgcp.JainMgcpEvent;
+import jain.protocol.ip.mgcp.message.RestartInProgress;
+import jain.protocol.ip.mgcp.message.parms.CallIdentifier;
+import jain.protocol.ip.mgcp.message.parms.ConflictingParameterException;
+import jain.protocol.ip.mgcp.message.parms.ConnectionDescriptor;
+import jain.protocol.ip.mgcp.message.parms.ConnectionIdentifier;
+import jain.protocol.ip.mgcp.message.parms.ConnectionMode;
+import jain.protocol.ip.mgcp.message.parms.EndpointIdentifier;
+import jain.protocol.ip.mgcp.message.parms.RestartMethod;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import java.util.Iterator;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import javax.slee.ActivityContextInterface;
+import javax.slee.SbbLocalObject;
+
+import net.java.slee.resource.mgcp.JainMgcpProvider;
+import net.java.slee.resource.mgcp.MgcpActivityContextInterfaceFactory;
+import net.java.slee.resource.mgcp.MgcpConnectionActivity;
+import net.java.slee.resource.mgcp.event.TransactionTimeout;
+
import org.mobicents.isup2sip.management.Channel.State;
public class CicManagement {
@@ -29,7 +77,7 @@
channelByCic.put(cic, ch);
// TODO: in fact, need to reset circuits
- ch.setState(State.IDLE);
+ //ch.setState(State.IDLE);
logger.warning("created channel " + ch +
" cic=" + cic + ": " + ch.getCic() +
"|" +
@@ -37,24 +85,17 @@
}
}
- public Channel getIdleChannel() {
+ public Channel allocateIdleChannel() {
synchronized(synchCic) {
- Iterator <Channel> i = null; i =
channelByCic.values().iterator();
- while(i.hasNext()){
- Channel ch = i.next();
- logger.warning("trying "+ ch + ":" + ch.getCic() + " state=" +
ch.getState());
- if(ch.getState() == State.IDLE) {
-
- logger.warning("allocating cic=" + ch.getCic() + " ep=" +
ch.getEndpointId());
-
ch.setState(State.OUTGO);
- return ch; }
- else logger.warning("skipping cic=" + ch.getCic() + " ep=" +
ch.getEndpointId());
- }
-
- return null;
+ Channel ch = getNeededState(State.IDLE);
+ if(ch == null) return null;
+
+ logger.info("allocating cic=" + ch.getCic() + " ep=" +
ch.getEndpointId());
+ ch.setState(State.OUTGO);
+ return ch;
}
}
-
+
public Channel getChannelByCic(int cic) {
return channelByCic.get(cic);
}
@@ -100,4 +141,76 @@
}
}
}
+
+ public boolean isActive(int cic){
+ Channel.State state = channelByCic.get(cic).getState();
+ if(state.equals(Channel.State.ANSWERED)) return true;
+ if(state.equals(Channel.State.INCO)) return true;
+ if(state.equals(Channel.State.OUTGO)) return true;
+ return false;
+ }
+
+ public void resetChannels(Object obj, Context ctx, SbbLocalObject
sbbLocalObject){
+ logger.info("resetting channels");
+/*
+ // MGCP
+ JainMgcpProvider mgcpProvider = null;
+ MgcpActivityContextInterfaceFactory mgcpActivityContestInterfaceFactory
= null;
+ try{
+ mgcpProvider = (JainMgcpProvider)
ctx.lookup(Isup2SipManagement.MGCP_PROVIDER);
+ mgcpActivityContestInterfaceFactory =
(MgcpActivityContextInterfaceFactory)
ctx.lookup(Isup2SipManagement.MGCP_ACI_FACTORY);
+ } catch (Exception e) {
+ logger.severe("exception " + e.getMessage());
+ return;
+ }
+
+ // ISUP
+
+// isupProvider = (RAISUPProvider)
ctx.lookup("slee/resources/isup/1.0/provider");
+// isupMessageFactory = isupProvider.getMessageFactory();
+// isupParameterFactory = isupProvider.getParameterFactory();
+// isupActivityContextInterfaceFactory =
(org.mobicents.slee.resources.ss7.isup.ratype.ActivityContextInterfaceFactory)
ctx.lookup("slee/resources/isup/1.0/acifactory");
+*/
+ synchronized(synchCic) {
+ Iterator <Channel> i = null; i =
channelByCic.values().iterator();
+ while(i.hasNext()){
+ Channel ch = i.next();
+ if(ch.getState() == State.UNKNOWN){
+ try {
+ // fire MGCP RSIP
+/* EndpointIdentifier endpointID = new
EndpointIdentifier(ch.getEndpointId(),ch.getGatewayAddress());
+ RestartInProgress rsip = new RestartInProgress(obj, endpointID,
RestartMethod.Graceful);
+
+ final int txID =
mgcpProvider.getUniqueTransactionHandler();
+
rsip.setTransactionHandle(txID);
+
+ MgcpConnectionActivity connectionActivity =
mgcpProvider.getConnectionActivity(txID, endpointID);
+ ActivityContextInterface epnAci =
mgcpActivityContestInterfaceFactory.getActivityContextInterface(connectionActivity);
+
epnAci.attach(sbbLocalObject);
+
+
mgcpProvider.sendMgcpEvents(new JainMgcpEvent[] { rsip });
+ logger.info("RSIP sent; ep ID=" + endpointID + " sbb=" +
sbbLocalObject);
+*/
+ // TODO:
+ // fire ISUP RSC
+
+ // hack:
+ ch.setState(State.IDLE);
+
+ } catch (Exception e) {
+ logger.severe("exception
" + e.getMessage());
+ }
+ }
+ }
+ }
+ }
+
+ private Channel getNeededState(Channel.State state){
+ Iterator <Channel> i = null; i =
channelByCic.values().iterator();
+ while(i.hasNext()){
+ Channel ch = i.next();
+ if(ch.getState() == state) return ch;
+ }
+ return null;
+ }
}
=======================================
---
/core/domain/src/main/java/org/mobicents/isup2sip/management/Isup2SipManagement.java
Sun Aug 4 00:08:46 2013 UTC
+++
/core/domain/src/main/java/org/mobicents/isup2sip/management/Isup2SipManagement.java
Wed Sep 4 15:12:34 2013 UTC
@@ -19,8 +19,12 @@
* 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.isup2sip.management;
-
+/**
+ * @author dmitri soloviev
+ *
+ */
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.management.StandardMBean;
@@ -33,6 +37,9 @@
.getLogger(Isup2SipManagement.class);
public static final String JMX_DOMAIN = "org.mobicents.isup2sip";
+ public static final String CONTEXT = "java:comp/env";
+ public static final String MGCP_PROVIDER
= "slee/resources/jainmgcp/2.0/provider";
+ public static final String MGCP_ACI_FACTORY
= "slee/resources/jainmgcp/2.0/acifactory";
protected static final String SERVICE_PERSIST_DIR_KEY
= "isup2sip.persist.dir";
protected static final String USER_DIR_KEY = "user.dir";
=======================================
---
/core/domain/src/main/java/org/mobicents/isup2sip/management/Isup2SipPropertiesManagement.java
Fri Aug 16 18:40:11 2013 UTC
+++
/core/domain/src/main/java/org/mobicents/isup2sip/management/Isup2SipPropertiesManagement.java
Wed Sep 4 15:12:34 2013 UTC
@@ -33,7 +33,10 @@
import javolution.xml.stream.XMLStreamException;
import org.apache.log4j.Logger;
-
+/**
+ * @author dmitri soloviev
+ *
+ */
public class Isup2SipPropertiesManagement implements
Isup2SipPropertiesManagementMBean {
=======================================
---
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/CauseCodeMapping.java
Mon Jul 29 17:24:14 2013 UTC
+++
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/CauseCodeMapping.java
Wed Sep 4 15:12:34 2013 UTC
@@ -1,3 +1,25 @@
+/**
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.isup2sip.sbb;
public class CauseCodeMapping {
=======================================
---
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/CodingShemes.java
Mon Jul 29 17:24:14 2013 UTC
+++
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/CodingShemes.java
Wed Sep 4 15:12:34 2013 UTC
@@ -1,3 +1,25 @@
+/**
+ * TeleStax, Open Source Cloud Communications Copyright 2012.
+ * 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.isup2sip.sbb;
public class CodingShemes {
=======================================
---
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/Isup2SipSbb.java
Tue Sep 3 23:15:26 2013 UTC
+++
/core/slee/sbbs/src/main/java/org/mobicents/isup2sip/sbb/Isup2SipSbb.java
Wed Sep 4 15:12:34 2013 UTC
@@ -22,7 +22,6 @@
package org.mobicents.isup2sip.sbb;
-//import jain.protocol.ip.mgcp.JainMgcpCommandEvent;
import jain.protocol.ip.mgcp.JainMgcpEvent;
import jain.protocol.ip.mgcp.message.CreateConnection;
import jain.protocol.ip.mgcp.message.CreateConnectionResponse;
@@ -90,6 +89,7 @@
import org.mobicents.isup2sip.management.Channel;
import org.mobicents.isup2sip.management.CicManagement;
+import org.mobicents.isup2sip.management.Isup2SipManagement;
import org.mobicents.isup2sip.management.Isup2SipPropertiesManagement;
//import org.mobicents.isup2sip.sbb.CauseCodeMapping;
import org.mobicents.isup2sip.sbb.CodingShemes;
@@ -165,7 +165,7 @@
// ACI is the server transaction activity
try {
// try to allocate CIC
- final Channel channel = cicManagement.getIdleChannel();
+ final Channel channel =
cicManagement.allocateIdleChannel();
if(channel == null) {
tracer.warning("Failed to allocate CIC for
Invite");
sipReplyToRequestEvent(sipEvent,
Response.SERVICE_UNAVAILABLE);
@@ -504,7 +504,7 @@
}
try {
tracer.severe("trying to start!!!!");
- final Context ctx = (Context) new
InitialContext().lookup("java:comp/env");
+ final Context ctx = (Context) new
InitialContext().lookup(Isup2SipManagement.CONTEXT);
// SIP
sipActivityContextInterfaceFactory =
(SipActivityContextInterfaceFactory)
ctx.lookup("slee/resources/jainsip/1.2/acifactory");
@@ -514,8 +514,8 @@
messageFactory = sipProvider.getMessageFactory();
// MGCP
- mgcpProvider = (JainMgcpProvider)
ctx.lookup("slee/resources/jainmgcp/2.0/provider");
- mgcpActivityContestInterfaceFactory =
(MgcpActivityContextInterfaceFactory)
ctx.lookup("slee/resources/jainmgcp/2.0/acifactory");
+ mgcpProvider = (JainMgcpProvider)
ctx.lookup(Isup2SipManagement.MGCP_PROVIDER);
+ mgcpActivityContestInterfaceFactory =
(MgcpActivityContextInterfaceFactory)
ctx.lookup(Isup2SipManagement.MGCP_ACI_FACTORY);
// ISUP
isupProvider = (RAISUPProvider)
ctx.lookup("slee/resources/isup/1.0/provider");
@@ -984,7 +984,7 @@
SbbLocalObject sbbLocalObject = sbbContext.getSbbLocalObject();
for (ActivityContextInterface attachedAci : activities) {
- tracer.severe("activity " + attachedAci.getActivity());
+// tracer.severe("activity " + attachedAci.getActivity());
attachedAci.detach(sbbLocalObject);
}
}
=======================================
--- /core/slee/sbbs/src/main/resources/META-INF/sbb-jar.xml Tue Sep 3
23:15:26 2013 UTC
+++ /core/slee/sbbs/src/main/resources/META-INF/sbb-jar.xml Wed Sep 4
15:12:34 2013 UTC
@@ -252,8 +252,89 @@
<resource-adaptor-entity-link>ISUPRA</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
</resource-adaptor-type-binding>
+ </sbb>
+
+ <sbb>
+ <sbb-name>MgcpManagementSbb</sbb-name>
+ <sbb-vendor>org.mobicents</sbb-vendor>
+ <sbb-version>1.0</sbb-version>
+
+ <sbb-classes>
+ <sbb-abstract-class reentrant="True">
+
<sbb-abstract-class-name>org.mobicents.isup2sip.sbb.MgcpManagementSbb</sbb-abstract-class-name>
+ </sbb-abstract-class>
+ </sbb-classes>
+
+ <event event-direction="Receive" initial-event="True">
+ <event-name>ServiceStartedEvent</event-name>
+ <event-type-ref>
+ <event-type-name>
+
javax.slee.serviceactivity.ServiceStartedEvent
+ </event-type-name>
+
<event-type-vendor>javax.slee</event-type-vendor>
+ <event-type-version>1.1</event-type-version>
+ </event-type-ref>
+<!-- <initial-event-select variable="ActivityContext"
/>-->
+ </event>
+
+ <event event-direction="Receive" initial-event="False">
+ <event-name>MgcpTIMEOUT</event-name>
+ <event-type-ref>
+
<event-type-name>net.java.slee.resource.mgcp.TRANSACTION_TIMEOUT</event-type-name>
+ <event-type-vendor>net.java</event-type-vendor>
+ <event-type-version>1.0</event-type-version>
+ </event-type-ref>
+ </event>
+
+ <event event-direction="Receive" initial-event="False">
+ <event-name>RestartInProgressResponse</event-name>
+ <event-type-ref>
+
<event-type-name>net.java.slee.resource.mgcp.RESTART_IN_PROGRESS_RESPONSE</event-type-name>
+ <event-type-vendor>net.java</event-type-vendor>
+ <event-type-version>1.0</event-type-version>
+ </event-type-ref>
+ </event>
+
+ <resource-adaptor-type-binding>
+ <resource-adaptor-type-ref>
+ <resource-adaptor-type-name>
+ jain-mgcp
+ </resource-adaptor-type-name>
+ <resource-adaptor-type-vendor>
+ net.java
+ </resource-adaptor-type-vendor>
+ <resource-adaptor-type-version>
+ 2.0
+ </resource-adaptor-type-version>
+ </resource-adaptor-type-ref>
+ <activity-context-interface-factory-name>
+ slee/resources/jainmgcp/2.0/acifactory
+ </activity-context-interface-factory-name>
+ <resource-adaptor-entity-binding>
+ <resource-adaptor-object-name>
+ slee/resources/jainmgcp/2.0/provider
+ </resource-adaptor-object-name>
+ <resource-adaptor-entity-link>
+ MGCPRA
+ </resource-adaptor-entity-link>
+ </resource-adaptor-entity-binding>
+ </resource-adaptor-type-binding>
+
+ <resource-adaptor-type-binding>
+ <resource-adaptor-type-ref>
+
<resource-adaptor-type-name>ISUPResourceAdaptorType</resource-adaptor-type-name>
+
<resource-adaptor-type-vendor>net.java</resource-adaptor-type-vendor>
+
<resource-adaptor-type-version>1.0</resource-adaptor-type-version>
+ </resource-adaptor-type-ref>
+
<activity-context-interface-factory-name>slee/resources/isup/1.0/acifactory</activity-context-interface-factory-name>
+ <resource-adaptor-entity-binding>
+
<resource-adaptor-object-name>slee/resources/isup/1.0/provider</resource-adaptor-object-name>
+
<resource-adaptor-entity-link>ISUPRA</resource-adaptor-entity-link>
+ </resource-adaptor-entity-binding>
+ </resource-adaptor-type-binding>
</sbb>
+
</sbb-jar>
--
---
You received this message because you are subscribed to the Google Groups "mobicents-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.