FreeCalypso > hg > themwi-system-sw
diff sip-in/invite.c @ 104:ce3b1db7d1d7
sip-in: force-pcma-codec config option to use PCMA when both are offered
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 27 Sep 2022 21:52:07 -0800 |
parents | fe39404092d9 |
children | 372209628038 |
line wrap: on
line diff
--- a/sip-in/invite.c Mon Sep 26 20:46:19 2022 -0800 +++ b/sip-in/invite.c Tue Sep 27 21:52:07 2022 -0800 @@ -24,6 +24,7 @@ extern struct in_addr sip_bind_ip; extern unsigned sip_bind_port; extern int cfg_use_100rel; +extern int cfg_force_pcma; extern struct call *call_list; extern struct call *find_call_by_sip_id(); @@ -210,13 +211,15 @@ } switch (sdp_parse.codec_mask) { case SDP_CODEC_MASK_PCMU: - case SDP_CODEC_MASK_BOTH: use_pcma = 0; break; case SDP_CODEC_MASK_PCMA: case SDP_CODEC_MASK_BOTH | SDP_CODEC_MASK_PCMA_PREF: use_pcma = 1; break; + case SDP_CODEC_MASK_BOTH: + use_pcma = cfg_force_pcma; + break; default: start_response_out_msg(&resp, "488 Unsupported codec selection");