That would be a very easy thing for you to check out, no? Just open a terminal and type curl. What happens?
(to save you the suspense I'll tell you, it's there)
What error messages are you getting? What is happening that makes you think the curl command isn;t working?
Have you tried putting in some print or log statments to tey and see what is going on?
Thanks This is the result I get :-
curl: try 'curl --help' or 'curl --manual' for more information
"Curl --Manual" does provide the manual so that is there
I get appropriate responce's from the script parts before the extract I have posted above. I have put in an eco command and I have commented out the "if" to see the "error" always but it does not even beep so something defiantly appears wrong with the line or the outcome:
set errorCode to do shell script "curl \"" & theURL & "\""
hence my wondering if cURL had been installed.
You can find the full script in template form here
I have made this even simpler as follows:
An apple script containing this:
"curl https://[IP number of the phone]/index.htm?number=69"
(69 is a valid internal extention) generates nothing
however when you type https://192.168.5.134/index.htm?number=69 into a browser window it dials perfectly!
Nothing obviously wrong with the script. When you run the script does it hang or complete and your phone isn't dialed? If so does the errorCode have anything in it?
Unfortunately there is no way for me to run this without dialing your phone so troubleshooting it is difficult.
As Barney suggested what happens if you run curl from the command line? I can tell you that curl in Lion works as I have a few scripts that make use of it and they work.
Barney's suggestion will probably show you the problem, which I suspect is a certificate verification problem.
The 'curl' shipped with Lion has https support that requires server certificates to verify correctly using the default CA trust settings OR using a CA database you provide it ('man curl' for details) OR trusting all certs if you give it the -k or --insecure arguments.
Also note that unlike an actual shell script, the AppleScript 'do shell script' function returns the output of the shell commands it is given *NOT THE RETURN VALUE* It also does not return diagnostic output that sent to the "standard error" stream. That's why running your command in a real shell is going to tell you more.
Message was edited by: billcole added last paragraph.
Thank you all for your help.
In the end it was to do with the browser caching the password for the phone so it used that, hiding the fact that we had put the wrong password ( but still a valid password for that phone) into the script!
SNOM phones are really great but they have loads of different passwords!!