Skip to content

SBC Trancoding 3 legs

linhtn121 edited this page Nov 15, 2016 · 3 revisions

ELEMENTS:

Server:

OUTSIDE

  • OPENSIPS O_1 - 118.69.247.222

  • OPENSIPS O_2 - 118.69.247.333

INSIDE:

  • OPENSIPS I_1 - 118.69.247.111

BORDER:

  • SEMS - SBC module - 118.69.247.000

Client:

  • USER 1: Linphone iOS- registered to OPENSIPS I_1, using opus & pcmu codec

  • USER 2: Linphone Android - registered to OPENSIPS O_1, using only pcmu codec

  • USER 3: Linphone iOS- registered to OPENSIPS O_2, using only pcmu codec

MAP:

LINE1: USER 1 <----> [OPENSIPS I_1 - IP 111] <-------> [SBC - IP 000]

LINE2: [SBC - IP 000] <-------> [OPENSIPS O_1 - IP 222] <----> USER 2

LINE3: [SBC - IP 000] <-------> [OPENSIPS O_2 - IP 333] <----> USER 3

/usr/local/etc/sems/etc/rurimap.conf

^9=>flow1to222

^0=>flow2to333

/usr/local/etc/sems/etc/sbc.conf

profiles=flow1to222,flow2to333,refuse

regex_maps=rurimap

active_profile=$M($rh=>rurimap),refuse

/usr/local/etc/sems/sems.conf

load_plugins=wav;opus;sbc

application=sbc

FLOWS:

FLOW 1: USER 1 call to USER 2:

USER 1 ----> [OPENSIPS I_1 - IP 111] -------> [SBC - IP 000] -------> [OPENSIPS O_1 - IP 222] ----> USER 2

/usr/local/etc/sems/etc/flow1to222.sbcprofile.conf

RURI=sip:tU@118.69.247.222:5060

From=sip:$fU@118.69.247.222

To=sip:$tU@118.69.247.222

next_hop=118.69.247.222:5060

enable_rtprelay=yes

enable_transcoder=always

transcoder_codecs=pcmu/8000,opus/48000

prefer_existing_codecs=yes

codec_preference=pcmu/8000,opus/48000

codec_preference_aleg=opus/48000

sdp_filter=whitelist

sdpfilter_list=opus,pcma

FLOW 2: USER 1 call to USER 3:

USER 1 ----> [OPENSIPS I_1 - IP 111] -------> [SEMS - IP 000] -------> [OPENSIPS O_2 - IP 333] ---- >USER 3

/usr/local/etc/sems/etc/flow2to333.sbcprofile.conf

RURI=sip:$tU@118.69.247.333:5060

From=sip:$fU@118.69.247.333

To=sip:$tU@118.69.247.333

next_hop=118.69.247.333:5060

enable_rtprelay=yes

enable_transcoder=always

transcoder_codecs=pcmu/8000,opus/48000

prefer_existing_codecs=yes

codec_preference=pcmu/8000,opus/48000

codec_preference_aleg=opus/48000

sdp_filter=whitelist

sdpfilter_list=opus,pcma