CUBE Transcoding on the SPA DSP Voice Card
CUBE (SBC) transcoding can be done using the SPA DSP services on the SPA DSP card. The SPA DSP card contains digital signal processors and related hardware that provide voice transcoding capability for service providers and enterprise businesses.
Transcoding is the process of translating one type of media stream or codec into another type of media stream or codec. For example, PCMU into G.726-32.
Transcoding is triggered by a response from the callee endpoint, indicating that none of the codecs in the initial request are acceptable. Responses that trigger transcoding are as follows:
•415 - Unsupported media type (SIP)
•488 - Not acceptable here (SIP)
•65 - Bearer Capability not implemented disconnect cause value (H.323)
When transcoding is triggered, the SBE places a transcoder in the media path between the incoming and outgoing DBEs. The SBE then sends a new request to the callee, with a new codec type generated by the transcoder. The SBE may have to iterate through the list of codecs until it finds one that the callee accepts. Once a codec is found that is accepted by the callee, the call is connected and media transmission begins.
This example shows how to configure CUBE Transcoding on the SPA DSP Voice Card. Each segment of the example is explained below.
Transcoding Configuration
In the transcoding segment of the example, the voice-card command specifies the slot number of the SPA DSP voice card and enters the voice card interface configuration mode.
The dspfarm profile command enables the DSP farm service for the specified DSP farm profile, enables transcoding, and enters DSP farm profile configuration mode. After the dspfarm profile command, the valid codecs are listed. The codec list must contain codecs that the SBE is hard-coded to recognize.
Interface Configuration
The interface segment configure the SBC interface, establishes 23.30.1.101 as the primary address, and configures two secondary addresses.
SBC SBE Configuration
Configures the SBC, SBE, and associates the dspfarm profile.
Adjacency Configuration
Configures the Nav_A and Nav_B adjacencies.
Call Policy: Adjacency Connection
Establishes the connection between the Nav_A and Nav_B adjacencies.
CAC Table: Codec Enforcement
(Optional) Enforces which codecs each side of the call is allowed to use.
Transcoding CUBE on the SPA DSP Voice Card (in Segments)
Transcoding Configuration
dspfarm profile 20 transcode
associate application sbc
Interface Configuration
ip address 23.30.1.1 255.255.255.255 secondary
ip address 23.30.1.10 255.255.255.0 secondary
ip address 23.30.1.101 255.255.255.0
SBC SBE Configuration
associate dspfarm profile 20
Adjacency 1 Configuration
inherit profile preset-access
signaling-address ipv4 23.30.1.1
statistics method summary
remote-address ipv4 23.31.0.0 255.255.0.0
Adjacency 2 Configuration
signaling-address ipv4 23.30.1.1
statistics method summary
remote-address ipv4 23.32.0.0 255.255.0.0
Call Policy: Establish Connection Between Adjacencies
first-call-routing-table ROUTE-ON-DEST-NUMB
rtg-dst-address-table ROUTE-ON-DEST-NUMB
match-address 91939 digits
match-address 40852 digits
call-policy-set default 1
media-address ipv4 23.30.1.10
port-range 10000 64000 any
CAC Table: Enforce Codecs for Caller and Callee
first-cac-table Transcode
first-cac-scope dst-adjacency
Transcoding CUBE on the SPA DSP Voice Card (for Copy and Paste)
dspfarm profile 20 transcode
associate application sbc
ip address 23.30.1.1 255.255.255.255 secondary
ip address 23.30.1.10 255.255.255.0 secondary
ip address 23.30.1.101 255.255.255.0
associate dspfarm profile 20
inherit profile preset-access
signaling-address ipv4 23.30.1.1
statistics method summary
remote-address ipv4 23.31.0.0 255.255.0.0
signaling-address ipv4 23.30.1.1
statistics method summary
remote-address ipv4 23.32.0.0 255.255.0.0
first-call-routing-table ROUTE-ON-DEST-NUMB
rtg-dst-address-table ROUTE-ON-DEST-NUMB
match-address 91939 digits
match-address 40852 digits
call-policy-set default 1
media-address ipv4 23.30.1.10
port-range 10000 64000 any
first-cac-table Transcode
first-cac-scope dst-adjacency
Transcoding CUBE on the SPA DSP Voice Card (with CLI Prompts)
Router(config)# voice-card 0/0
Router(config-voicecard)# dsp services dspfarm
Router(config-voicecard)# exit
Router(config)# dspfarm profile 20 transcode
Router(config-dspfarm-profile)# codec g711ulaw
Router(config-dspfarm-profile)# codec g711alaw
Router(config-dspfarm-profile)# codec g729r8
Router(config-dspfarm-profile)# codec g729ar8
Router(config-dspfarm-profile)# codec g729br8
Router(config-dspfarm-profile)# codec g729abr8
Router(config-dspfarm-profile)# codec pass-through
Router(config-dspfarm-profile)# rsvp
Router(config-dspfarm-profile)# maximum sessions 5
Router(config-dspfarm-profile)# associate application sbc
Router(config-dspfarm-profile)# no shutdown
Router(config-dspfarm-profile)# exit
Router(config)# interface SBC1
Router(config-int)# ip address 23.30.1.1 255.255.255.255 secondary
Router(config-int)# ip address 23.30.1.10 255.255.255.0 secondary
Router(config-int)# ip address 23.30.1.101 255.255.255.0
Router(config)# sbc My_SBC
Router(config-sbc-sbe)# adjacency sip Nav_A
Router(config-sbc-sbe-adj-sip)# inherit profile preset-access
Router(config-sbc-sbe-adj-sip)# preferred-transport udp
Router(config-sbc-sbe-adj-sip)# signaling-address ipv4 23.30.1.1
Router(config-sbc-sbe-adj-sip)# statistics method summary
Router(config-sbc-sbe-adj-sip)# signaling-port 5060
Router(config-sbc-sbe-adj-sip)# $address ipv4 23.31.0.0 255.255.0.0
Router(config-sbc-sbe-adj-sip)# signaling-peer 23.31.1.2
Router(config-sbc-sbe-adj-sip)# attach
Router(config-sbc-sbe-adj-sip)# exit
Router(config-sbc-sbe)# adjacency sip Nav_B
Router(config-sbc-sbe-adj-sip)# nat force-off
Router(config-sbc-sbe-adj-sip)# preferred-transport udp
Router(config-sbc-sbe-adj-sip)# signaling-address ipv4 23.30.1.1
Router(config-sbc-sbe-adj-sip)# statistics method summary
Router(config-sbc-sbe-adj-sip)# signaling-port 5060
Router(config-sbc-sbe-adj-sip)# remote-address ipv4 23.32.0.0 255.255.0.0
Router(config-sbc-sbe-adj-sip)# signaling-peer 23.32.1.2
Router(config-sbc-sbe-adj-sip)# account Nav_B
Router(config-sbc-sbe-adj-sip)# attach
Router(config-sbc-sbe-adj-sip)# exit
Router(config-sbc-sbe)# call-policy-set 1
Router(config-sbc-sbe-rtgpolicy)# first-call-routing-table ROUTE-ON-DEST-NUMB
Router(config-sbc-sbe-rtgpolicy)# rtg-dst-address-table ROUTE-ON-DEST-NUMB
Router(config-sbc-sbe-rtgpolicy-rtgtable)# entry 1
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# action complete
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# dst-adjacency Nav_A
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# match-address 91939 digits
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# prefix
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# entry 2
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# action complete
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# dst-adjacency Nav_B
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# match-address 40852 digits
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# prefix
Router(config-sbc-sbe-rtgpolicy-rtgtable-entry)# complete
Router(config-sbc-sbe-rtgpolicy)# call-policy-set default 1
Router(config-sbc-sbe)# media-address ipv4 23.30.1.10
Router(config-sbc-sbe)# exit
Router(config-sbc)# port-range 10000 64000 any
Router(config-sbc)# activate
Router(config-sbc-sbe)# cac-policy-set 1
Router(config-sbc-sbe-cacpolicy)# first-cac-table Transcode
Router(config-sbc-sbe-cacpolicy)# first-cac-scope dst-adjacency
Router(config-sbc-sbe-cacpolicy)# cac-table Transcode
Router(config-sbc-sbe-cacpolicy-cactable)# table-type policy-set
Router(config-sbc-sbe-cacpolicy-cactable)# entry 1
Router(config-sbc-sbe-cacpolicy-cactable-entry)# cac-scope call
Router(config-sbc-sbe-cacpolicy-cactable-entry)# caller-codec-list sideA
Router(config-sbc-sbe-cacpolicy-cactable-entry)# callee-codec-list sideB
Router(config-sbc-sbe-cacpolicy-cactable-entry)# cac-policy-set global 1
Router(config-sbc-sbe)# codec list sideA
Router(config-sbc-sbe-codec-list)# codec PCMA
Router(config-sbc-sbe-codec-list)# codec list sideB
Router(config-sbc-sbe-codec-list)# codec G729
Router(config-sbc-sbe-codec-list)# exit
Transcoding CUBE in VDBE mode on SPA DSP Voice Card
The following example shows how to configure CUBE transcoding in Virtual Data Border Element (VDBE) mode on the SPA DSP Voice Card. The VDBE is a resource partition within the DBE and functions as a media gateway. Each VDBE is controlled by a separate SBE using the H.248 (Megaco) protocol. VDBE is used only in distributed model of CUBE.
Transcoding Configuration
The Transcoding Configuration is the same as the other examples in this module.
SBC DBE Configuration
This segment configures the H.248 (Megaco) protocol, including the H.248 timers and controllers.
The control-address is the IP address of CUBE (SBC).
The remote-address is the IP address of the media gateway (VDBE).
Transcoding CUBE in VDBE mode on SPA DSP Voice Card (in Segments)
Transcoding Configuration
dspfarm profile 20 transcode
associate application sbc
SBC DBE Configuration
associate dspfarm profile 20
h248-inactivity-duration 3000
no h248-media-alert-event
package segment seg-timer-value 5000
control-address h248 ipv4 23.52.1.2
control-dscp af11 marker-dscp af12 pdr-coefficient 300
remote-address ipv4 23.52.1.3
media-address pool ipv4 23.53.1.1 23.53.1.10
port-range 10000 59000 any
Transcoding CUBE in VDBE mode on SPA DSP Voice Card (for Copy and Paste)
Transcoding Configuration
dspfarm profile 20 transcode
associate application sbc
SBC DBE Configuration
associate dspfarm profile 20
h248-inactivity-duration 3000
no h248-media-alert-event
package segment seg-timer-value 5000
control-address h248 ipv4 23.52.1.2
control-dscp af11 marker-dscp af12 pdr-coefficient 300
remote-address ipv4 23.52.1.3
media-address pool ipv4 23.53.1.1 23.53.1.10
port-range 10000 59000 any
Transcoding CUBE in VDBE mode on SPA DSP Voice Card (with CLI Prompts)
Transcoding Configuration
Router(config)# voice-card 1/0
Router(config-voicecard)# no dspfarm
Router(config-voicecard)# dsp services dspfarm
Router(config-voicecard)# exit
Router(config)# dspfarm profile 20 transcode
Router(config-dspfarm-profile)# codec g711ulaw
Router(config-dspfarm-profile)# codec g711alaw
Router(config-dspfarm-profile)# codec g729r8
Router(config-dspfarm-profile)# codec g729ar8
Router(config-dspfarm-profile)# codec g729br8
Router(config-dspfarm-profile)# codec g729abr8
Router(config-dspfarm-profile)# codec pass-through
Router(config-dspfarm-profile)# vrsvp
Router(config-dspfarm-profile)# maximum sessions 5
Router(config-dspfarm-profile)# associate application sbc
SBC DBE Configuration
Router(config)# sbc My_SBC dbe
Router(config-sbc-dbe)# associate dspfarm profile 20
Router(config-sbc-dbe)# vdbe global
Router(config-sbc-dbe-vdbe)# h248-inactivity-duration 3000
Router(config-sbc-dbe-vdbe)# no h248-media-alert-event
Router(config-sbc-dbe-vdbe)# tmax-timer 30
Router(config-sbc-dbe-vdbe)# package segment seg-timer-value 5000
Router(config-sbc-dbe-vdbe)# h248-association-timeout
Router(config-sbc-dbe-vdbe)# transaction-pending 10
Router(config-sbc-dbe-vdbe)# h248-preserve-gates
Router(config-sbc-dbe-vdbe)# local-port 2944
Router(config-sbc-dbe-vdbe)# control-address h248 ipv4 23.52.1.2
Router(config-sbc-dbe-vdbe)# control-dscp af11 marker-dscp af12 pdr-coefficient 300
Router(config-sbc-dbe-vdbe)# controller h248 1
Router(config-sbc-dbe-vdbe-h248)# remote-address ipv4 23.52.1.3
Router(config-sbc-dbe-vdbe-h248)# attach-controllers
Router(config-sbc-dbe-vdbe-h248)# exit
Router(config-sbc-dbe-vdbe)# deactivation-mode abort
Router(config-sbc-dbe-vdbe)# exit
Router(config-sbc-dbe)# location-id 1
Router(config-sbc-dbe)# media-address pool ipv4 23.53.1.1 23.53.1.10
PE43_ASR-1002(config-sbc-dbe)# port-range 10000 59000 any
PE43_ASR-1002(config-sbc-dbe)# media-timeout 10
PE43_ASR-1002(config-sbc-dbe)# activate
PE43_ASR-1002(config-sbc-dbe)# exit
Show Commands for Verifying Transcoding
The following show commands are available to verify your transcoding configurations.
•Verify Profile is Associated
•Verify Active Call
•Verify DSP Status
•Verify DSP Statistics
•Verify DSP Resources are Freed from Active List
•Verify Call Statistics
•Verify Media-Flow Status
Verify Profile is Associated
Use the show dspfarm profile command to verify that the DSPFARM Profile is associated.
Router# show dspfarm profile
Dspfarm Profile Configuration
Profile ID = 1, Service = TRANSCODING, Resource ID = 1
Profile Service Mode : Non Secure
Profile Operation State : ACTIVE
Application : SBC Status : ASSOCIATED
Resource Provider : FLEX_DSPRM Status : UP
Number of Resource Configured : 700
Number of Resource Available : 700
Codec : g711alaw, Maximum Packetization Period : 30
Codec : g711ulaw, Maximum Packetization Period : 30
Codec : g729ar8, Maximum Packetization Period : 60
Verify Active Call
Use the show sbc sbe calls command to verify that the DSPFARM Profile is associated.
Router# show sbc snow sbe calls
Call State Src Adjacency Dest Adjacency
---------------------------------------------------------------
Verify DSP Status
Use the show dspfarm dsp active command to verify DSP Status.
Router# show dspfarm dsp active
SLOT DSP VERSION STATUS CHNL USE TYPE RSC_ID BRIDGE_ID PKTS_TXED PKTS_RXED
2 1 26.2.0 UP 1 USED xcode 1 0x3 0 5
2 1 26.2.0 UP 1 USED xcode 1 0x4 0 0
Total number of DSPFARM DSP channel(s) 1
Verify DSP Statistics
Use the show dspfarm dsp stats command to verify DSP Statistics.
Router# show dspfarm dsp stats 3
Bridge-id=0x3 Call-id=0x2
tx_pak_side_a=3053518848 tx_silence_pak_side_a=0 tx_dur_side_a=1748172800
voice_tx_dur_side_a=1748172800 rtp_time_stamp_side_a=1336854017 rx_pak_side_a=46849
rx_silence_pak_side_a=0 rx_dur_side_a=1915944960 voice_rx_dur_side_a=1915944960
passthrough_rx_side_a=0 passthrough_discard_side_a=0 num_out_of_seq_side_a=0
num_bad_head_side_a=0 num_pak_late_side_a=0 num_pak_early_side_a=50331648
rx_delay_side_a=973078528 prec_conc_dur_side_a=0 silence_conc_dur_side_a=0
buf_over_dur_side_a=167772160 end_errors_side_a=0
tx_pak_side_b=3053518848 tx_silence_pak_side_b=0 tx_dur_side_b=1748172800
voice_tx_dur_side_b=1748172800 rtp_time_stamp_side_b=3215836673 rx_pak_side_b=46849
rx_silence_pak_side_b=0 rx_dur_side_b=1915944960 voice_rx_dur_side_b=1915944960
passthrough_rx_side_b=0 passthrough_discard_side_b=0 num_out_of_seq_side_b=0
num_bad_head_side_b=0 num_pak_late_side_b=0 num_pak_early_side_b=83886080
rx_delay_side_b=1006632960 prec_conc_dur_side_b=0 silence_conc_dur_side_b=0
buf_over_dur_side_b=167772160 end_errors_side_b=0
Verify DSP Resources are Freed from Active List
Use the show dspfarm dsp active command to verify that DSP resources are freed from the active list.
Router# show dspfarm dsp active
SLOT DSP VERSION STATUS CHNL USE TYPE RSC_ID BRIDGE_ID PKTS_TXED PKTS_RXED
Total number of DSPFARM DSP channel(s) 0
To validate packet delay/jitter/loss using Wireshark, you may need to configure the vad off override command, in the dspfarm profile in the transcoding configuration segment, to prevent comfort noise generation, which is active by default. This is dependent on the type of media stream in use. For example, if the media stream contains many long gaps of silence, comfort noise may be generated and total amount of RTP packets may vary.
dspfarm profile 20 transcode
associate application sbc
Verify Call Statistics
Use the show sbc sbe call-stats global command to verify call statistics.
Router# show sbc snow sbe call-stats global current5min
Statistics for the current 5 mins for global counters
Total active IPv6 calls = 0
Total activating calls = 0
Total de-activating calls = 0
Total IMS rx active calls = 0
Total IMS rx call renegotiation attempts = 0
Total SRTP-RTP interworked calls = 0
Total active calls not using SRTP = 1
Total transcoded calls = 1
Total transrated calls = 0
General call failure counters:
Total call setup failures = 0
Total active call failures = 0
Total failed call attempts = 0
Total failed calls due to update failure = 0
Total failed calls due to resource failure = 0
Total failed calls due to congestion = 0
Total failed calls due to media failure = 0
Total failed calls due to signaling failure = 0
Total failed calls due to IMS rx setup failure = 0
Total failed calls due to IMS rx renegotiation failure = 0
Total failed calls due to RTP disallowed on call leg = 0
Total failed calls due to SRTP disallowed on call leg = 0
Call setups failed due to NA = 0
Call setups failed due to RTG = 0
Call setups failed due to CAC = 0
CAC fails due to number of calls limit = 0
CAC fails due to call rate limit = 0
CAC fails due to bandwidth limit = 0
CAC fails due to number of media channels limit = 0
CAC fails due to number of media update limit = 0
CAC message drops due to mid call message rate limit = 0
CAC message drops due to out of call message rate limit = 0
Verify Media-Flow Status
Use the show sbc dbe media-flow-stats summary command to verify call statistics.
Router# show sbc My_SBC dbe media-flow-stats summary
Context ID 28 Stream ID 1
Side A: Name ip/385 Media Flowing: Yes
Local Address/Port: 143.5.4.1/10108
Remote Address/Port: 143.10.1.1/10156
Side B: Name ip/386 Media Flowing: Yes
Local Address/Port: 143.5.4.1/10110
Remote Address/Port: 143.11.1.1/10156
Context ID 29 Stream ID 1