Skip to end of metadata
Go to start of metadata

The PUT method allows you to create and modify Sonus SBC 1000/2000 REST Resource. Unlinke the POST Resource, modifying a resource with PUT requires all parameters to be sent in the request (including the resource's identifier).The following examples demonstrate how to use the PUT Method on a resource using cURL:

PUT on a Resource /rest/isdnsg/{identifier}

Usage Example:

./curl.exe --cookie PHPSESSID=ima0r3nkaeg8mo0suln67vg4m7 --cacert 192.168.1.183.crt \
-X PUT -i https://192.168.1.183/rest/isdnsg/10011 --data \
"ActionsetTableNumber=0&ApplyToPortName=1.3&IsdnAllowCallingNameDisplayToSwitch=0
&IsdnServiceMessageCapability=1&IsdnSgDirection=2&IsdnSgHuntMethod=0&IsdnSgOverlapRxMode=0
&IsdnSgRingbackPlayPolicy=0&IsdnSgSideOrientation=0&IsdnSgSwitchVariant=6
&Description=Created using cURL&IsdnSgTimerT301=90&IsdnSgTimerT302=15&IsdnSgTimerT303=4
&IsdnSgTimerT305=30&IsdnSgTimerT308=4&IsdnSgTimerT309=6&IsdnSgTimerT310=30
&IsdnSgTimerT313=4&IsdnSgTimerT314=4&IsdnSgTimerT316=120&IsdnSgTimerT322=4
&IsdnSgTimerT3M1=120&IsdnStopFarEndT310UponTryingFromSip=1&RouteTableNumber=1&ToneTableNumber=12" 

Header Response

 
HTTP/1.1 200 OK
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 17 May 2011 20:29:45 GMT

XML Response

Sample XML Response
 
<?xml version="1.0">
<root>
 <status>
  <http_code>200</http_code>
 </status>
 <isdnsg id="10011" href="https://192.168.1.183/rest/isdnsg/10011">
  <ActionsetTableNumber>0</ActionsetTableNumber>
  <ApplyToPortName href="https://192.168.1.183/linecard/1/telcods1port/3">1.3</ApplyToPortName>
  <ConfigIEState>1</ConfigIEState>
  <Description>Created using cURL</Description>
  <IsdnAllowCallingNameDisplayToSwitch>0</IsdnAllowCallingNameDisplayToSwitch>
  <IsdnServiceMessageCapability>1</IsdnServiceMessageCapability>
  <IsdnSgDirection>2</IsdnSgDirection>
  <IsdnSgHuntMethod>0</IsdnSgHuntMethod>
  <IsdnSgOverlapRxMode>0</IsdnSgOverlapRxMode>
  <IsdnSgRingbackPlayPolicy>0</IsdnSgRingbackPlayPolicy>
  <IsdnSgSideOrientation>0</IsdnSgSideOrientation>
  <IsdnSgSwitchVariant>6</IsdnSgSwitchVariant>
  <IsdnSgTimerT301>90</IsdnSgTimerT301>
  <IsdnSgTimerT302>15</IsdnSgTimerT302>
  <IsdnSgTimerT303>4</IsdnSgTimerT303>
  <IsdnSgTimerT305>30</IsdnSgTimerT305>
  <IsdnSgTimerT308>4</IsdnSgTimerT308>
  <IsdnSgTimerT309>6</IsdnSgTimerT309>
  <IsdnSgTimerT310>30</IsdnSgTimerT310>
  <IsdnSgTimerT313>4</IsdnSgTimerT313>
  <IsdnSgTimerT314>4</IsdnSgTimerT314>
  <IsdnSgTimerT316>120</IsdnSgTimerT316>
  <IsdnSgTimerT322>4</IsdnSgTimerT322>
  <IsdnSgTimerT3M1>120</IsdnSgTimerT3M1>
  <IsdnStopFarEndT310UponTryingFromSip>1</IsdnStopFarEndT310UponTryingFromSip>
  <RouteTableNumber href="https://192.168.1.183/routingtable/1">1</RouteTableNumber>
  <ToneTableNumber href="https://192.168.1.183/tonetable/12">12</ToneTableNumber>
 </isdnsg>
</root>