YepSBC controls media through rtpengine, using its control protocol. The SBC decides per call what each side gets, and rtpengine carries the RTP and does any encryption work.
Anchoring
When media.anchor is set in the plan, the SDP offer and answer are rewritten by rtpengine so that RTP flows through the media engine on both legs. Without anchoring the SDP passes through untouched. Encryption changes, WebRTC interworking and recording need anchoring.
Two lab engines exist for testing without rtpengine. One rewrites SDP in process and one passes it through. Production uses rtpengine.
If the media engine is unreachable, new calls fail with 503. Established calls continue.
Codec policy
The plan lists allowed_codecs. YepSBC filters the offer to those codecs and always keeps telephone-event for DTMF. If no common codec remains, the caller receives 488. DTMF handling is chosen per call.
YepSBC filters codecs. It does not transcode between them.
SRTP
The plan sets an SRTP policy for each side independently.
| Side | Value | Effect |
|---|---|---|
| Ingress | allow | The caller keeps whatever it offered (default) |
| Ingress | require | A plain RTP offer is rejected with 488 |
| Ingress | reject | An SRTP offer is rejected with 488 |
| Egress | transparent | The callee is offered the caller's profile (default) |
| Egress | rtp, sdes, dtls | The callee is offered that profile |
| Egress | webrtc | DTLS-SRTP with ICE and RTCP multiplexing, for a browser callee |
The route request reports what the caller offered, so the decision service can apply a rule such as "encrypt towards carriers that accept it". Each CDR records the media profile used on each leg.
WebRTC
A browser connects over secure WebSocket and negotiates DTLS-SRTP with ICE. rtpengine acts as the ICE agent and converts between the browser's media profile and plain RTP or SRTP towards SIP peers. The SBC recognises a WebRTC offer and reports it to the decision service, which chooses the egress profile.
- A STUN server on the SBC lets browsers discover their reflexive address.
- For TURN, YepSBC does not relay media. It issues time-limited credentials for a relay you operate, through the management API. Your web application fetches them with the management token and passes them to the browser, which never sees the token.
- Trickle ICE is not supported. Browsers must send complete candidates in their offer, which they do for audio.
Media supervision
The plan can set an RTP inactivity timeout. A call whose media stops is ended with a media timeout reason. When the call ends the SBC collects RTP statistics from rtpengine and writes packet counts, loss, jitter and an estimated MOS into the CDR.
SIPREC recording
A plan can request recording with a list of session recording servers:
"recording": {"enabled": true, "srs": ["sip:srs1.example.com:5060", "sip:srs2.example.com:5060"], "required": false}
Once the call is established, the SBC acts as the recording client of RFC 7866. It takes a copy of both parties' streams from the media engine and offers them to the first server in an INVITE with a multipart body: the SDP with two labelled send-only streams and the RFC 7865 metadata naming the call and both participants. A server that refuses is followed by the next one. The recording session ends with the call.
With required set, the call is ended if no server accepts or if the server hangs up the recording session. Otherwise the call continues unrecorded. The CDR carries a recording block with the outcome and the call events report the start, failure and stop of the recording.
The metadata is sent once, at the start of the session. Participants changed by a later transfer are not reported to the server.
Related
Plans are described in The decision API. Established calls with media survive a node failure as described in High availability.