Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Add_workflow_for_techpubs
AUTH2UserResourceIdentifier{userKey=8a00a02355cd1c2f0155cd26cd5909df, userName='null'}
AUTH1UserResourceIdentifier{userKey=8a00a0c880e94aad0181077fa2530009, userName='null'}
JIRAIDAUTHSBX-131908
REV5UserResourceIdentifier{userKey=8a00a02355cd1c2f0155cd26cd5909df, userName='null'}
REV6UserResourceIdentifier{userKey=8a00a02355cd1c2f0155cd26cd5909df, userName='null'}
REV3UserResourceIdentifier{userKey=8a00a0c87d403e06017d75ffbc0d0047, userName='null'}
REV1UserResourceIdentifier{userKey=8a00a0c879dedbad0179eff0a73a0013, userName='null'}

Overview

You can configure an SBC using the provided example RESTCONF API configurating using the JSON payload.

Copy the JSON files mentioned after the "@" in the cURL commands and run these cURL commands in the same folder as the JSON files or mention the complete path for the JSON files.

If you saved the JSON files on the SBC, replace to <SBC_MGT_IP> with local address.


Steps:

Table of Contents
maxLevel3
minLevel3
outlinetrue



Start

  1. Create a codec entry

    Code Block
    {"sonusCodecEntry:codecEntry":{
    "name":"G711DSP",
    "codec":"g711",
    "packetSizeG711":10
    }}

    Code Block
    curl -kisu 'admin:<Password>' -H "Accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -X POST -d @codecEntryJson 

An SBC can be configured using the provided REST interface.

Copy the JSON files mentioned after the "@" in the cURL commands and run these cURL commands in the same folder as the JSON files or mention the complete path for the JSON files.

If you saved the JSON files on the SBC, replace to <SBC_MGT_IP> with local address

Creating codec entry :-
Code Block
{"sonusCodecEntry:codecEntry":{
"name":"G711DSP",
"codec":"g711",
"packetSizeG711":10
}}

curl -kisu 'admin:Sonus@123' -H "Accept: application/vnd.yang.data+json" -H "Content-Type: application/vnd.yang.data+json" -X POST -d @codecEntryJson "https://<SBC_MGT_IP>/api/config/profiles/media"

2. Creating Packet service profiles :-

Code Block
[root@ip-172-31-10-46 ARJUN_REST_JSON]# cat packetServiceProfile
{
    "sonusPacketServiceProfile:packetServiceProfile": [
      {
        "name": "PSP3",
        "codec": {
          "codecEntry1": "G711-DEFAULT"
        }
          }
    ]
}
curl -kisu 'admin:Sonus@123' -H "Accept: application/vnd.yang.data+json" -H "Content-Type: application/vnd.yang.data+json" -X POST -d @packetServiceProfile
  1. "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusGen2Profiles:profiles/media"
3.Creating Address contexts :-


  1. Create Packet Service Profiles

    Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat
ADDR_CNTXT
  1.  packetServiceProfile
    {
        "sonusPacketServiceProfile:packetServiceProfile": [
          {
            "
sonusAddressContext:addressContext
  1. name": 
[{
  1. "PSP3",
            "codec": {
              "
name
  1. codecEntry1": "
ADDR_CONTEXT
  1. G711-DEFAULT"
            }
] }
  1. 
              }
        ]
    }

    Code Block
    curl -kisu 
curl -kisu
  1. 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d
@ADDR_CNTXT
  1.  @packetServiceProfile "https://<SBC_MGT_IP>
/api/config"

4.Creating Zones :-

Code Block
{
"sonusZone:zone": [
{
"name": "ZONE7",
"id": "104"
}]
}
curl -kisu 'admin:Sonus@123' -H "Accept: application/vnd.yang.data+json" -H "Content-Type: application/vnd.yang.data+json" -X POST -d @ZONE1
  1. /restconf/data/sonusGen2Profiles:profiles/media"


  2. Create Address Context

    Code Block
    [root@ip-172-31-10-46 REST_JSON]# cat ADDR_CNTXT
    {
            "sonusAddressContext:addressContext": [{
                    "name": "ADDR_CONTEXT"
            }]
    }

    Code Block
    curl -kisu 'admin:<Password>' -H "Accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -X POST -d @ADDR_CNTXT "https://<SBC_MGT_IP>/
api/config/addressContext/ADDR_CONTEXT
  1. restconf/data"


  2. Create Zones

    Code Block
[root@ip-172-31-10-46 ARJUN_REST_JSON]#
  1. cat 
ZONE2
  1. ZONE1
    {
    "sonusZone:zone": [
    {
    "name": "
ZONE8
  1. ZONE7",
    "id": "
105
  1. 104"
    }]
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d
@ZONE2
  1.  @ZONE1 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT"
5.Creating IP interface groups :-


  1. Code Block
[root@ip-172-31-10-46 ARJUN_REST_JSON]# cat ipInterfaceGroup_1
  1. cat ZONE2
    {
    
  1. "
sonusIpInterface
  1. sonusZone:
ipInterfaceGroup
  1. zone": [
    
  1. {
    
  1. "name": "
INGRESS_LIG
  1. ZONE8",
    
}
  1. "id": "105"
    }]
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d
@ipInterfaceGroup_1
  1.  @ZONE2 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT"


  2. Create IP Interface Groups

    Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat ipInterfaceGroup_
2
  1. 1
    {
        "sonusIpInterface:ipInterfaceGroup": [
          {
            "name": "
EGRESS
  1. INGRESS_LIG"
          }
        ]
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @ipInterfaceGroup_
2
  1. 1 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT"

6. Creating IP interface :-



  1. Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat 
ipInterface
  1. ipInterfaceGroup_
IN
  1. 2
    {
        "sonusIpInterface:
ipInterface
  1. ipInterfaceGroup": [
          {
            "name": "
LIF
  1. EGRESS_
IN
  1. LIG"
,
  1. 
          }
        ]
    }

    Code Block
    curl -kisu 
  1. 'admin:<Password>' -H "
ceName":"vsbc1", "portName":"pkt0",
  1. Accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -X POST -d @ipInterfaceGroup_2 "https://<SBC_MGT_IP>/restconf/data/sonusAddressContext:addressContext=ADDR_CONTEXT"


  2. Create IP interfaces

    Code Block
    [root@ip-172-31-10-46 REST_JSON]# cat ipInterface_IN
    {
        "sonusIpInterface:ipInterface": [
          {
            "name": "LIF_IN",
                    "ceName":"vsbc1",
                    "portName":"pkt0",
                    "ipVarV4":"IF2.IPV4",
                    "prefixVarV4":"IF2.PrefixV4",
                    "mode":"inService",
                    "state":"enabled"
          }
        ]
    }
Note

To configure the public or EIP to the interfaces , add the "ipPublicVarV4": <MetaVariable> in the JSON file

curl -kisu

  1. Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @ipInterface_IN "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT/sonusIpInterface:ipInterfaceGroup
/
  1. =INGRESS_LIG"


    Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat ipInterface_OUT
    {
        "sonusIpInterface:ipInterface": [
          {
            "name": "LIF_OUT",
                    "ceName":"vsbc1",
                    "portName":"pkt1",
                    "ipVarV4":"IF3.IPV4",
                    "prefixVarV4":"IF3.PrefixV4",
                    "mode":"inService",
                    "state":"enabled"
          }
        ]
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.yang.
  1. yang-data+json" -X POST -d @ipInterface_OUT "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT/sonusIpInterface:ipInterfaceGroup
/
  1. =EGRESS_LIG"


    Note

    To configure the public or EIP to the interfaces , add the "ipPublicVarV4": <MetaVariable> in the JSON file

  1. .



  2. Create static routes

7. Creating Static routes :-
  1. Code Block
    [root@ip-172-31-10-46 

ARJUN_
  1. REST_JSON]# cat staticRoute_2
    {
    "sonusIpInterface:staticRoute": [
          {
                    "destinationIpAddress":"0.0.0.0",
                    "prefix":"0",
                    "nextHop":"172.31.13.1",
                    "ipInterfaceGroupName":"EGRESS_LIG",
                    "ipInterfaceName":"LIF_OUT",
                    "preference":"100"
          }
        ]
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @staticRoute_2 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT"


    Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat staticRoute_1
    {
    "sonusIpInterface:staticRoute": [
          {
                    "destinationIpAddress":"0.0.0.0",
                    "prefix":"0",
                    "nextHop":"172.31.12.1",
                    "ipInterfaceGroupName":"INGRESS_LIG",
                    "ipInterfaceName":"LIF_IN",
                    "preference":"100"
          }
        ]
    }
    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.yang.
  1. yang-data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @staticRoute_1 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/Creating
  1. =ADDR_CONTEXT"
8.


  1. Create IP Peer

:-
  1. Code Block
    [root@ip-172-31-10-46 

ARJUN_
  1. REST_JSON]# cat ipPeer_2
    {
    "sonusIpPeer:ipPeer": [
          {
                    "name":"EGRESS_PEER",
                    "ipAddress":"172.31.13.202",
                    "ipPort":"9884"
          }
        ]
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @ipPeer_2 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT/sonusZone:zone
/
  1. =ZONE8"
9. Creating


  1. Create SIP Trunk

groups :-
  1. Groups

    Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat sipTrunkGroup_1
    {
      "sonusSipTrunkGroup:sipTrunkGroup": {
        "name": "INGRESS_TRGP",
        "state": "enabled",
        "mode": "inService",
        "policy": {
          "media": {
            "packetServiceProfile": "PSP3"
          },
          "signaling": {
            "ipSignalingProfile": "DEFAULT_SIP"
          }
        },
        "media": {
          "mediaIpInterfaceGroupName": "INGRESS_LIG"
        },
        "ingressIpPrefix": [
          {
            "ipAddress": "172.31.12.174",
            "prefixLength": 32
          }
        ]
      }
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @sipTrunkGroup_1 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT/sonusZone:zone
/
  1. =ZONE7"


    Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat sipTrunkGroup_2
    {
      "sonusSipTrunkGroup:sipTrunkGroup": {
        "name": "EGRESS_TRGP",
        "state": "enabled",
        "mode": "inService",
        "policy": {
          "media": {
            "packetServiceProfile": "PSP3"
          },
          "signaling": {
            "ipSignalingProfile": "DEFAULT_SIP"
          }
        },
        "media": {
          "mediaIpInterfaceGroupName": "EGRESS_LIG"
        }
      }
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @sipTrunkGroup_2 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT/sonusZone:zone
/
  1. =ZONE8"
10. Creating


  1. Create SIP

Signalling
  1. Signaling Ports

:-

  1. Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat sipSigPort_1
    {
        "sonusSipSigPort:sipSigPort": [
          {
            "index": 7,
            "ipInterfaceGroupName": "INGRESS_LIG",
            "portNumber": 5060,
            "mode": "inService",
            "state": "enabled
", "transportProtocolsAllowed": "sip-udp sip-tcp sip-tls-tcp sip-sctp
  1. ",
            "ipVarV4": "IF2.IPV4"
          }
        ]
    }
Note

To configure the public or EIP to the interfaces , add the "ipPublicVarV4": <MetaVariable> in the JSON file

curl -kisu

  1. Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @sipSigPort_1 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT/sonusZone:zone
/
  1. =ZONE7"


    Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat sipSigPort_2
    {
        "sonusSipSigPort:sipSigPort": [
          {
            "index": 8,
            "ipInterfaceGroupName": "EGRESS_LIG",
            "portNumber": 5060,
            "mode": "inService",
            "state": "enabled
", "transportProtocolsAllowed
  1. "
: "sip-udp sip-tcp sip-tls-tcp sip-sctp"
  1. ,
            "ipVarV4": "IF3.IPV4"
          }
        ]
    }
Note

To configure the public or EIP to the interfaces , add the "ipPublicVarV4": <MetaVariable> in the JSON file

curl -kisu 'admin:Sonus@123' -H "Accept: application/vnd.yang.

  1. Code Block
    curl -kisu 'admin:<Password>' -H "Accept: application/yang-data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @sipSigPort_2 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusAddressContext:addressContext
/
  1. =ADDR_CONTEXT/sonusZone:zone
/
  1. =ZONE8"

11. Creating Standars Routes and Routing Labels :-

Code Block[root@ip-172-


  1. Note

    To configure the public or EIP to the interfaces , add the "ipPublicVarV4": <MetaVariable> in the JSON file



  2. Create standard routes and routing labels

    Code Block
    [root@ip-172-31-10-46 
ARJUN_
  1. REST_JSON]# cat routingLabel_1
    {
      "sonusRoutingLabel:routingLabel": {
        "name": "VRF_RL_EG"
          }
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>'
 
  1.   -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -d @routingLabel_
  1. 1  "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusGlobal:global/callRouting"


    Code Block
    cat routingLabelRoute_1
    {
        "routingLabelRoute": [
          {
            "sequence": "0",
                    "routeType":"trunkGroup",
                    "trunkGroup":"EGRESS_TRGP",
                    "ipPeer":"EGRESS_PEER",
                    "proportion":"0",
                    "cost":"1000000",
                    "inService":"inService",
                    "testing":"normal"
          }
        ]
    }

    Code Block
    curl -kisu 'admin:
Sonus@123
  1. <Password>' -H "Accept: application/
vnd.
  1. yang
.
  1. -data+json" -H "Content-Type: application/
vnd.
  1. yang
.
  1. -data+json" -X POST -
X POST -
  1. d @routingLabelRoute_1 "https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusGlobal:global/callRouting/sonusRoutingLabel:routingLabel
/
  1. =VRF_RL_EG"


    Code Block
[root@ip-172-31-10-46 ARJUN_REST_JSON]#
  1. cat route_1
    {
        "sonusRoute:route": [
        
  1. {
            "elementType": "
none
  1. trunkGroup",
            "elementId1": "
Sonus
  1. INGRESS_
NULL
  1. TRGP",
            "elementId2": "
Sonus_NULL
  1. VSBCSYSTEM",
            "routingType": "standard",
            "destinationNational": "
98402
  1. Sonus_NULL",
            "destinationCountry": "1",
            "callType": "all",
            "digitType": "all",
           
"timeRangeProfile": "ALL", "callParameterFilterProfile": "none", "domainName": "Sonus_NULL", "routingLabel":"VRF_RL_EG" } ] }

curl -kisu 'admin:Sonus@123'  -H "Accept: application/vnd.yang.data+json" -H "Content-Type: application/vnd.yang.data+json" -X POST -d @route_1  "https://<SBC_MGT_IP>/api/config/global/callRouting/"

Here I have configured the Standard route for Number based routing with called number being "98402".

Note

You can also have Trunk group based routing in case You don't want to use Number based routing

[root@ip-172-31-10-46 ARJUN_REST_JSON]# cat route_1_TG
{
    "sonusRoute:route": [
{
"elementType": "trunkGroup",
"elementId1": "INGRESS_TRGP",
"elementId2": "VSBCSYSTEM",
"routingType": "standard",
"destinationNational": "Sonus_NULL",
"destinationCountry": "1",
"callType": "all",
"digitType": "all",
"timeRangeProfile": "ALL",
"callParameterFilterProfile": "none",
"domainName": "Sonus_NULL",
"routingLabel":"VRF_RL_EG"
}

Configuring an SBC using REST with XML payload

Copy the XML files mentioned after the "@" in the cURL commands and run these cURL commands in the same folder as the XML files or mention the complete path for the XML files.

If you saved the XML files on the SBC, replace to <SBC_MGT_IP> with local address.

Given below are the configurations to configure SBC for a basic A-B call using Rest API.

  1. Creating codec entry :-
Code Block
wfats1:~/REST_API> cat codecEntry
<codecEntry>
<name>G711</name>
<codec>g711</codec>
<packetSizeG711>10</packetSizeG711>
</codecEntry>

curl -kisu 'admin:<Password>' -X POST -d @codecEntry -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/profiles/media
2. Creating Packet service profiles :-

Code Block
wfats1:~/REST_API> cat packetServiceProfile
<packetServiceProfile>
<name>G711</name>
<codec>
<codecEntry1>G711</codecEntry1>
</codec>
</packetServiceProfile>
curl -kisu 'admin:<Password>' -X POST -d @packetServiceProfile -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/profiles/media
3.Creating Address contexts :-
Code Block
wfats1:~/REST_API> cat addressContext
<addressContext>
<name>ADDR_CONTEXT</name>
</addressContext>

curl -kisu 'admin:<Password>' -X POST -d @addressContext -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config
4.Creating IP interface groups :-

Code Block
wfats1:~/REST_API> cat ipInterfaceGroup_1

<ipInterfaceGroup>
<name>LIG7</name>
</ipInterfaceGroup>

curl -kisu 'admin:<Password>' -X POST -d @ipInterfaceGroup_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT

Code Block
wfats1:~/REST_API> cat ipInterfaceGroup_2

<ipInterfaceGroup>
<name>LIG8</name>
</ipInterfaceGroup>
curl -kisu 'admin:<Password>' -X POST -d @ipInterfaceGroup_2 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT
5.Creating Zones :-
Code Block
wfats1:~/REST_API> cat zones_1
<zone>
<name>ZONE7</name>
<id>104</id>
</zone>

curl -kisu 'admin:<Password>' -X POST -d @zones_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT

Code Block
wfats1:~/REST_API> cat zones_2
<zone>
<name>ZONE8</name>
<id>204</id>
</zone>
curl -kisu 'admin:<Password>' -X POST -d @zones_2 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT
6.Creating ip interfaces :-
Code Block
wfats1:~/REST_API> cat ipInterface_1

<ipInterface>
<name>LIF7</name>
<ceName>vsbc1</ceName>
<portName>pkt0</portName>
<ipVarV4>IF2.IPV4</ipVarV4>
<prefixVarV4>IF2.PrefixV4</prefixVarV4>
<mode>inService</mode>
<state>enabled</state>
</ipInterface>

curl -kisu 'admin:<Password>' -X POST -d @ipInterface_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT/ipInterfaceGroup/LIG7

Note

to configure the public or EIP to the interfaces , add the <ipPublicVarV4>MetaVariable</ipPublicVarV4> in the XML file

Code Block
wfats1:~/REST_API> cat ipInterface_2

<ipInterface>
<name>LIF8</name>
<ceName>vsbc1</ceName>
<portName>pkt1</portName>
<ipVarV4>IF3.IPV4</ipVarV4>
<prefixVarV4>IF3.PrefixV4</prefixVarV4>
<mode>inService</mode>
<state>enabled</state>
</ipInterface>
curl -kisu 'admin:<Password>' -X POST -d @ipInterface_2 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT/ipInterfaceGroup/LIG8
7.Creating static Routes :-
Code Block
wfats1:~/REST_API> cat staticRoute_1

<staticRoute>
<destinationIpAddress>0.0.0.0</destinationIpAddress>
<prefix>0</prefix>
<nextHop>172.31.12.1</nextHop>
<ipInterfaceGroupName>LIG7</ipInterfaceGroupName>
<ipInterfaceName>LIF7</ipInterfaceName>
<preference>100</preference>
</staticRoute>
curl -kisu 'admin:<Password>' -X POST -d @staticRoute_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT
Code Block
wfats1:~/REST_API> cat staticRoute_2


<staticRoute>
<destinationIpAddress>0.0.0.0</destinationIpAddress>
<prefix>0</prefix>
<nextHop>172.31.13.1</nextHop>
<ipInterfaceGroupName>LIG8</ipInterfaceGroupName>
<ipInterfaceName>LIF8</ipInterfaceName>
<preference>100</preference>
</staticRoute>
curl -kisu 'admin:<Password>' -X POST -d @staticRoute_2 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT
8.Creating IP peers :-
Code Block
wfats1:~/REST_API> cat ipPeer_1

<ipPeer>
<name>INGRESS_PEER</name>
<ipAddress>172.31.12.202</ipAddress>
<ipPort>9884</ipPort>
</ipPeer>

curl -kisu 'admin:<Password>' -X POST -d @ipPeer_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT/zone/ZONE7

Code Block
wfats1:~/REST_API> cat ipPeer_2

<ipPeer>
<name>EGRESS_PEER</name>
<ipAddress>172.31.13.202</ipAddress>
<ipPort>9884</ipPort>
</ipPeer>

curl -kisu 'admin:<Password>' -X POST -d @ipPeer_2 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT/zone/ZONE8

9.Creating SIP Sig ports :-
Code Block
wfats1:~/REST_API> cat sipSigPort_1

<sipSigPort>
<index>7</index>
<ipInterfaceGroupName>LIG7</ipInterfaceGroupName>
<ipVarV4>IF2.IPV4</ipVarV4>
<portNumber>5060</portNumber>
<mode>inService</mode>
<state>enabled</state>
<transportProtocolsAllowed>sip-udp sip-tcp sip-tls-tcp sip-sctp</transportProtocolsAllowed>
</sipSigPort>

curl -kisu 'admin:<Password>' -X POST -d @sipSigPort_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT/zone/ZONE7

Note

to configure the public or EIP to the SIP Signalling port , add the <ipPublicVarV4>MetaVariable</ipPublicVarV4> in the XML file

Code Block
wfats1:~/REST_API> cat sipSigPort_2

<sipSigPort>
<index>8</index>
<ipInterfaceGroupName>LIG8</ipInterfaceGroupName>
<ipVarV4>IF3.IPV4</ipVarV4>
<portNumber>5060</portNumber>
<mode>inService</mode>
<state>enabled</state>
<transportProtocolsAllowed>sip-udp sip-tcp sip-tls-tcp sip-sctp</transportProtocolsAllowed>
</sipSigPort>
curl -kisu 'admin:<Password>' -X POST -d @sipSigPort_2 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT/zone/ZONE8
10.creating SIP trunk groups :-
  1.  "timeRangeProfile": "ALL",
            "callParameterFilterProfile": "none",
            "domainName": "Sonus_NULL",
            "routingLabel":"VRF_RL_EG"
        }
      ]
    }
    


    Code Block
    curl -kisu 'admin:<Password>'  -H "Accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -X POST -d @route_1  "
Code Block
wfats1:~/REST_API> cat sipTrunkGroup_1

<sipTrunkGroup>
<name>INGRESS_TG</name>
<state>enabled</state>
<mode>inService</mode>
<policy>
<media>
<packetServiceProfile>G711</packetServiceProfile>
</media>
</policy>
<media>
<mediaIpInterfaceGroupName>LIG7</mediaIpInterfaceGroupName>
</media>
<ingressIpPrefix>
<ipAddress>172.31.12.174</ipAddress>
<prefixLength>24</prefixLength>
</ingressIpPrefix>
</sipTrunkGroup>
curl -kisu 'admin:<Password>' -X POST -d @sipTrunkGroup_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT/zone/ZONE7
Code Block
wfats1:~/REST_API> cat sipTrunkGroup_2
 
<sipTrunkGroup>
<name>EGRESS_TG</name>
<state>enabled</state>
<mode>inService</mode>
<policy>
<media>
<packetServiceProfile>G711</packetServiceProfile>
</media>
</policy>
<media>
<mediaIpInterfaceGroupName>LIG8</mediaIpInterfaceGroupName>
</media>
</sipTrunkGroup>
curl -kisu 'admin:<Password>' -X POST -d @sipTrunkGroup_2 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/addressContext/ADDR_CONTEXT/zone/ZONE8

11.creating Standard route and routing Label :-

Code Block
wfats1:~/REST_API> cat routingLabel_1
<routingLabel>
<name>VRF_RL_EG</name>
</routingLabel>
curl -kisu 'admin:<Password>' -X POST -d @routingLabel_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/global/callRouting/
Code Block
wfats1:~/REST_API> cat routingLabelRoute_1

<routingLabelRoute>
<sequence>0</sequence>
<routeType>trunkGroup</routeType>
<trunkGroup>EGRESS_TG</trunkGroup>
<ipPeer>EGRESS_PEER</ipPeer>
<proportion>0</proportion>
<cost>1000000</cost>
<inService>inService</inService>
<testing>normal</testing>
</routingLabelRoute>
curl -kisu 'admin:<Password>' -X POST -d @routingLabelRoute_1 -H 'Content-Type: application/vnd.yang.data+xml'
  1. https://<SBC_MGT_IP>/
api
  1. restconf/
config
  1. data/sonusGlobal:global/callRouting/
routingLabel/VRF_RL_EG
Code Block
wfats1:~/REST_API> cat route_1

<route>
<elementType>trunkGroup</elementType>
<elementId1>INGRESS_TG</elementId1>
<elementId2>VSBCSYSTEM</elementId2>
<routingType>standard</routingType>
<destinationNational>Sonus_NULL</destinationNational>
<destinationCountry>1</destinationCountry>
<callType>all</callType>
<digitType>all</digitType>
<timeRangeProfile>ALL</timeRangeProfile>
<callParameterFilterProfile>none</callParameterFilterProfile>
<domainName>Sonus_NULL</domainName>
<routingLabel>VRF_RL_EG</routingLabel>
</route>
curl -kisu 'admin:<Password>' -X POST -d @route_1 -H 'Content-Type: application/vnd.yang.data+xml' https://<SBC_MGT_IP>/api/config/global/callRouting/
The call can be made successfully from Ingress to egress.
  1. "

    You can also have Trunk Group-based routing in lieu of Number-based routing:

    Code Block
    [root@ip-172-31-10-46 ARJUN_REST_JSON]# cat route_1_TG
    {
        "sonusRoute:route": [
    {
    "elementType": "trunkGroup",
    "elementId1": "INGRESS_TRGP",
    "elementId2": "VSBCSYSTEM",
    "routingType": "standard",
    "destinationNational": "Sonus_NULL",
    "destinationCountry": "1",
    "callType": "all",
    "digitType": "all",
    "timeRangeProfile": "ALL",
    "callParameterFilterProfile": "none",
    "domainName": "Sonus_NULL",
    "routingLabel":"VRF_RL_EG"
    }
pagebreak