ivansanchez / node-cuipp Goto Github PK
View Code? Open in Web Editor NEWLibrary for Cisco Unified IP Phone services
License: Other
Library for Cisco Unified IP Phone services
License: Other
Implement a new XML payload for setting the phone background, e.g.:
<setBackground>
<background>
<image>http://mywebserver/imagename.png</image>
<icon>http://mywebserver/imagethumbnail.png</icon>
</background>
</setBackground>
Note that this method is nowhere to be found in Cisco's documentation. See also: http://www.netcraftsmen.com/pushing-backgrounds-to-a-cisco-ip-phone-using-xml/
Do some error control around parser.parseString()
in cuipp.send()
. Some phones might return plain HTML if something goes wrong (e.g. bad password or bad HTTP headers)
Implement at least one method to convert from .png to CiscoIPPhoneImage "packed data" (hex string) and vice versa.
For reference, see http://php.net/manual/en/function.imagecopymergegray.php#55853
Some phones hang up the HTTP request without giving a timeout. The phone establishes the TCP connection (SYN, SYN/ACK, ACK), node sends the HTTP request, and the phone acknowledges receipt of the TCP packet with the HTTP request... but hangs up there.
There must be some way to set up an artificial timeout in Node to catch this scenario and let node-cuipp
return a custom error.
TODO: Add a content-length HTTP header to all calls in cuipp.send()
, and replicate headers sent by applications known to work, e.g.:
headers: {
'content-type': 'text/xml; charset:ISO-8859-1',
'MessageType': 'CALL',
'Accept': '*/*',
'Man': 'POST http://' + phone.host + ':' + phone.port + '/CGI/Execute HTTP/1.1', // WTF????
/// Content length is needed; embedded web server will return 404
/// if content is sent with Transfer-encoding: chunked.
'Content-length': xml.length + 4
},
i.e. add 'node-xml-lite' to the dependencies in package.json
.
Ensure that UTF-8 inside the .js files is converted into ISO-8859-1 into the XML payloads, in a transparent manner.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.