FreeCalypso > hg > themwi-system-sw
diff mtctest/sig_handler.c @ 213:55ad0f4bb33c
themwi-test-mtc: print SDP emitted by new OsmoMSC
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 25 Jun 2023 14:16:53 -0800 |
parents | c8e9b295e88f |
children |
line wrap: on
line diff
--- a/mtctest/sig_handler.c Sun May 21 15:45:52 2023 -0800 +++ b/mtctest/sig_handler.c Sun Jun 25 14:16:53 2023 -0800 @@ -157,6 +157,26 @@ } static void +print_sdp(sdp) + char *sdp; +{ + char *cp, *ep, *np; + + for (cp = sdp; *cp; cp = np) { + ep = index(cp, '\n'); + if (ep) { + *ep = '\0'; + np = ep + 1; + } else + np = 0; + ep = index(cp, '\r'); + if (ep) + *ep = '\0'; + printf("%s %s\n", cp == sdp ? "SDP:" : " ", cp); + } +} + +static void send_connect_ack() { struct gsm_mncc ack; @@ -223,16 +243,19 @@ case MNCC_SETUP_CNF: printf("MNCC_SETUP_CNF: call is answered\n"); print_fields(msg); + print_sdp(msg->sdp); send_rtp_connect(); send_connect_ack(); return; case MNCC_CALL_CONF_IND: printf("MNCC_CALL_CONF_IND: call is confirmed\n"); print_fields(msg); + print_sdp(msg->sdp); return; case MNCC_ALERT_IND: printf("MNCC_ALERT_IND: call is alerting\n"); print_fields(msg); + print_sdp(msg->sdp); return; case MNCC_NOTIFY_IND: printf("NNCC_NOTIFY_IND: NOTIFY byte from MS: 0x%02X\n", @@ -332,6 +355,7 @@ printf("MNCC_RTP_CREATE: RTP info from MSC\n"); printf("payload_type=0x%x payload_msg_type=0x%x\n", msg->payload_type, msg->payload_msg_type); + print_sdp(msg->sdp); return; case MNCC_RTP_CONNECT: printf("MNCC_RTP_CONNECT: error response\n");