Media Control Manager
Media Control Manager
Apms
TM - Trunk Manager
1. Maintains Media network database
2. Maintains circuit database – states
3. Maintains CIC ownership
4. Attempts to keep Circuit state in sync with MG endpoint states
5. Recovery on SET_ACTIVE etc..
6. User: RTC / DF / MGMT
7. Built as libcvx_tm.so
MGCP/MEGACO
• MGCP/MEGACO are the protocols used to control the Media
Gateway
– Basic commands
• CRCX / ADD
– Used to activate the physical endpoint/termination by allocating appropriate
resources in the MG for using the termination
• MDCX / MODIFY
– Change the different parameters for the endpoints
• RQNT (signal) / MODIFY (signal)
– To play or request to collect a particular signal (tone/annc/digits)
• NTFY / NOTIFY
– Observed events notified by the MG to MGC
• DLCX / SUBTRACT
– To clear the resources allocated to the termination
• RSIP/SERVICE CHANGE
– To inform the MGC about any involuntary changes to the terminations like line
going OOS / IS etc..
• AUEP/AUDIT
– From MGC to MG to know the status of the terminations
MCM/TM Provisioning Tables
• Wms_localSP
• Wms_remoteSP
• Wms_app_csm_card_view
• Wms_mediagwinfo_view
• wms_mg_trunkinfo
• Csm_mcm_trunkgroup_ckt_border
• Csm_mcm_trunkgroup_info
• Csm_mcm_trunkgroup_ip
• Csm_mcm_trunkgroup_sip
• Csm_mcm_trunkgroup_ckt_local
• Csm_mcm_trunkgroup_isup_plus
• Wms_annc_map
• Wms_tone_map
• Csm_mcm_cas_tg_info
• ….
Key Data structures in MCM
• MCM_NODE – Network entities through which the media passes ex BSCs, MSCs, MGs
– Type
• BORDER – Nodes with which MCM user exchanges signalling information to setup a call ex BS, MSCs
– ADDRESS
– CIC TABLE
– N * TRUNK GROUP
• LOCAL – Nodes that are controlled by MCM user through media control protocols such as MGCP/H.248, Media Gateways.
– ADDRESS
– ENDPOINT TABLE
– N * TRUNKGROUP
– MGC Protocol type
– MCM_ADDRESS
• Type IP – (address , host)
• Type LOGICAL – name
• Type PC – Point code Integer
– Capability
• IP,MULTICAST,MIXING,DTMF…
– Adjacent Node List
• MCM_TRUNK_GROUP – edges in the graph which have the ability to transmit the media
between two nodes which are realized through a set of trunks or IP connectivity.
– N * MCM_TRUNK – Used to represent a T1/E1. exactly it is just one element in a TG
– CIC table ( link table link id v/s MCM_LINK)
– Source Node
– Destination Node
– Signaling protocol
– Some Properties – Circuit selection , glare resolution , Compression algorithm etc..
– Type – IP or CKT
• MCM_LINK – Identifies a one-one mapping between endpoints in
adjacent nodes. A link may be persistent or it may be created and
deleted as a part of media setup – for RTP streaming case.
– Type
– MCM_SPEC
– Union of
• BORDER_CKT
– MCM_ENDPOINT_CKT
– MCM_TRUNK
– Cic
• LOCAL_CKT
– MCM_ENDPOINT_CKT ep1
– MCM_ENDPOINT_CKT ep1
– MCM_TRUNK
• LOCAL_IP
– MCM_TRUNK
– MCM_ENDPOINT_IP ep1
– MCM_ENDPOINT_IP ep2
• BORDER_IP
– MCM_ENDPOINT_IP
– Remote SDP
• VIRT
– MCM_ENDPOINT
• LOOP
– MCM_ENDPOINT
– MCM_SPEC – Has 3 uses.
– It is a TM_CKT used by the RTC
– Every MCM_LINK has its own definition in an MCM_SPEC
– defines the type of a circuit
• Flag – the flag determines which data in the spec is valid. These flags are
some times ORed to represent more than one thing.
– Type MCM_SPEC_TYPE_LINK ( a TDM circuit)
» Spec.link is valid data
– MCM_SPEC_TYPE_IP (no SDP)
» No data is used
» pSpec.pTG is valid for outgoing ckts
– MCM_SPEC_TYPE_SDP
» Spec.pSDP is valid
– MCM_SPEC_CAPABILITY
» Spec.CAP is a valid data
– MCM_SPEC_TYPE_CONTEXT
» The context is already allocated for this endpoint in the MG. so
mcm_context is valid.
– MCM_SPEC_TYPE_ADDRESS
» Used for special purposes to dictate the path selection.
• Cap – represents the capability needed to be examined for path creation.
• MCM_LINK
• MCM_CONTEXT
• SDP
• MCM_NODE
• TG
• MCM_CONTEXT – Media flows from link to link. And in conference applications, from one link to multiple links.
This implies, media is transferred between the endpoints in a node. A context groups all such endpoints.
– state
– MCM_ENDPOINT ep1
– MCM_ENDPOINT ep2
– MCM_MEDIA_CTXT
• MCM_ENDPOINT – Actual endpoints on the local nodes that deal with the media streams.
• Type IP
– Port
– SDP
• Type OSIM
– Leg count
– SDP
• Type CKT
– String id
– Str_id
– MCM_LINK
– MCM_NODE
– MCM_PATH
– MCM_CONTEXT
– Mepid
– State
– Events
– Signals
Media Setup
• Calculate the Edge list
• Create a path from the edge list
1. Create a context for each Local Node in order it appears in the edge
list and add it to path
2. For each context in 1, choose the endpoints from the corresponding
edge in the edge list. This could involve sending media commands to
the LN to get a endpoint to use. Add this endpoint to the context.
Choosing a endpoint in a context may implicitly create a link to the
adjacent context (incase of circuits)
3. Create or update the link with corresponding endpoint from the
previous adjacent context. Also update the ednpoint in the previous
context to which an endpoint in this context has a link.
4. Create a link to the next adjacent context if necessary.
• Media is setup at this point. Signaling may be exchanged with the
Border nodes at the head and tail of the path.
• MCM Interface to CSM/FIM/SERVICES
– MCM_CALL_CTXT
• Call id
• List of MCM_LEG_CTXT
• Call ID
• Event Q
• Curr Event
• Pending Events - in the Legs.
• Resources needed for the media setup
– MCM_LEG_CTXT
• MCM_CALL_CTXT to which it currently belongs
• MCM_SPEC
• MCM_PATH
• State
• Local SDP
• Remote SDP
• Current Event
• Play state
• Leg properties (send/receive/sendreceive/detect-dtmf)
MCM API
• Create Call
– Call ID
• Destroy Call
– Call ID
• Add leg - to a call
– Spec,
– Leg properties
– Callback , cb data
– CALEA params
• Modify leg – MID call SDP change or CODEC changes
– Leg Ctxt
– New SPEC – SDP change or Properties
– Callback , cb data
• Replace leg – with a new spec - For Handoff Scenarios
– Leg Ctxt
– New SPEC – new endpoint ID
• Move leg – From one call to another - Call Waiting cases.
– Old Call id
– Leg Ctxt
– New Call ID
• Remove leg – from a call
– Leg Ctxt
Cont..
• Play Annc/tone
– Leg Ctxt
– Play Spec – this is a list of specs to play a tone/annc with the params
• Type – TONE/ANNC/DIGITS
• Tone
• Annc string
• Digit map
• Duration
• Persistent
• direction
• Cancel Annc
– LegCtxt
• Start Digit Collection
– Leg Ctxt
– Digit Map
• Stop Digit Collection
– Leg Ctxt
TM/MCM: Incoming Leg
CSM RTC TM MCM
CMSR Create call ctxt call id (1)
[MCM_NODE]
from BS1 Get a Circuit ID=1
(1-1-1) Get List of Tgs
CAPABILITY=NONE
to BS (1-1-1) ADDRESS=1-1-1
to BS1 (1-1-1)
[MCM_TRUNK_GROUP]
ID=1
Found TG 1 TYPE=CIRCUITS
SIGNALLING=IS634
LPC=3-3-3
NODE1=1, NODE2=2
200 OK
Add Leg 2 to MCM (cic 1, TG 4) (using FIM)
CRCX 15/9/1 @ sonus1
200 OK – SDP1
200 OK – SDP2
200 OK
Media_setup_complete_cb
CONNECT
Stop ring back tone to originator
RQNT 15/9/1 @ sonus1 ()
200 OK
CLEAR_CMD, (2-2-2)
CLEAR_CMD, (1-1-1)
CLEAR_CMP, (2-2-2)
Apmleg
MCM_LEG MCM_LEG Apmleg
MCM_LINK-BCKT MCM_LINK-BCKT
MCM_CONTEXT
EP_CKT EP_CKT
MEDIA_CTX
VOIP (TDM-IP-TDM) Call setup MGCP
Apmleg
MCM_LEG MCM_LEG Apmleg
MCM_LINK-BCKT MCM_LINK-BCKT
MCM_CONTEXT MCM_CONTEXT
MEDIA_CTX MEDIA_CTX
MCM_LINK – LIP
TDM-TDM setup MEGACO
Apmleg
MCM_LEG MCM_LEG Apmleg
MCM_LINK-BCKT
MCM_LINK -BCKT
MCM_CONTEXT MCM_CONTEXT
MEDIA_CTX
EP_CKT EP_CKT
EP_VIRT EP_VIRT
MCM_LINK - VIRT MCM_LINK - VIRT
3 Way Call setup With MEGACO
MCM_CALL
MEDIA_CTX
3way Call setup With MRP
MCM_CALL
MCM_LEG
MCM_LEG MCM_LEG
MCM_SPEC MCM_PATH
MCM_SPEC
MCM_SPEC MCM_PATH MCM_PATH
MCM_LINK – LIP
MCM_LINK – LIP
MCM_LINK - LOOP
MCM_LINK - LOOP
Events handling in MCM
• The operations are all addressed to a MCM_CALL or MCM_LEG in
a particular call.
• If there is some operation already being executed on the call, these
operations are queued up in the Call ctxt and are executed in a
serial order. Only exception being for cancellation of a tone/annc or
rmleg which get preference.
• As each of the operations require message exchange with the MG,
they could return PENDING status in which case a user provided
callback is called when the operation is complete.
• There is a similar Q maintained in the MCM_LEG_CTXT used to
play simultaneous different annc/tone to the legs in the call. In this
case, any further operations on the leg are stored at the call_ctxt
until the leg’s play is finished or cancelled.
Additional features supported
• CALEA
– The Calea parameters are specified while
adding a leg ctxt.
– A CALEA capable resource is added to the
call if any of the legs are tapped. Ex a MRP.
– There is a additional topology parameter is
sent along with the CRCX/MDCX messages
to the MG. For MRP this is specified in a
proprietary parameter in the local connection
options.
TM/MCM: Outgoing Leg- isup
CSM RTC TM MCM
[MCM_TRUNK_GROUP]
Get a Circuit ID=6
to 978123 FIXED_PRIORITY { 6 } TYPE=CIRCUITS
"9781234567" SIGNALLING=ISUP
LPC=3-3-3
Found TG 6 NODE1=8, NODE2=3
[MCM_LINK]
Allocate a circuit on TG 6 GROUP=6
TRUNK=1
BORDER_NODE=8
Allocated CIC 1, TG 6 CIC=1
LOCAL_NODE=3
CIC 1, TG 6 ENDPOINT=15/8/1@sonus2
Allocate a circuit on TG 7
Allocated IPCkt TG 7
Alloced IPCkt TG7