From 292e2cddd02f2e1ca75e9efedd73389d72a549d6 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 24 Mar 2016 17:35:42 +0100 Subject: [PATCH] mncc: Extract the RTP port information before continuing These need to be used by the SIP leg to move forward. --- src/call.h | 8 ++++++++ src/mncc.c | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/call.h b/src/call.h index 67dbf91..d1dbacc 100644 --- a/src/call.h +++ b/src/call.h @@ -34,6 +34,14 @@ struct call_leg { int type; struct call *call; + /** + * RTP data + */ + uint32_t ip; + uint16_t port; + uint32_t payload_type; + uint32_t payload_msg_type; + /** * Set by the call_leg implementation and will be called * by the application to release the call. diff --git a/src/mncc.c b/src/mncc.c index 907384f..ed2d065 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -192,9 +192,17 @@ static void check_rtp_create(struct mncc_connection *conn, char *buf, int rc) return mncc_send(conn, MNCC_REJ_REQ, rtp->callref); } + /* extract information about where the RTP is */ + leg->base.ip = rtp->ip; + leg->base.port = rtp->port; + leg->base.payload_type = rtp->payload_type; + leg->base.payload_msg_type = rtp->payload_msg_type; + /* TODO.. now we can continue with the call */ LOGP(DMNCC, LOGL_DEBUG, - "RTP set-up continuing with call with leg(%u)\n", leg->callref); + "RTP cnt leg(%u) ip(%u), port(%u) pt(%u) ptm(%u)\n", + leg->callref, leg->base.ip, leg->base.port, + leg->base.payload_type, leg->base.payload_msg_type); stop_cmd_timer(leg, MNCC_RTP_CREATE); continue_call(leg); }