 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
Mobicents Media Gateway is open source, based on Java Media Framework implementation aimed to: | | | Standard Java interface to the Media Gateway Control Protocol (MGCP) | |
< < | | > > | | | | | |
> > | Examples of call flow | | | Resources |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
Mobicents Media Gateway is open source, based on Java Media Framework implementation aimed to: | | | | |
< < | Standard Java interface to the Media Gateway Control Protocol (MGCP) wich is part of JAIN 1.0 Specification | > > | Standard Java interface to the Media Gateway Control Protocol (MGCP) | | | | |
< < | | | | | |
> > | Resources | | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
Mobicents Media Gateway is open source, based on Java Media Framework implementation aimed to: | | |
Standard Java interface to the Media Gateway Control Protocol (MGCP) wich is part of JAIN 1.0 Specification | |
< < |
- RFC3435 Media Gateway Control Protocol?
| > > | | | | |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
Mobicents Media Gateway is open source, based on Java Media Framework implementation aimed to: | | |
Standard Java interface to the Media Gateway Control Protocol (MGCP) wich is part of JAIN 1.0 Specification | |
> > | | | | |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
Mobicents Media Gateway is open source, based on Java Media Framework implementation aimed to: | | | | |
< < | | > > | | | | | |
< < |
INTRODUCTION
Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams.
There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocol define how media streams are set up and establish media paths between IP and other networks.
ENDPOINT
It is convinient to consider media gateway as a collection of endpoints.
An Endpoint is a logical representation of a physical entity, such as an analog phone or a channel in a trunk.
Endpoints are sources or sinks of data and can be physical or virtual. Physical Endpoint creation requires hardware installation while software is sufficient for creating a virtual Endpoint. An interface on a gateway that terminates a trunk connected to a PSTN switch is an example of a physical Endpoint. An audio source in an audio-content server is an example of a virtual Endpoint.
Basic Implementation
Since Endpoint represents physical entity, wich is expected to be managed, it is convinient to define an endpoint as JMX component.
public interface EndpointMBean extends ServiceMbean {
public void setConfiguration(Properties conf);
public Properties getConfiguration();
}
From other side, the intelligence of the call control is outside the gateways and handled by external call control elements. This mean that a master/slave protocol should be involved, where the gateways are expected to execute commands sent by the call control elements. Command processor executed control commands can be presented as an interface (MGCP for example).
public interface MgcpCommandProcessor {
....
// MGCP specific methods
}
So, the basic representation of an endpoint will looks like (for MGCP example):
public abstract class Endpoint extends ServiceMBeanSupport
implements EndpointMBean, MgcpCommandProcessor {
// configuration properties of this endpoint */
private Properties config;
//collection of the connections
private HashMap connections = new HashMap();
...
/**
* Modify properties of this endpoint.
*
* @param config the properties object.
*/
public void setConfiguration(Properties config) {
this.config = config;
}
/**
* Returns properties of this endpoint.
*
* @return the properties object.
*/
public Properties getConfiguration() {
return config;
}
....
// MGCP implementation
}
The actual class representing an endpoint is derived from the class Endpoint and overrides methods startService() and stopService() to establish comminication with hardware.
For example the class which represent a channel in a trunk may looks like:
public class BChannel extends Endpoint {
/**
* Starts this endpoint and attaches to a B-Channel configured
*
*/
public void startService() {
//load native driver of the PSTN card and prepare B-channel specified in
//a configuration for input/output
}
/**
* Closes this endpoint.
*/
public Properties stopService() {
// close channel and free all resources
}
....
}
Configuration Entry
Each endpoints has its configuration entry in the gateway's global configuration file jboss-service.xml:
<server>
<mbean code="org.mobicents.media.digium.BChannel"
name="org.mobicents:service=ds0/s0/c1">
<attribute name="Configuration">
...
</attribute>
</mbean>
</sever>
where org.mobicents.media.digium.BChannel class in fact implements access to media (B-Cannel) for Digium PSTN card.
Naming conventions
As specified in the MGCP specification the syntax of the local endpoint name is hierarchical, where the least specific component of the name is the leftmost term,and the most specific component is the rightmost term. The name depends on the type of endpoint being named. The individual terms of the naming path should be separated by a
single slash. The symbols * and $ could not be used as part of the name and use as wildcard symbols for searching endpoints. An asterisk sign means "all" and dollar sign means "any".
CONNECTION
An Endpoint holds a set of Connections. Connections are used to establish communication between endpoints or between endpoint and other entity in the IP network using RTP.
So, each endpoint has JMF's Processor which read/writes data from the endpoint's data sink and JMF's RTPManager . If connections resides on the same gateway they can use processor's output media stream as input DataSource? for processor of other connection. Otherwise connection uses RTP to establish a communication. Virtual endpoints don't use any hardware and use files or other connections as data sinks, for example, announcement endpoint uses pre-recorded files to play and conference endpoint uses output media streams of the connections created by this endpoint itself. Connection may be establish for receiving data, transmitting or both. The "direction" of the media stream is determined by connection's mode value. Each endpoint should implement Connection taking into account the endpoint's specifics. Each connection's implementation should be derrived from base Connection class
public abstract class Connection {
....
private String id;
private int mode;
private String localDescriptor;
private String remoteDescriptor;
private Connection remoteConnection;
}
Here local and remote descriptors are used to specify parties for RTP stream using Session Description Protocol - localDescriptor reprsents the connection itself and remoteDescriptor represents remote party. Attributes remoteDescriptor and remoteConnection are mutually exclusive and determine the type of the communication (RTP, or DataSource?). If none of these attributes are provided then a connection is "half" opened.
Each endpoint also should override methods used for managing connections:
public abstract class Endpoint extends ServiceMBeanSupport
implements EndpointMBean, MgcpCommandProcessor {
....
public abstract Connection createConnection(String callID, int mode)
throws TooManyConnections;
public abstract Connection getConnection(String connectionID)
throws ConnectionNotFound;
public abstract void deleteConnection(Connection connection);
}
CALL
Connections are created on each endpoint that will be involved in the "call". The connections identifiers is unique within a call. The creation of the connections is done via the three following steps:
- Call Controller chooses appropriate endpoint and asks the gateway to "create a connection" . The gateway acquire specified endpoint, initialze JMF's processor, create RTPManager and respond to command by providing the local connection descriptor as specified by SDP.
- Call Contoller ask the gateway to acquire the second endpoint and creates a second connection. Call Controller includes connection descriptor of the first connection into the request. Second endpoint apply provided connection descriptor as remoteDescriptor and respond to request by providing it own connection descriptor.
- Call Controller "modify connection" to provide the second connection description for the first connection
EVENTS
A Call Conroller may ask to be notified about certain events occurring in an endpoint or connection (e.g., dtmf events) by including the name of the event in a command. The gateway uses the standard Java listener mode to detect some events. When an endpoint receives the command which requests notification, the new instance of the appropriate listener is created and added to endpoint or to connection. The class which represents the basic listener implements the delivery procedure of the event to Call Controller.
public abstract class BaseListener {
....
public BaseListener(Call call) {
...
}
}
where information about Call Controller is carried by Call object.
CONTROL PROTOCOL
Usually each control protocol stack is implemented independantly. As mentioned above, to bind control protocol to the media gateway, the base endpoint class should implement actions for the protocol's specifics. Also, protocol stack should be wrapped by JMX object to be managed by gateway's administartor and configured
<server>
<mbean code="org.mobicents.media.control.MgcpProvider"
name="org.mobicents:service=MgcpProvider">
<attribute name="Configuration">
...
</attribute>
</mbean>
</sever>
RESOURCE ADAPTOR
The resource adaptor is adopted for MGCP control protocol.
Resource adaptor type identifier
The resource adaptor type name is "JAIN MGCP". The resource adaptor type vendor is "javax.mgcp". The resource adaptor type version is "1.0".
Activity object.
The activity objects for MGCP resource adaptor are org.mobicents.slee.resources.mgcp.Call, org.mobicents.slee.resources.mgcp.Connection objects and org.mobicents.slee.resources.mgcp.Endpoint. The Call object belongs to call which handled by controller, Connection object belongs to connection created on the gateway's side and Endpoint belongs to gateway's endpoint which executes connection.
Events
The following table lists events emitted by Resource Adaptor:
| Events | Activity Object | Remarks |
| Call | Connection | Endpoint |
| Request Events |
| jain.protocol.ip.mgcp.message.AUDIT_ENDPOINT | | | X | |
| jain.protocol.ip.mgcp.message.AUDIT_CONNECTION | | X | | |
| jain.protocol.ip.mgcp.message.CREATE_CONNECTION | X | | X | |
| jain.protocol.ip.mgcp.message.MODIFY_CONNECTION | X | X | X | |
| jain.protocol.ip.mgcp.message.DELETE_CONNECTION | X | X | X | |
| jain.protocol.ip.mgcp.message.NOTIFICATION_REQUEST | | X | | |
| jain.protocol.ip.mgcp.message.NOTIFY_RESPONSE | X | X | X | |
| Response Events |
| jain.protocol.ip.mgcp.message.AUDIT_ENDPOINT_RESPONSE | | | X | |
| jain.protocol.ip.mgcp.message.AUDIT_CONNECTION_RESPONSE | | X | | |
| jain.protocol.ip.mgcp.message.CREATE_CONNECTION_RESPONSE | X | | X | |
| jain.protocol.ip.mgcp.message.MODIFY_CONNECTION_RESPONSE | X | X | X | |
| jain.protocol.ip.mgcp.message.DELETE_CONNECTION_RESPONSE | X | X | X | |
| jain.protocol.ip.mgcp.message.NOTIFICATION_REQUEST_RESPONSE | | X | | |
| jain.protocol.ip.mgcp.message.NOTIFY | X | X | X | |
Event types
The event type is a message name with package prefix jain.protocol.ip.mgcp.message, the event type vendor is jain.mgcp and version is 1.1
Event classes.
The JAIN MGCP define an event class for all avents.
Activity Context Interface Factory Interface
The Activity Context Interface Factory Interface looks :
import javax.slee.ActivityContextInterface;
import javax.slee.FactoryException;
import javax.slee.UnrecognizedActivityException;
public interface RadiusActivityContextInterfaceFactory {
public ActivityContextInterface getActivityContextInterface(Call)
throws NullPointerException, UnrecognizedActivityException, FactoryException;
public ActivityContextInterface getActivityContextInterface(Connection)
throws NullPointerException, UnrecognizedActivityException, FactoryException;
public ActivityContextInterface getActivityContextInterface(Endpoint)
throws NullPointerException, UnrecognizedActivityException, FactoryException;
}
Resource Adaptor object
The JAIN MGCP requeires one object for creating and sendong messages: JainMgcpProvider?.
EXAMPLES
Personal Ringback Tone
Ringback tones are the ring sound that callers hear before the called party answers the phone - typically a quick double ring sound. Personalized ringback tone services allow subscribers create a more personalized and unique ringback tone by replacing the standard "ring-ring" with music clips,personal greetings or any other unique sound they choose.
In terms of the SIP signaling protocol it means that call controller should catch Ringning message and setup an earlier media session for calling party, from one hand, and media gateway which will play sound files from other. When called party answers, the call controller should drop this media session and join parties. Lets use the MGCP RA to create manage media sessions. As mentioned above, all MGCP commands are executed per endpoint basis. It means that developers should know the configuration of the media gateway will be used. For this application announcement endpoint's fatures will be enough. Mgcp assumes that endpoint name is consist of two parts: local name and domain name. The local name is a name of the endpoint within media gateway and is same as Mbean name for us. Domain name may be specified as host name or ip address, port number can be included also. This part of the MGCP endpoint's name used by MGCP provider to deliver message to the gateway.
For PRBT application there is no matter which concrete announcement endpoint will execute commands, so the name of the endpoint for the first CreateConnection? message can be wildcarded. We can't use "all" wildcard symbol, but "any" symbol can be used. The gateway will determine the appropriate endpoint to execute CreateConnection? and then will return concrete endpoint's name in the response.
public void onRingningEvent(RequestEvent event, ActivityContextInterface aci) {
....
//prepare mgcp create connection message
EndpointIdentifier endpoint = new EndpointIdentifier("ann/$",
"mediagateway.mobicents.org");
}
There are the activity objects declared for MGCP RA. These objecs can be used to create an ActivityContextInterface?.
Obtain ActivityContextInterfaceFactory? and attach this SBB to receive response
public void onRingningEvent(RequestEvent event, ActivityContextInterface aci) {
Call call = new Call(callIdHeader); //activity object
CallIdentifier callIdentifier = new CallIdentifier(call.getID());
ActivityContextInerfaceFactory acif = (ActivityConextInterfaceFactory)
context.lookup( "slee/resources/mgcp/ActivityContextInterface");
ActivityContextInterface ac = acif.getActivityContextInterfface(call);
ac.attach(this)
}
Prepare CreateConnection? message: provide session descriptor of the calling party presented in the Invaite message, and create the "equest event" to media gateway with instruction to play file from specified URL and notify imediately when file will finished. Then obtain provider object and send message to the gateway.
public void onRingningEvent(RequestEvent event, ActivityContextInterface aci) {
....
ConnectionDescriptor desc = new ConnectionDescriptor(sdp);
try {
createConnection.setRemoteConnectionDescriptor(desc);
} catch (ConflictingParameterException e) {
//should never happen
}
EventName eventName = new EventName(PackageName.Announcement,
MgcpEvent.ann.withParm("http://user.domain.com/ringbacktone.wav"));
RequestedEvent event = new RequestedEvent(eventName,
new RequestedAction[]{RequestedAction.NotifyImmediately});
NotificationRequestParms request = new NotificationRequestParms(
new RequestIdentifier(Integer.toString(GEN++)));
request.setRequestedEvents(new RequestedEvent[]{event});
createConnection.setNotificationRequestParms(request);
JainMgcpProvider provider = (JainMgcpProvider) context.lookup(
"slee/resources/mgcp/factoryprovider");
provider.send(new JainMgcpCommand[]{createConnection});
}
The gateway will respond with CreateConnectionResponse? message which will include the concrete name of the endpoint acquired by gateway, the idebtifier of the connection created and local (for this connection) session descriptor. We should use this session descriptor in the SESSION_PROGRESS SIP message to establish an earlier media session.
public void onCreateConnectionResp(JainMgcpResponseEvent evt,
ActivityContextInterface aci) {
....
CreateConnectionResponse res = (CreateConnectionResponse) evt;
String sdp = res.getLocalConnectionDescriptor().toString();
//hold specific parameters for future use
Endpoint endpoint = res.getSpecificEndpointIdentifier();
ConnectionIdentifier connectionID = res.getConnectionIdentifier();
//generate SESSION_PROGRESS message.
//using sdp of the connection
}
At this time calling party hear ringback tone while called party alerting. When the specified ringback tone finishes, the gateway will send notify message (as requested)
This event may be used to repeat ringback tone from the begining or send Ringning event if some thing fail.
public void onNotify(JainMgcpCommandEvent evt, ActivityContextInterface aci) {
....
Notify notify = (Notify) evt;
eventName = notify.getObservedEvents()[0];
if (eventName.getEventIdentifier().equals(MgcpEvent.of)) {
//faile to play a file
//generate Ringin message
} else if (eventName.getEventIdentifier().equals(MgcpEvent.of)) {
//send NotifyRequest to play file again
EventName eventName = new EventName(PackageName.Announcement,
MgcpEvent.ann.withParm("http://user.domain.com/ringbacktone.wav"));
RequestedEvent event = new RequestedEvent(eventName,
new RequestedAction[]{RequestedAction.NotifyImmediately});
NotificationRequest req = new NotificationRequest(this,
endpoint,
new RequestIdentifier( new Integer(GEN++).toString());
req.setRequestedEvents(RequestedEvent[]{event});
provider.send(new JainMgcpCommandEvent[]{req});
..
}
}
When called party answers, SBB shout catch OK message and drop the media session.
public void onOkEvent(RequestEvent event, ActivityContextInterface aci) {
....
DeleteConnection dc = new DeleteConnection(this, endpoint);
provider.send(new JainMgcpCommandEvent[]{dc});
}
Now subscribers hear each other. | > > | Standard Java interface to the Media Gateway Control Protocol (MGCP) wich is part of JAIN 1.0 Specification | | |
-- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
Mobicents Media Gateway is open source, based on Java Media Framework implementation aimed to: | | | | |
> > |
| | |
INTRODUCTION |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| |
> > | Mobicents Media Gateway is open source, based on Java Media Framework implementation aimed to:
- Deliver competitive, complete, best-of-breed media gateway functionality featuring highest quality.
- Meet the demands of converged wireless, wireline, cable broadband access and fixed-mobile converged VoIP networks from a single media gateway platform
- Increase flexibility with a media gateway that supports wide variaty of call control protocols and scales down to meet the demands of enterprises and small carrier providers.
- React quickly to dynamic market requirements.
This WiKi? is a community white board for sharing documents such as Design patterns, Best Practices, and Examples related to the project. | | | |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| |
> > | * Architecture | | |
INTRODUCTION |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | Event types
The event type is a message name with package prefix jain.protocol.ip.mgcp.message, the event type vendor is jain.mgcp and version is 1.1 | |
< < | Event classes. The JAIN MGCP define an event class for all avents. | > > | Event classes.
The JAIN MGCP define an event class for all avents. | | | Activity Context Interface Factory Interface
The Activity Context Interface Factory Interface looks : | | | The gateway will respond with CreateConnectionResponse? message which will include the concrete name of the endpoint acquired by gateway, the idebtifier of the connection created and local (for this connection) session descriptor. We should use this session descriptor in the SESSION_PROGRESS SIP message to establish an earlier media session. | |
< < | public void onCreateConnectionResp(JainMgcpResponseEvent? evt, ActivityContextInterface? aci) { | > > |
public void onCreateConnectionResp(JainMgcpResponseEvent evt,
ActivityContextInterface aci) { | | | ....
CreateConnectionResponse? res = (CreateConnectionResponse?) evt;
String sdp = res.getLocalConnectionDescriptor().toString(); | |
> > | //hold specific parameters for future use
Endpoint endpoint = res.getSpecificEndpointIdentifier();
ConnectionIdentifier? connectionID = res.getConnectionIdentifier();
| | | //generate SESSION_PROGRESS message.
//using sdp of the connection
} | | | At this time calling party hear ringback tone while called party alerting. When the specified ringback tone finishes, the gateway will send notify message (as requested)
This event may be used to repeat ringback tone from the begining or send Ringning event if some thing fail. | |
> > | | | | public void onNotify(JainMgcpCommandEvent? evt, ActivityContextInterface? aci) {
....
Notify notify = (Notify) evt; | |
> > | eventName = notify.getObservedEvents()[0];
if (eventName.getEventIdentifier().equals(MgcpEvent?.of)) {
//faile to play a file
//generate Ringin message
} else if (eventName.getEventIdentifier().equals(MgcpEvent?.of)) {
//send NotifyRequest? to play file again
EventName? eventName = new EventName?(PackageName?.Announcement,
MgcpEvent?.ann.withParm("http://user.domain.com/ringbacktone.wav"));
RequestedEvent? event = new RequestedEvent?(eventName,
new RequestedAction?[]{RequestedAction.NotifyImmediately});
NotificationRequest? req = new NotificationRequest?(this,
endpoint,
new RequestIdentifier?( new Integer(GEN++).toString());
req.setRequestedEvents(RequestedEvent?[]{event});
provider.send(new JainMgcpCommandEvent?[]{req});
..
} | | |
}
| |
> > | When called party answers, SBB shout catch OK message and drop the media session.
public void onOkEvent(RequestEvent event, ActivityContextInterface aci) {
....
DeleteConnection dc = new DeleteConnection(this, endpoint);
provider.send(new JainMgcpCommandEvent[]{dc});
}
Now subscribers hear each other. | | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | | |
< < | There are the activity objects declared for MGCP RA. But just Call object has public constructor, this object is allways used to create a first ActivityContextInterface?. | > > | There are the activity objects declared for MGCP RA. These objecs can be used to create an ActivityContextInterface?. | | | Obtain ActivityContextInterfaceFactory? and attach this SBB to receive response
public void onRingningEvent(RequestEvent event, ActivityContextInterface aci) { | | | }
| |
< < | Prepare CreateConnection? Message: provide session descriptor of the calling party presented in the Invaite message, and create the "equest event" to media gateway with instruction to play file from specified URL and notify imediately when file will finished. | > > | Prepare CreateConnection? message: provide session descriptor of the calling party presented in the Invaite message, and create the "equest event" to media gateway with instruction to play file from specified URL and notify imediately when file will finished. Then obtain provider object and send message to the gateway. | | |
public void onRingningEvent(RequestEvent event, ActivityContextInterface aci) { | | | }
| |
> > | The gateway will respond with CreateConnectionResponse? message which will include the concrete name of the endpoint acquired by gateway, the idebtifier of the connection created and local (for this connection) session descriptor. We should use this session descriptor in the SESSION_PROGRESS SIP message to establish an earlier media session.
public void onCreateConnectionResp(JainMgcpResponseEvent? evt, ActivityContextInterface? aci) {
....
CreateConnectionResponse? res = (CreateConnectionResponse?) evt;
String sdp = res.getLocalConnectionDescriptor().toString();
//generate SESSION_PROGRESS message.
//using sdp of the connection
}
At this time calling party hear ringback tone while called party alerting. When the specified ringback tone finishes, the gateway will send notify message (as requested)
This event may be used to repeat ringback tone from the begining or send Ringning event if some thing fail.
public void onNotify(JainMgcpCommandEvent? evt, ActivityContextInterface? aci) {
....
Notify notify = (Notify) evt;
}
| | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | The JAIN MGCP requeires one object for creating and sendong messages: JainMgcpProvider?.
EXAMPLES | |
> > | Personal Ringback Tone
Ringback tones are the ring sound that callers hear before the called party answers the phone - typically a quick double ring sound. Personalized ringback tone services allow subscribers create a more personalized and unique ringback tone by replacing the standard "ring-ring" with music clips,personal greetings or any other unique sound they choose.
In terms of the SIP signaling protocol it means that call controller should catch Ringning message and setup an earlier media session for calling party, from one hand, and media gateway which will play sound files from other. When called party answers, the call controller should drop this media session and join parties. Lets use the MGCP RA to create manage media sessions. As mentioned above, all MGCP commands are executed per endpoint basis. It means that developers should know the configuration of the media gateway will be used. For this application announcement endpoint's fatures will be enough. Mgcp assumes that endpoint name is consist of two parts: local name and domain name. The local name is a name of the endpoint within media gateway and is same as Mbean name for us. Domain name may be specified as host name or ip address, port number can be included also. This part of the MGCP endpoint's name used by MGCP provider to deliver message to the gateway.
For PRBT application there is no matter which concrete announcement endpoint will execute commands, so the name of the endpoint for the first CreateConnection? message can be wildcarded. We can't use "all" wildcard symbol, but "any" symbol can be used. The gateway will determine the appropriate endpoint to execute CreateConnection? and then will return concrete endpoint's name in the response.
public void onRingningEvent(RequestEvent event, ActivityContextInterface aci) {
....
//prepare mgcp create connection message
EndpointIdentifier endpoint = new EndpointIdentifier("ann/$",
"mediagateway.mobicents.org");
}
There are the activity objects declared for MGCP RA. But just Call object has public constructor, this object is allways used to create a first ActivityContextInterface?.
Obtain ActivityContextInterfaceFactory? and attach this SBB to receive response
public void onRingningEvent(RequestEvent event, ActivityContextInterface aci) {
Call call = new Call(callIdHeader); //activity object
CallIdentifier callIdentifier = new CallIdentifier(call.getID());
ActivityContextInerfaceFactory acif = (ActivityConextInterfaceFactory)
context.lookup( "slee/resources/mgcp/ActivityContextInterface");
ActivityContextInterface ac = acif.getActivityContextInterfface(call);
ac.attach(this)
}
Prepare CreateConnection? Message: provide session descriptor of the calling party presented in the Invaite message, and create the "equest event" to media gateway with instruction to play file from specified URL and notify imediately when file will finished.
public void onRingningEvent(RequestEvent event, ActivityContextInterface aci) {
....
ConnectionDescriptor desc = new ConnectionDescriptor(sdp);
try {
createConnection.setRemoteConnectionDescriptor(desc);
} catch (ConflictingParameterException e) {
//should never happen
}
EventName eventName = new EventName(PackageName.Announcement,
MgcpEvent.ann.withParm("http://user.domain.com/ringbacktone.wav"));
RequestedEvent event = new RequestedEvent(eventName,
new RequestedAction[]{RequestedAction.NotifyImmediately});
NotificationRequestParms request = new NotificationRequestParms(
new RequestIdentifier(Integer.toString(GEN++)));
request.setRequestedEvents(new RequestedEvent[]{event});
createConnection.setNotificationRequestParms(request);
JainMgcpProvider provider = (JainMgcpProvider) context.lookup(
"slee/resources/mgcp/factoryprovider");
provider.send(new JainMgcpCommand[]{createConnection});
}
| | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | The resource adaptor type name is "JAIN MGCP". The resource adaptor type vendor is "javax.mgcp". The resource adaptor type version is "1.0".
Activity object. | |
< < | The activity objects for MGCP resource adaptor are org.mobicents.slee.resources.mgcp.Call and org.mobicents.slee.resources.mgcp.Connection objects. This Call object belongs to call which handled by controller and Connection object belongs to connection created on the gateway's side. | > > | The activity objects for MGCP resource adaptor are org.mobicents.slee.resources.mgcp.Call, org.mobicents.slee.resources.mgcp.Connection objects and org.mobicents.slee.resources.mgcp.Endpoint. The Call object belongs to call which handled by controller, Connection object belongs to connection created on the gateway's side and Endpoint belongs to gateway's endpoint which executes connection. | | | Events | |
< < | | > > | The following table lists events emitted by Resource Adaptor:
| Events | Activity Object | Remarks |
| Call | Connection | Endpoint |
| Request Events |
| jain.protocol.ip.mgcp.message.AUDIT_ENDPOINT | | | X | |
| jain.protocol.ip.mgcp.message.AUDIT_CONNECTION | | X | | |
| jain.protocol.ip.mgcp.message.CREATE_CONNECTION | X | | X | |
| jain.protocol.ip.mgcp.message.MODIFY_CONNECTION | X | X | X | |
| jain.protocol.ip.mgcp.message.DELETE_CONNECTION | X | X | X | |
| jain.protocol.ip.mgcp.message.NOTIFICATION_REQUEST | | X | | |
| jain.protocol.ip.mgcp.message.NOTIFY_RESPONSE | X | X | X | |
| Response Events |
| jain.protocol.ip.mgcp.message.AUDIT_ENDPOINT_RESPONSE | | | X | |
| jain.protocol.ip.mgcp.message.AUDIT_CONNECTION_RESPONSE | | X | | |
| jain.protocol.ip.mgcp.message.CREATE_CONNECTION_RESPONSE | X | | X | |
| jain.protocol.ip.mgcp.message.MODIFY_CONNECTION_RESPONSE | X | X | X | |
| jain.protocol.ip.mgcp.message.DELETE_CONNECTION_RESPONSE | X | X | X | |
| jain.protocol.ip.mgcp.message.NOTIFICATION_REQUEST_RESPONSE | | X | | |
| jain.protocol.ip.mgcp.message.NOTIFY | X | X | X | | | | | | |
< < | EXAMPLES | | | | |
> > | Event types
The event type is a message name with package prefix jain.protocol.ip.mgcp.message, the event type vendor is jain.mgcp and version is 1.1
Event classes. The JAIN MGCP define an event class for all avents.
Activity Context Interface Factory Interface
The Activity Context Interface Factory Interface looks :
import javax.slee.ActivityContextInterface;
import javax.slee.FactoryException;
import javax.slee.UnrecognizedActivityException;
public interface RadiusActivityContextInterfaceFactory {
public ActivityContextInterface getActivityContextInterface(Call)
throws NullPointerException, UnrecognizedActivityException, FactoryException;
public ActivityContextInterface getActivityContextInterface(Connection)
throws NullPointerException, UnrecognizedActivityException, FactoryException;
public ActivityContextInterface getActivityContextInterface(Endpoint)
throws NullPointerException, UnrecognizedActivityException, FactoryException;
}
Resource Adaptor object
The JAIN MGCP requeires one object for creating and sendong messages: JainMgcpProvider?.
EXAMPLES | | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | RESOURCE ADAPTOR
The resource adaptor is adopted for MGCP control protocol. | |
> > | Resource adaptor type identifier
The resource adaptor type name is "JAIN MGCP". The resource adaptor type vendor is "javax.mgcp". The resource adaptor type version is "1.0".
Activity object.
The activity objects for MGCP resource adaptor are org.mobicents.slee.resources.mgcp.Call and org.mobicents.slee.resources.mgcp.Connection objects. This Call object belongs to call which handled by controller and Connection object belongs to connection created on the gateway's side.
Events
| | | EXAMPLES
-- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | where information about Call Controller is carried by Call object.
CONTROL PROTOCOL | |
> > | Usually each control protocol stack is implemented independantly. As mentioned above, to bind control protocol to the media gateway, the base endpoint class should implement actions for the protocol's specifics. Also, protocol stack should be wrapped by JMX object to be managed by gateway's administartor and configured
<server>
<mbean code="org.mobicents.media.control.MgcpProvider"
name="org.mobicents:service=MgcpProvider">
<attribute name="Configuration">
...
</attribute>
</mbean>
</sever>
| | | RESOURCE ADAPTOR | |
> > | The resource adaptor is adopted for MGCP control protocol. | | | EXAMPLES
-- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams.
There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocol define how media streams are set up and establish media paths between IP and other networks. | |
< < | | > > | | | | ENDPOINT
It is convinient to consider media gateway as a collection of endpoints. | | |
public abstract class Connection { | |
> > | .... | | | private String id;
private int mode;
private String localDescriptor; | | |
public abstract class Endpoint extends ServiceMBeanSupport
implements EndpointMBean, MgcpCommandProcessor { | |
> > | .... | | | public abstract Connection createConnection(String callID, int mode)
throws TooManyConnections?;
public abstract Connection getConnection(String connectionID) | | | | |
< < | Call | > > | CALL
Connections are created on each endpoint that will be involved in the "call". The connections identifiers is unique within a call. The creation of the connections is done via the three following steps:
- Call Controller chooses appropriate endpoint and asks the gateway to "create a connection" . The gateway acquire specified endpoint, initialze JMF's processor, create RTPManager and respond to command by providing the local connection descriptor as specified by SDP.
- Call Contoller ask the gateway to acquire the second endpoint and creates a second connection. Call Controller includes connection descriptor of the first connection into the request. Second endpoint apply provided connection descriptor as remoteDescriptor and respond to request by providing it own connection descriptor.
- Call Controller "modify connection" to provide the second connection description for the first connection
EVENTS
A Call Conroller may ask to be notified about certain events occurring in an endpoint or connection (e.g., dtmf events) by including the name of the event in a command. The gateway uses the standard Java listener mode to detect some events. When an endpoint receives the command which requests notification, the new instance of the appropriate listener is created and added to endpoint or to connection. The class which represents the basic listener implements the delivery procedure of the event to Call Controller.
public abstract class BaseListener {
....
public BaseListener(Call call) {
...
}
}
where information about Call Controller is carried by Call object.
CONTROL PROTOCOL
RESOURCE ADAPTOR
EXAMPLES | | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | single slash. The symbols * and $ could not be used as part of the name and use as wildcard symbols for searching endpoints. An asterisk sign means "all" and dollar sign means "any".
CONNECTION | |
< < | An Endpoint holds a set of Connections. Connections may be either point-to-point or multipoint. A point-to-point Connection associates two Endpoints. Once this association is established for both Endpoints, data transfer between these Endpoints can begin. Each endpoint can create one or more connection(s). | > > | An Endpoint holds a set of Connections. Connections are used to establish communication between endpoints or between endpoint and other entity in the IP network using RTP.
So, each endpoint has JMF's Processor which read/writes data from the endpoint's data sink and JMF's RTPManager . If connections resides on the same gateway they can use processor's output media stream as input DataSource? for processor of other connection. Otherwise connection uses RTP to establish a communication. Virtual endpoints don't use any hardware and use files or other connections as data sinks, for example, announcement endpoint uses pre-recorded files to play and conference endpoint uses output media streams of the connections created by this endpoint itself. Connection may be establish for receiving data, transmitting or both. The "direction" of the media stream is determined by connection's mode value. Each endpoint should implement Connection taking into account the endpoint's specifics. Each connection's implementation should be derrived from base Connection class
public abstract class Connection {
private String id;
private int mode;
private String localDescriptor;
private String remoteDescriptor;
private Connection remoteConnection;
}
Here local and remote descriptors are used to specify parties for RTP stream using Session Description Protocol - localDescriptor reprsents the connection itself and remoteDescriptor represents remote party. Attributes remoteDescriptor and remoteConnection are mutually exclusive and determine the type of the communication (RTP, or DataSource?). If none of these attributes are provided then a connection is "half" opened.
Each endpoint also should override methods used for managing connections: | | |
public abstract class Endpoint extends ServiceMBeanSupport
implements EndpointMBean, MgcpCommandProcessor {
public abstract Connection createConnection(String callID, int mode)
throws TooManyConnections; | |
< < | public abstract Connection(String connectionID) | > > | public abstract Connection getConnection(String connectionID) | | | throws ConnectionNotFound?;
public abstract void deleteConnection(Connection connection);
}
| |
< < | These methods | > > | Call | | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| | | single slash. The symbols * and $ could not be used as part of the name and use as wildcard symbols for searching endpoints. An asterisk sign means "all" and dollar sign means "any".
CONNECTION | |
< < | An Endpoint holds a set of Connections. Connections may be either point-to-point or multipoint. A point-to-point Connection associates two Endpoints. Once this association is established for both Endpoints, data transfer between these Endpoints can begin. | > > | An Endpoint holds a set of Connections. Connections may be either point-to-point or multipoint. A point-to-point Connection associates two Endpoints. Once this association is established for both Endpoints, data transfer between these Endpoints can begin. Each endpoint can create one or more connection(s).
public abstract class Endpoint extends ServiceMBeanSupport
implements EndpointMBean, MgcpCommandProcessor {
public abstract Connection createConnection(String callID, int mode)
throws TooManyConnections;
public abstract Connection(String connectionID)
throws ConnectionNotFound;
public abstract void deleteConnection(Connection connection);
}
These methods | | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| |
< < |
Connections
IVR endpoint
Conference bridge
Control protocol
Resource Adaptor
Example application | > > | | | | INTRODUCTION | |
< < | Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. CSCF control Media Gateways by means of a media gateway control protocol.
There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocols define how media streams are set up and establish media paths between IP and other networks. It is convinient to consider media gateway as a collection of endpoints. | > > | Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. | | | | |
> > | There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocol define how media streams are set up and establish media paths between IP and other networks. | | |
ENDPOINT | |
> > | It is convinient to consider media gateway as a collection of endpoints. | | | An Endpoint is a logical representation of a physical entity, such as an analog phone or a channel in a trunk.
Endpoints are sources or sinks of data and can be physical or virtual. Physical Endpoint creation requires hardware installation while software is sufficient for creating a virtual Endpoint. An interface on a gateway that terminates a trunk connected to a PSTN switch is an example of a physical Endpoint. An audio source in an audio-content server is an example of a virtual Endpoint. | |
< < |  | > > |  | | | | |
> > | Basic Implementation | | | Since Endpoint represents physical entity, wich is expected to be managed, it is convinient to define an endpoint as JMX component. | | | }
| |
< < | From other side, the intelligence of the call control is outside the gateways and handled by external call control elements. This mean that a master/slave protocol should be involved, where the gateways are expected to execute commands sent by the call control elements (MGCP for example). | > > | From other side, the intelligence of the call control is outside the gateways and handled by external call control elements. This mean that a master/slave protocol should be involved, where the gateways are expected to execute commands sent by the call control elements. Command processor executed control commands can be presented as an interface (MGCP for example). | | |
public interface MgcpCommandProcessor {
.... | | | }
| |
> > | Configuration Entry
Each endpoints has its configuration entry in the gateway's global configuration file jboss-service.xml:
<server>
<mbean code="org.mobicents.media.digium.BChannel"
name="org.mobicents:service=ds0/s0/c1">
<attribute name="Configuration">
...
</attribute>
</mbean>
</sever>
where org.mobicents.media.digium.BChannel class in fact implements access to media (B-Cannel) for Digium PSTN card.
Naming conventions | | | | |
> > | As specified in the MGCP specification the syntax of the local endpoint name is hierarchical, where the least specific component of the name is the leftmost term,and the most specific component is the rightmost term. The name depends on the type of endpoint being named. The individual terms of the naming path should be separated by a
single slash. The symbols * and $ could not be used as part of the name and use as wildcard symbols for searching endpoints. An asterisk sign means "all" and dollar sign means "any". | | | | |
> > | CONNECTION
An Endpoint holds a set of Connections. Connections may be either point-to-point or multipoint. A point-to-point Connection associates two Endpoints. Once this association is established for both Endpoints, data transfer between these Endpoints can begin. | | | -- Main.kulikoff - 31 Mar 2005 |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| |
< < | | > > | | | | Connections | | | INTRODUCTION | |
< < | #introduction
Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. CSCF control Media Gateways by means of a media gateway control protocol. | > > | Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. CSCF control Media Gateways by means of a media gateway control protocol. | | | There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocols define how media streams are set up and establish media paths between IP and other networks. It is convinient to consider media gateway as a collection of endpoints. | |
> > | | | | ENDPOINT | |
< < | #endpoints | | | An Endpoint is a logical representation of a physical entity, such as an analog phone or a channel in a trunk.
Endpoints are sources or sinks of data and can be physical or virtual. Physical Endpoint creation requires hardware installation while software is sufficient for creating a virtual Endpoint. An interface on a gateway that terminates a trunk connected to a PSTN switch is an example of a physical Endpoint. An audio source in an audio-content server is an example of a virtual Endpoint. | |
> > |  | | | Since Endpoint represents physical entity, wich is expected to be managed, it is convinient to define an endpoint as JMX component. | | | return config;
}
| |
< < | //Endpoint's basic methods
public abstract Connection createConnection(String callID, int mode) throws TooManyConnections?;
public abstract void delete(Connection connection) ;
public Connection getConnection(String connectionID) throws ConnectionNotFound? {
if (connections.containsKey(connectionID) {
return (Connection) connections.get(connectionID);
} else throw new ConnectionNotFoundException?("Connection not found: " + connectionID));
} | | | ....
// MGCP implementation
}
| |
< < | This implementation creates two views of the endpoint. The first view is an administrative representation and used for configuring endpoint, view usage statistics and so on. The different JMX management tools can be used to do this. The second view is the developer's view of the endpoint. The developer should use one of the media gateway control protocol to work with endpoint. | > > | The actual class representing an endpoint is derived from the class Endpoint and overrides methods startService() and stopService() to establish comminication with hardware.
For example the class which represent a channel in a trunk may looks like: | | | | |
> > |
public class BChannel extends Endpoint { | | | | |
> > | /**
* Starts this endpoint and attaches to a B-Channel configured
*
*/
public void startService() {
//load native driver of the PSTN card and prepare B-channel specified in
//a configuration for input/output
}
/**
* Closes this endpoint.
*/
public Properties stopService() {
// close channel and free all resources
}
....
}
| | | |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| |
< < | Introduction
Endpoints | > > | | | | Connections | | | INTRODUCTION | |
> > | #introduction | | | Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. CSCF control Media Gateways by means of a media gateway control protocol.
There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocols define how media streams are set up and establish media paths between IP and other networks. It is convinient to consider media gateway as a collection of endpoints.
ENDPOINT | |
> > | #endpoints | | | An Endpoint is a logical representation of a physical entity, such as an analog phone or a channel in a trunk.
Endpoints are sources or sinks of data and can be physical or virtual. Physical Endpoint creation requires hardware installation while software is sufficient for creating a virtual Endpoint. An interface on a gateway that terminates a trunk connected to a PSTN switch is an example of a physical Endpoint. An audio source in an audio-content server is an example of a virtual Endpoint. | |
< < | Since Endpoint represents physical entity it should be configurable, so it reasonable to implement endpoint as JMX component: | > > | Since Endpoint represents physical entity, wich is expected to be managed, it is convinient to define an endpoint as JMX component. | | |
public interface EndpointMBean extends ServiceMbean { | | | }
| |
< < | As mentioned above, the intelligence of the call control is outside the gateways and handled by external call control elements. This mean that a master/slave protocol needed, where the gateways are expected to execute commands sent by the call control elements. There are different types of media gateway protocols already widely used and will be good to allow use one of that. Each protocol specifics can be defined by appropriate interface (for MGCP example): | > > | From other side, the intelligence of the call control is outside the gateways and handled by external call control elements. This mean that a master/slave protocol should be involved, where the gateways are expected to execute commands sent by the call control elements (MGCP for example). | | | | |
< < | public interface MgcpControlable? { | > > | public interface MgcpCommandProcessor? { | | | .... | |
< < | // MGCP specific methods declarations | > > | // MGCP specific methods | | | }
| |
< < | and implemented in basic abstract endpoint. | > > | So, the basic representation of an endpoint will looks like (for MGCP example): | | |
public abstract class Endpoint extends ServiceMBeanSupport | |
< < | implements EndpointMBean?, MgcpControlable? { | > > | implements EndpointMBean?, MgcpCommandProcessor? { | | | // configuration properties of this endpoint */
private Properties config; | |
> > | //collection of the connections
private HashMap? connections = new HashMap?();
... | | | /**
* Modify properties of this endpoint.
* | | | public Properties getConfiguration() {
return config;
} | |
> > |
//Endpoint's basic methods
public abstract Connection createConnection(String callID, int mode) throws TooManyConnections?;
public abstract void delete(Connection connection) ;
public Connection getConnection(String connectionID) throws ConnectionNotFound? {
if (connections.containsKey(connectionID) {
return (Connection) connections.get(connectionID);
} else throw new ConnectionNotFoundException?("Connection not found: " + connectionID));
} | | | ....
// MGCP implementation
} |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
Introduction | |
> > | | | | Endpoints | |
> > | | | | Connections | |
> > | | | | IVR endpoint | |
> > | | | | Conference bridge | |
> > | | | | Control protocol | |
> > | | | | Resource Adaptor | |
> > | | | | Example application | |
> > | | | | INTRODUCTION | |
< < | Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. Signaling is the establishment of a session between two or more parties. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. CSCF control Media Gateways by means of a media gateway control protocol. | > > | Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. CSCF control Media Gateways by means of a media gateway control protocol. | | | | |
< < | There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocols define how media streams are set up and establish media paths between IP and other networks. So IVR and conference bridges can be emdeded into media gateways. | > > | There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocols define how media streams are set up and establish media paths between IP and other networks. It is convinient to consider media gateway as a collection of endpoints. | | | ENDPOINT
An Endpoint is a logical representation of a physical entity, such as an analog phone or a channel in a trunk. | | | As mentioned above, the intelligence of the call control is outside the gateways and handled by external call control elements. This mean that a master/slave protocol needed, where the gateways are expected to execute commands sent by the call control elements. There are different types of media gateway protocols already widely used and will be good to allow use one of that. Each protocol specifics can be defined by appropriate interface (for MGCP example): | |
< < | public interface MgcpContrable? { | > > | public interface MgcpControlable? { | | | ....
// MGCP specific methods declarations
} | | |
public abstract class Endpoint extends ServiceMBeanSupport | |
< < | implements EndpointMBean?, MgcpMgcpControlable? {
//JMX implementation | > > | implements EndpointMBean?, MgcpControlable? {
// configuration properties of this endpoint */
private Properties config;
/**
* Modify properties of this endpoint.
*
* @param config the properties object.
*/
public void setConfiguration(Properties config) {
this.config = config;
}
/**
* Returns properties of this endpoint.
*
* @return the properties object.
*/
public Properties getConfiguration() {
return config;
} | | | ....
// MGCP implementation
}
| |
< < | This implementation creates to views of the endpoint. The first view is administrative and used for configuring endpoint, view usage statistics and so on. The different JMX management tools can be used to do this. The second view is the developer view of the endpoint. The developer should use one of the media gateway control protocol to manage | > > | This implementation creates two views of the endpoint. The first view is an administrative representation and used for configuring endpoint, view usage statistics and so on. The different JMX management tools can be used to do this. The second view is the developer's view of the endpoint. The developer should use one of the media gateway control protocol to work with endpoint. | | | |
| |
| META TOPICPARENT | name="MobicentsFAQ" |
| |
> > | Introduction
Endpoints
Connections
IVR endpoint
Conference bridge
Control protocol
Resource Adaptor
Example application | | | INTRODUCTION
Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. Signaling is the establishment of a session between two or more parties. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. CSCF control Media Gateways by means of a media gateway control protocol. | | | An Endpoint is a logical representation of a physical entity, such as an analog phone or a channel in a trunk.
Endpoints are sources or sinks of data and can be physical or virtual. Physical Endpoint creation requires hardware installation while software is sufficient for creating a virtual Endpoint. An interface on a gateway that terminates a trunk connected to a PSTN switch is an example of a physical Endpoint. An audio source in an audio-content server is an example of a virtual Endpoint. | |
< < | The basic implementation of the endpoint encapsulated in the class
org.mobicents.media.Endpoint | > > | Since Endpoint represents physical entity it should be configurable, so it reasonable to implement endpoint as JMX component:
public interface EndpointMBean extends ServiceMbean {
public void setConfiguration(Properties conf);
public Properties getConfiguration();
}
As mentioned above, the intelligence of the call control is outside the gateways and handled by external call control elements. This mean that a master/slave protocol needed, where the gateways are expected to execute commands sent by the call control elements. There are different types of media gateway protocols already widely used and will be good to allow use one of that. Each protocol specifics can be defined by appropriate interface (for MGCP example):
public interface MgcpContrable {
....
// MGCP specific methods declarations
}
and implemented in basic abstract endpoint.
public abstract class Endpoint extends ServiceMBeanSupport
implements EndpointMBean, MgcpMgcpControlable {
//JMX implementation
....
// MGCP implementation
}
This implementation creates to views of the endpoint. The first view is administrative and used for configuring endpoint, view usage statistics and so on. The different JMX management tools can be used to do this. The second view is the developer view of the endpoint. The developer should use one of the media gateway control protocol to manage | | | |
|
> > |
| META TOPICPARENT | name="MobicentsFAQ" |
INTRODUCTION
Media gateways were introduced to interwork with traditional telephony systems and enable support of large phone-to-phone deployments. Signaling is the establishment of a session between two or more parties. In traditional telephone systems, signaling (D-channel) and media (B-channel) are carried separately. In VoIP networks, each needs to be handled by a different type of entities: a Signaling Call State Control Function (CSCF) and a Media Gateway (MGW). Signaling Gateways translate the D-channel data to VoIP-compatible signaling protocols, such as ISUP-over-IP, SIP or H.323, and do not involve media gateway control protocols. Media Gateways provide the bridge for media to seamlessly transit between PSTN and VoIP networks by ferrying media between B-channels and RTP streams. CSCF control Media Gateways by means of a media gateway control protocol.
There is a fundamental difference between SIP and H.323 and media gateway control protocols. SIP and H.323 are signaling protocols that set up and manage calls, whereas media gateway control protocols define how media streams are set up and establish media paths between IP and other networks. So IVR and conference bridges can be emdeded into media gateways.
ENDPOINT
An Endpoint is a logical representation of a physical entity, such as an analog phone or a channel in a trunk.
Endpoints are sources or sinks of data and can be physical or virtual. Physical Endpoint creation requires hardware installation while software is sufficient for creating a virtual Endpoint. An interface on a gateway that terminates a trunk connected to a PSTN switch is an example of a physical Endpoint. An audio source in an audio-content server is an example of a virtual Endpoint.
The basic implementation of the endpoint encapsulated in the class
org.mobicents.media.Endpoint
-- Main.kulikoff - 31 Mar 2005 |
|