ConstBuilds a phone, SIP, or stream destination from a string.
sip: and sips: stay on the endpoint and can be used for from or to.
stream: is removed. phone: is removed.
Any other value, including a bare number such as 76367472, is a phone destination and is kept as is.
Voice relay is not built here; it requires ttsVoice and sttLanguage.
Sets stream.endpoint. Pass a string, or a StreamDetails.
Voice and language belong on Destination.voiceRelay.
Destination factories for Voice v2 call
toandfromvalues.of('sip:')andof('sips:')return a SipEndpoint withtypeandendpointonly. Endpoint strings are copied as given.siptakes a SipDetails.sipFromtakes a SipFromDetails.