Start
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
api
configdata/sonusGen2Profiles:profiles/media" |
3.Creating Address contexts :-
Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_
ADDR_CNTXT
packetServiceProfile
{
"sonusPacketServiceProfile:packetServiceProfile": [
{
" |
sonusAddressContext:addressContext
[{
name
ADDR_CONTEXT
]
}
curl -kisu
Sonus@123<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.
@ADDR_CNTXT @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 /restconf/data/sonusGen2Profiles:profiles/media" |
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
[root@ip-172-31-10-46 ARJUN_REST_JSON]#
ZONE2ZONE1
{
"sonusZone:zone": [
{
"name": " |
ZONE8
105
Code Block |
---|
curl -kisu 'admin: |
Sonus@123<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.
@ZONE2 @ZONE1 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/
5.Creating IP interface groups :-
[root@ip-172-31-10-46 ARJUN_REST_JSON]# cat ipInterfaceGroup_1
sonusIpInterface
ipInterfaceGroup
INGRESS_LIG
}
Code Block |
---|
curl -kisu 'admin: |
Sonus@123<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.
@ipInterfaceGroup_1 @ZONE2 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/
Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_REST_JSON]# cat ipInterfaceGroup_ |
21
{
"sonusIpInterface:ipInterfaceGroup": [
{
"name": " |
EGRESS
Code Block |
---|
curl -kisu 'admin: |
Sonus@123<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @ipInterfaceGroup_ |
2
api
configdata/sonusAddressContext:addressContext |
/
6. Creating IP interface :-
Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_
ipInterface
IN
ipInterfaceipInterfaceGroup": [
{
"name": " |
LIF
IN
,
ceName":"vsbc1",
"portName":"pkt0",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" |
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
Code Block |
---|
curl -kisu 'admin: |
Sonus@123<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @ipInterface_IN "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/=ADDR_CONTEXT/sonusIpInterface:ipInterfaceGroup |
/
Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_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<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.yang.yang-data+json" -X POST -d @ipInterface_OUT "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/=ADDR_CONTEXT/sonusIpInterface:ipInterfaceGroup |
/
Note |
---|
To configure the public or EIP to the interfaces , add the "ipPublicVarV4": <MetaVariable> in the JSON file |
7. Creating Static routes :- Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_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<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @staticRoute_2 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/
Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_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<Password>' -H "Accept: application/ |
vnd.yang.yang-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @staticRoute_1 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/Creating
8.
:- Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_REST_JSON]# cat ipPeer_2
{
"sonusIpPeer:ipPeer": [
{
"name":"EGRESS_PEER",
"ipAddress":"172.31.13.202",
"ipPort":"9884"
}
]
} |
Code Block |
---|
curl -kisu 'admin: |
Sonus@123<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @ipPeer_2 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/=ADDR_CONTEXT/sonusZone:zone |
/
9. Creating
groups :- Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_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<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @sipTrunkGroup_1 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/=ADDR_CONTEXT/sonusZone:zone |
/
Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_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<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @sipTrunkGroup_2 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/=ADDR_CONTEXT/sonusZone:zone |
/
10. Creating
Signalling
:- Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_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",
"ipVarV4": "IF2.IPV4"
}
]
} |
Note |
---|
To configure the public or EIP to the interfaces , add the "ipPublicVarV4": <MetaVariable> in the JSON file |
curl -kisu
Code Block |
---|
curl -kisu 'admin: |
Sonus@123<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @sipSigPort_1 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/=ADDR_CONTEXT/sonusZone:zone |
/
Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_REST_JSON]# cat sipSigPort_2
{
"sonusSipSigPort:sipSigPort": [
{
"index": 8,
"ipInterfaceGroupName": "EGRESS_LIG",
"portNumber": 5060,
"mode": "inService",
"state": "enabled |
",
"transportProtocolsAllowed
: "sip-udp sip-tcp sip-tls-tcp sip-sctp",
"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.
Code Block |
---|
curl -kisu 'admin:<Password>' -H "Accept: application/yang-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @sipSigPort_2 "https://<SBC_MGT_IP>/ |
api
configdata/sonusAddressContext:addressContext |
/=ADDR_CONTEXT/sonusZone:zone |
/
11. Creating Standars Routes and Routing Labels :-
Code Block |
[root@ip-172-
Note |
---|
To configure the public or EIP to the interfaces , add the "ipPublicVarV4": <MetaVariable> in the JSON file |
Code Block |
---|
[root@ip-172-31-10-46 |
ARJUN_REST_JSON]# cat routingLabel_1
{
"sonusRoutingLabel:routingLabel": {
"name": "VRF_RL_EG"
}
} |
Code Block |
---|
curl -kisu 'admin: |
Sonus@123
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.-data+json" -X POST -d @routingLabel_ |
1
api
configdata/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<Password>' -H "Accept: application/ |
vnd.
.-data+json" -H "Content-Type: application/ |
vnd.
.
X POST -d @routingLabelRoute_1 "https://<SBC_MGT_IP>/ |
api
configdata/sonusGlobal:global/callRouting/sonusRoutingLabel:routingLabel |
/
[root@ip-172-31-10-46 ARJUN_REST_JSON]# cat route_1
{
"sonusRoute:route": [
|
nonetrunkGroup",
"elementId1": " |
Sonus
NULL
Sonus_NULLVSBCSYSTEM",
"routingType": "standard",
"destinationNational": " |
98402Sonus_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.
- 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/media3.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_CONTEXT5.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_CONTEXT6.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/LIG87.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_CONTEXT8.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/ZONE810.creating SIP trunk groups :- "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/ZONE811.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'
api
configdata/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.
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