Skip to content

SBC Module Sample Config Trancode

linhtn121 edited this page Nov 8, 2016 · 2 revisions

ELEMENTS:

Server:

  • OPENSIPS 1 - 118.69.247.111

  • OPENSIPS 2 - 118.69.247.333

  • SEMS - 118.69.247.222

Client:

  • USER 1: Linphone Android - registered to OPENSIPS 1, using only pcma codec

  • USER 2: Linphone iOS- registered to OPENSIPS 2, using only speex codec

Map:

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

/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: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=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:$tU@118.69.247.111:5060

From=sip:$fU@118.69.247.111

To=sip:$tU@118.69.247.111

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