For those EX, SX, MX and C-series codec which are running TC firmware, you can use the below method to make and disconnect call with CURL using its XML API. In my lab environment I am using TC7.1, however earlier release will also work. My video endpoint IP address is 192.168.24.6 and going to make a phone call to number 8334.
Make call
[root@ns3 ~]# curl -k -u admin:panda123 -H "Content-type: text/xml;" -d @ex.xml http://192.168.24.6/formputxml?xmldoc
Output:
<Command><DialResult status="OK" item="1">
<CallId item="1">7</CallId>
<ConferenceId item="1">6</ConferenceId>
</DialResult>
</Command>
<Command><DialResult status="OK" item="1">
<CallId item="1">7</CallId>
<ConferenceId item="1">6</ConferenceId>
</DialResult>
</Command>
ex.xml file content:
<Command><Dial command="True"><Number>8334</Number><Protocol>h323</Protocol></Dial></Command>
Disconnect All calls
[root@ns3 ~]# curl -k -u admin:panda123 -H "Content-type: text/xml;" -d @ex2.xml http://192.168.24.6/formputxml?xmldoc
Output:
<Command><DisconnectAllResult status="OK" item="1"/>
ex2.xml file content:
<Command><Call command="True"><DisconnectAll></DisconnectAll></Call></Command>
1 comment:
Super helpful! Thanks!
Post a Comment