We were incorrectly parsing usernames and domains starting with "sip"
if there was no sip: or sips: scheme in the string.
We were also incorrectly parsing usernames containing a colon even if
a scheme was given.
This also refactors the function for hopefully greater clarity.
In commit 7efeabbd88e81ee368de6ced32fed06c8035097b Anthony fixed the
handling of sip:example.com and sips:example.com URLs, however he
introduced a regression causing URLs starting with 's' to be parsed
incorrectly.
In commit 7d2456ea27c092825c8d614ac6eee71547374464 Brian fixed the
regression, but introduced a regression causing sips:example.com URLs
to be handled incorrectly.
Originally we did the same thing with SRTP that we do without SRTP,
which is to simply not send packets when e.g. sleep is called.
At commits d63323977fa611b141441f12af9a94ec19b5f829 and
5259814aee16ede974456490a79e8a98de1d6d2e we enabled sending silence
packets with comfort noise when SRTP is active. We appear to have
done this for interop purposes; many devices can't handle gaps in the
stream of SRTP packets.
But our current comfort noise implementation doesn't take the codec
rate into account (FS-6291), so on 16kHz codecs the constant we chose
created an annoying level of static between sound file playback.
With this commit we preserve the sending of SRTP packets during idle
periods, but make those packets completely silent.
Thanks-to: Anthony Minessale <anthm@freeswitch.org>
FS-5053 --resolve
Unlike fread(3), read(3) will return -1 on error. We were assigning
the result of read to a potentially unsigned variable, and passing the
result down to switch_xml_parse_str() where it would end up
determining how many bytes to malloc(3).
rtp_secure_media=true
--inbound: Accept the srongest supported offered crypto suite, MUST result in a negotiated crypto or aborts.
--outbound: offer all supported crypto suites, MUST result in a negotiated crypto or aborts.
rtp_secure_media=optional
--inbound: Accept the srongest supported offered crypto suite, fall back to no crypto if no valid ones accepted.
--outbound: offer all supported crypto suites, OPTIONAL result in a negotiated crypto falls back to no crypto.
rtp_secure_media=<suite1>,<suiteN>
--inbound: same behaviour as rtp_secure_media=true with smaller set of acceptable suites.
--outbound: offer supplied crypto suites, same behaviour as rtp_secure_media=true with smaller set of suites.
Can be enabled with 'queue-capacity' param
Cdrs can be pushed to the queue and posted in a separate
thread to avoid bllocking the session with a slow web server