Change in osmo-msc[master]: call_leg: document the parent_event_* items

Neels Hofmeyr gerrit-no-reply at
Thu May 9 14:25:02 UTC 2019

Neels Hofmeyr has uploaded this change for review. (

Change subject: call_leg: document the parent_event_* items

call_leg: document the parent_event_* items

Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684
M include/osmocom/msc/call_leg.h
M src/libmsc/call_leg.c
2 files changed, 9 insertions(+), 0 deletions(-)

  git pull ssh:// refs/changes/46/13946/1

diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h
index 61107ee..d8380f5 100644
--- a/include/osmocom/msc/call_leg.h
+++ b/include/osmocom/msc/call_leg.h
@@ -34,6 +34,7 @@
 	/* Array indexed by enum rtp_direction. */
 	enum mgcp_connection_mode crcx_conn_mode[2];
+	/* Events dispatched to the parent fi, see call_leg_alloc() doc. */
 	uint32_t parent_event_rtp_addr_available;
 	uint32_t parent_event_rtp_complete;
diff --git a/src/libmsc/call_leg.c b/src/libmsc/call_leg.c
index 1b7db2b..46405bc 100644
--- a/src/libmsc/call_leg.c
+++ b/src/libmsc/call_leg.c
@@ -64,6 +64,14 @@
 	OSMO_ASSERT( osmo_fsm_register(&call_leg_fsm) == 0 );
+/* Allocate a call leg FSM instance as child of an arbitrary other FSM instance.
+ * The call leg FSM dispatches events to its parent FSM instance on specific events:
+ * - parent_event_term: dispatch this to the parent FI when the call leg terminates (call ended, either planned or by
+ *   failure).
+ * - parent_event_rtp_addr_available: one of the rtp_stream instances managed by the call leg has received an RTP
+ *   address from the MGW. The struct rtp_stream instance is passed as data argument for the event dispatch.
+ * - parent_event_rtp_complete: one of the rtp_stream instances entered the RTP_STREAM_ST_ESTABLISHED state.
+ */
 struct call_leg *call_leg_alloc(struct osmo_fsm_inst *parent_fi,
 				uint32_t parent_event_term,
 				uint32_t parent_event_rtp_addr_available,

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib099178a0f6ab218646c67c0e7a3d360c81af684
Gerrit-Change-Number: 13946
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list