cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3828
Views
5
Helpful
0
Comments

Introduction

In this document we will see how to configure the configurable SIP error codes to override the SIP error code response on CUBE.

In case of Total-call thresold configured using CAC, we just send a "503 service unavailable" response when the threshold is exceeded. Sending a more meaningful response back to the initiating party when a certain CAC threshold is exceeded allows for the initiating party to take appropriate action and makes troubleshooting easier.

In this example we will see how to configure the SIP error codes for CUBE to send " “502 Total Number of Calls Allowed Exceeded” when the total call limit on CUBE is exceeded.

Configuring SIP Error code

1. Configure Error code at the dial-peer level when total-calls are exceeded

The error-code-override command can either be configured globally or under the dial-peer.

Global Configuration 

CUBE(config)#call threshold global total-calls low 1 high 1
CUBE(config)#call treatment on
CUBE(config)#voice service voip
CUBE(conf-voi-serv)#sip
CUBE(conf-serv-sip)#error-code-override ?
cac-bandwidth Status code to be sent for max-bandwidth CAC
call Configure call parameters
cpu Status code to be sent for all cpu threshold
max-conn Status code to be sent for max-conn threshold
mem Status code to be sent for all memory threshold
options-keepalive Status code to be sent for options keepalive
sip-shutdown Status code to be sent for all SIP Shutdown
total-calls Status code to be sent for total call threshold

CUBE(conf-serv-sip)#error-code-override total-calls failure 502

dial-peer voice 100 voip
description *WAN dial-peer to CUBE*
session protocol sipv2
incoming called-number 70247595
voice-class sip error-code-override total-calls failure 502
voice-class sip bind control source-interface GigabitEthernet0/1
voice-class sip bind media source-interface GigabitEthernet0/1
dtmf-relay rtp-nte
codec g711ulaw
no vad

2. SIP response status line modification with SIP Profiles

By default 502 message says “Bad Gateway”. With SIP Profile 4, we are changing the default response status to say “502 Total Number of Calls Allowed Exceeded”

voice class sip-profiles 4
response 502 sip-header SIP-StatusLine modify "(.*)" "502 Total Number of Calls Allowed Exceeded"

3. Apply SIP profile to the inbound WAN dial-peer

Apply SIP Profile 4 to dial-peer 100 as shown below:

CUBE(config)#dial-peer voice 100 voip
CUBE(config-dial-peer)#voice-class sip profiles 4

Dial-peer 100 should look like as below:

dial-peer voice 100 voip
description *WAN dial-peer to CUBE*
session protocol sipv2
incoming called-number 70247595
voice-class sip profiles 4
voice-class sip error-code-override total-calls failure 502

voice-class sip bind control source-interface GigabitEthernet0/1
voice-class sip bind media source-interface GigabitEthernet0/1
dtmf-relay rtp-nte
codec g711ulaw
no vad

Verification

Place an inbound call and keep running debug ccsip message and debug voip ccapi inout on CUBE to see the new response received in the sip error code...


Jun 21 05:44:59.684: %CALLTREAT-3-HIGH_TOTAL_CALLS: High call volume. Processing for callID(108) is rejected.
Jun 21 05:44:59.684: %SIP-3-TOTCALLCAC: Call rejected due to CAC based on Total-calls, sent response 502
Jun 21 05:44:59.688: //108/841FE2118265/SIP/Msg/ccsipDisplayMsg: Sent: 502 Total Number of Calls Allowed Exceeded

Related Information

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: