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/src_ipmap.conf

^118.69.247.111=>flow1to333

^118.69.247.333=>flow2to111

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

profiles=flow1to333,flow2to111,refuse

regex_maps=src_ipmap

active_profile=$M($si=>src_ipmap),refuse

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

load_plugins=wav;speex;sbc

application=sbc

FLOWS:

FLOW 1: USER 1 call to USER 2:

USER 1 ----> [OPENSIPS 1 - IP 111] -------> [SEMS - IP 222] -------> [OPENSIPS 2 - IP 333] ----> USER 2

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

RURI=sip:[email protected]:5060

From=sip:[email protected]

To=sip:[email protected]

next_hop=118.69.247.333:5060

enable_rtprelay=yes

enable_transcoder=always

transcoder_codecs=speex/8000,pcma/8000

prefer_existing_codecs=yes

codec_preference=speex/8000,pcma/8000

sdp_filter=whitelist

sdpfilter_list=speex,pcma

FLOW 2: USER 2 call to USER 1:

USER 1 <---- [OPENSIPS 1 - IP 111] <------- [SEMS - IP 222] <------- [OPENSIPS 2 - IP 333] <---- USER 2

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

RURI=sip:[email protected]:5060

From=sip:[email protected]

To=sip:[email protected]

next_hop=118.69.247.111:5060

enable_rtprelay=yes

enable_transcoder=always

transcoder_codecs=pcma/8000,speex/8000

prefer_existing_codecs=yes

codec_preference=pcma/8000,speex/8000

sdp_filter=whitelist

sdpfilter_list=pcma,speex