OneContact SIP Cloud - OneMedia

OneMedia performs audio call recording, conferences and listen-in operations.

 

Functions

  • Recording – records audio calls into standard wav files, by bridging the two audio streams.
  • Conference  -allows confernce calls with n participatns
  • Listen-in – a third party is able to listen to an established call without being detected.
  • Audio transcoding between G.711 and G.729, iLBC and Speex.
  • Supported audio codecs: G.711 (a-law and µ-law), G.729 annex A, iLBC20 and SpeexNB20.
  • Video and DTMF payloads pass transparently.

 

Relations to other modules

  • OneMedia communicates with CallControl, through OneProxy, using the SIP protocol.
  • OneMedia bridges the RTP streams of the endpoints (Media Gateways, Media Servers, Softphones, etc).
  • OneMedia uses BaseService to retrieve location and configuration information.
  • OneMedia stores the recordings in file storage.

 

 OneMedia.png

 

Performance & Scalability

  • OneMedia scales horizontally by adding more machines to a load balancing SIP farm. The first SIP INVITES go through the load balancer, but the subsequent messages go directly to the physical node that received the first one.
  • The OneMedia CPU usage is affected by the number and type of operations performed (record, conference and listen-in) and the codec used in the RTP streams. G.729 uses more CPU than G.711.
  • The OneMedia memory usage is affected by the number and type of simultaneous operations (record, conference and listen-in).
  • The OneMedia IO usage is affected by the number of concurrent recordings.

 

Redundancy

N + 1 redundancy or failover cluster.

 

Deployment

  • OneMedia can be deployed in Intel x64 or AMD machines running Windows Server 2016.
  • OneMedia is deployed as a windows service.

 

Recording File Format

OneMedia records the audio received from the network in a WAV file with the following characteristics:

Format G.711 with A-law compression
Frequency 8000 Hz
Sample rate 128 Kbps
Channels 2

 

 

The two channels in the recorded file do not represent the normal stereo definition for an audio file. One channel has the audio from one party and the other has the audio from the other party. This behaviour is useful, when troubleshooting audio problems, since it is possible to isolate each party with the appropriate software.

 

Recording

OneMedia2.png

To start a recording using OneMedia, the B2B UA must establish two calls with OneMedia. Each call must be negotiated with a UA to establish a direct RTP communication between OneMedia and the UA. OneMedia will intercept the RTP packets from one UA, record them and then forward them to the other UA.

To start a new recording, it is necessary to establish two SIP calls with OneMedia. Each call is used to send and receive RTP packages with each party (OneMedia’s left and right legs). In the following figure it is possible to see the SIP negotiation with OneMedia.

 

 OneMedia3.png

The first SIP INVITE request (1) must be sent by a B2B UA and must be similar to the following invite: HUGO!!!!!!!!!!!!!!

INVITE sip:media@10.200.10.99:5089;call=<RecordID>;fileName=<record file path> SIP/2.0
From: <sip:554@dev.dt112979.collab:5060>;tag=2b48b2e0-630ac80a-13d8-6006-d076-4c7dea25-d076
To: <sip:media@10.200.10.99:5089>
Call-ID: 2c710d20-630ac80a-13d8-6006-d076-58b9217-d076
CSeq: 1 INVITE
Via: SIP/2.0/UDP 10.200.10.99:5060;branch=z9hG4bKkyA-U!!ce8E!2cskyA-U!UWS8GQg6cI!c.2-277e92a0
Record-Route: <sip:18833520022048762915AOUD@10.200.10.99;lr;dayaRRParam20580168592077376328>
Via: SIP/2.0/UDP 10.200.10.99:5080;branch=z9hG4bK-d076-32e4fe2-58c62269-2a511870
Max-Forwards: 69
Supported: timer,replaces
Contact: <sip:554@10.200.10.99:5080>
Session-Expires: 1800
Min-SE: 300
Allow: INVITE,ACK,CANCEL,BYE,REFER,INFO,UPDATE,MESSAGE,NOTIFY
Content-Length: 0

 

In the SIP data of the INVITE request there are some relevant parameters.

The <RecordID> is an integer that must not be repeated and must be used in the INVITE (6) to associate both SIP calls.

The <record file path> is the full filename path for the record file that OneMedia will create with the call. That path can be a local path or a shared folder (for example C:/Recording/FileName.wav or //dt112979/Recordings/FileName.wav). Note that this path must always have slashes (‘/’) instead of back-slashes (‘\’).

 

OneMedia must respond with Trying (2) and Ringing (3):

SIP/2.0 100 Trying
From: <sip:554@dev.dt112979.collab:5060>;tag=2b48b2e0-630ac80a-13d8-6006-d076-4c7dea25-d076
To: <sip:media@10.200.10.99:5089>
Call-ID: 2c710d20-630ac80a-13d8-6006-d076-58b9217-d076
CSeq: 1 INVITE
Via: SIP/2.0/UDP 10.200.10.99:5060;branch=z9hG4bKkyA-U!!ce8E!2cskyA-U!UWS8GQg6cI!c.2-277e92a0
Via: SIP/2.0/UDP 10.200.10.99:5080;branch=z9hG4bK-d076-32e4fe2-58c62269-2a511870
Supported: timer
Contact: <sip:media@10.200.10.99:5089;call=<RecordID>;fileName=<record file path>
Content-Length: 0


SIP/2.0 180 Ringing
From: <sip:554@dev.dt112979.collab:5060>;tag=2b48b2e0-630ac80a-13d8-6006-d076-4c7dea25-d076
To: <sip:media@10.200.10.99:5089>;tag=1f6f99f8-630ac80a-13e1-45026-d076-4a1f926a-d076
Call-ID: 2c710d20-630ac80a-13d8-6006-d076-58b9217-d076
CSeq: 1 INVITE
Via: SIP/2.0/UDP 10.200.10.99:5060;branch=z9hG4bKkyA-U!!ce8E!2cskyA-U!UWS8GQg6cI!c.2-277e92a0
Via: SIP/2.0/UDP 10.200.10.99:5080;branch=z9hG4bK-d076-32e4fe2-58c62269-2a511870
Supported: timer
Record-Route: <sip:18833520022048762915AOUD@10.200.10.99;lr;dayaRRParam20580168592077376328>
Contact: <sip:media@10.200.10.99:5089; call=<RecordID>;fileName=<record file path>>
Content-Length: 0

 

OneMedia will respond 200 OK (4) with all the supported codecs:

SIP/2.0 200 OK
From: <sip:554@dev.dt112979.collab:5060>;tag=2b48b2e0-630ac80a-13d8-6006-d076-4c7dea25-d076
To: <sip:media@10.200.10.99:5089>;tag=1f6f99f8-630ac80a-13e1-45026-d076-4a1f926a-d076
Call-ID: 2c710d20-630ac80a-13d8-6006-d076-58b9217-d076
CSeq: 1 INVITE
Via: SIP/2.0/UDP 10.200.10.99:5060;branch=z9hG4bKkyA-U!!ce8E!2cskyA-U!UWS8GQg6cI!c.2-277e92a0
Via: SIP/2.0/UDP 10.200.10.99:5080;branch=z9hG4bK-d076-32e4fe2-58c62269-2a511870
Supported: timer
Record-Route: <sip:18833520022048762915AOUD@10.200.10.99;lr;dayaRRParam20580168592077376328>
Contact: <sip:media@10.200.10.99:5089>
Session-Expires: 1800;refresher=uas
Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,INFO,UPDATE
Content-Type: application/sdp
Content-Length: 337


v=0
o=OneMedia 1 1 IN IP4 10.200.10.99
s=Collab SDP
c=IN IP4 10.200.10.99
t=0 0
m=audio 18850 RTP/AVP 18 0 8 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
m=video 18240 RTP/AVP 34
a=rtpmap:34 H263/90000
a=fmtp:34 QCIF=2/MaxBR=520

 

The B2B UA must send an Ack (5) to OneMedia with the SDP of the first client:

ACK sip:media@10.200.10.99:5089 SIP/2.0
From: <sip:554@dev.dt112979.collab:5060>;tag=2b48b2e0-630ac80a-13d8-6006-d076-4c7dea25-d076
To: <sip:media@10.200.10.99:5089>;tag=1f6f99f8-630ac80a-13e1-45026-d076-4a1f926a-d076
Call-ID: 2c710d20-630ac80a-13d8-6006-d076-58b9217-d076
CSeq: 2 ACK
Via: SIP/2.0/UDP 10.200.10.99:5060;branch=z9hG4bKkyA-U!!ce8E!2cskyA-U!UWS8GQg6cI!c.2
Record-Route: <sip:10.200.10.99;lr;dayaRRParam20580168592077376328>
Via: SIP/2.0/UDP 10.200.10.99:5080;branch=z9hG4bK-d076-32e50cf-66a040e1-2a511ac0
Max-Forwards: 69
Contact: <sip:554@10.200.10.99:5080>
Content-Type: application/sdp
Content-Length: 214

v=0
o=OneAgent 28 1 IN IP4 172.18.136.78
s=Collab SDP
c=IN IP4 172.18.136.78
t=0 0
m=audio 17328 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

 

The B2B UA must now establish a new SIP call (6) similar to the INVITE request in (1) with the same <RecordID> and <record file path>.

The SIP messages (7), (8) and (9) are similar to the SIP messages (2), (3) and (4) respectively.

The SIP message (10) must be similar to the SIP message shown in (5) but with the second client’s SDP.

 

Re-Invites to OneMedia

After the recording has been established, OneMedia can receive Re-Invites requests in both legs. Typically OneMedia will respond to the Re-Invite request according to the following flow:

OneMedia4.png

 

When OneMedia receives a Re-Invite (1) in one of the legs without SDP, it will have a different behaviour. It will send a ReInvite in the other leg (3) with a SDP similar to the one received in message (1). OneMedia will not respond to the ReInvite request (1) until it receives the response to the ReInvite (3) represented below with the message (5).

OneMedia5.png

OneMedia will have the same behaviour represented in above if it receives a ReInvite that change their internal state between “mute” and “unmute”.

When OneMedia receives a Re-Invite in one of the legs with a SDP that has the IP of the connection set to “0.0.0.0” it will change his internal state to “mute”, otherwise it will change to “unmute”.