The following example shows you how to create a voice-over-IP (VoIP) service.
This example uses the following software and hardware components:
A VoIP service is a session border controller (SBC) media gateway (MG)-based service that has upstream and downstream components.
The IP address and port for both the subscriber and the opposite end of the phone call were originally negotiated with the SBC. The VoIP service learns the IP addresses and ports for both ends of the call, and then specifies that any traffic to either end is put in the voice traffic class.
This example illustrates how to create a VoIP service:
![]() | Note: Commented text explains the parameterized values in the example of the service definition macro file. Each example is followed by examples of RADIUS information and the CLI command that you can use to activate a subscriber service session. |
!parameterizes source address and port, destination address and port, and protocol type
<# mgFlow(upDA, upDPort, downDA, downDPort, protType) #>
<# uid := app.servicemanager.getUniqueId #>
<# name := "SM-mgFlow-" $ uid #>
<# oname := "SM-O-mgFlow-" $ uid #>
classifier-list <# name #> <# protType #> any <#upDA #> 0.0.0.0 eq <# upDPort; '\n' #>
policy-list <# name; '\n' #>
classifier-group <# name #> precedence 2000
traffic-class voice
forward
classifier-list <# oname #> <# protType #> any <#downDA #> 0.0.0.0 eq <# downDPort; '\n' #>
policy-list <# oname; '\n' #>
classifier-group <# oname #> precedence 2000
traffic-class voice
forward
profile <# name ; '\n' #>
ip policy input <# name #> statistics enabled merge
ip policy output <# oname #> statistics enabled merge
<# env.setResult("activate-profile", name) #>
<# endtmpl #>
Table 1 provides the sample RADIUS attributes that you can use to activate the VoIP service
Table 1: Sample RADIUS Attributes
RADIUS Attribute | Tag | Value |
|---|---|---|
username | none | client1@isp1.com |
activate-service | 1 | mgFlow(10.10.10.10, 1234, 192.168.45.54, 1234, udp) |
To activate a subscriber session with the configured VoIP service: