The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Launch an external Application
Posted: 18 Sep 09 5:45 AM
|
I'm trying to write a little script to launch an external appliaction.
To give some backgound: We have a 3CX Phone system, so the built-in dialler does not work. 3CX does have a function for this which I have implemented using WebOpen to launch a webpage with the URL which triggers the call.
The downside of this is that it also launches a IE window. Seriously, I'm being picky here, but I'd like to call another application (wget) to make the HTTP call, as this wouldn't launch the IE window.
I know it is a minor issue, but actually I can see the ability to launch applications being useful in other areas, so assistance would be appreciated!
Thanks, Paul. |
|
|
|
Re: Launch an external Application
Posted: 18 Sep 09 8:01 AM
|
There are several ways to launch other applications, but here is a simple question:
When you call this URL, does that Initiates the Call from the Phone system, as in, the User's line rings while at the same time the target number is being dialed?
If so, why don't you use the xmlHTTP object to call the URL without having to open a Browser? Or are you relying on an ActiveX component loaded on the Browser to initiate the call? |
|
|
|
Re: Launch an external Application
Posted: 18 Sep 09 8:09 AM
|
Raul, thanks for the reply.
It does initiate the call from the phone system, an example of the command is:
http://:5484/PbxAPI.aspx?func=make_call&from=204&to=203&pin=123
I don't know how to use xmlHTTP, can you give me an example?
Thanks, Paul. |
|
|
|
Re: Launch an external Application
Posted: 18 Sep 09 8:18 AM
|
Dim objHTTP Dim yourURL
yourURL = "http://:5484/PbxAPI.aspx?func=make_call&from=204&to=203&pin=123"
Set objHTTP = CreateObject("Msxml2.XMLHTTP") objHTTP.open "GET", yourURL, False ' I am making the call Synchronous so that you could get any Error Codes objHTTP.send
if objHTTP.status <> 200 then msgbox "An Error has ocurred: " + objHTTP.status + vbCRLF + objHTTP.statusText End If Set objHTTP = Nothing |
|
|
|
Re: Launch an external Application
Posted: 18 Sep 09 8:37 AM
|
Spot On!
That works perfectly. Thanks for the help.
The trouble with these things is I have been a 'hobbyist' programmer for some time and foolishly voulenteered when some minor modifications were suggested. As per usual those minor modifications became a whole revamp and now that I've done one thing I'm spotlighted for everything!
I enjoy it really (couldn't find an 'insane' laugh!)
Thanks again, Paul. |
|
|
|
Re: Launch an external Application
Posted: 21 Sep 09 8:48 AM
|
Cool that you can dial your phone with a URL.... but WEIRD! And man does that open the door for some crazy "stuff".
Looking at the URL it appears that all you need to do is supply a TO and FROM number and the phone will dial???? Does it require a login/pass combo? I can forsee an easily created trojan like js script that can have your phones ringing non-stop. |
|
|
|
Re: Launch an external Application
Posted: 21 Sep 09 8:54 AM
|
Yes, it is fairly simple but it's secure - firslty the phone system is behind our firewall, but also the url has three variables - From, To and PIN. the PIN is (by default) the same as the extension, but it can be changed to any 4 digit combination.
I believe a lot of the configuration can be done via a web interface, which is the same as most VoIP systems, so if you can determine what information the web page is sending you can pretty much get the phone system to do anything!
Another way of looking at it is that we are not the first to set up this kind of system, so it can't be a major problem |
|
|
|
Re: Launch an external Application
Posted: 21 Sep 09 10:13 AM
|
Ok... I didn't catch the PIN = Password.... Duh! That makes me feel better.
I was also thinking ... even a minor tech savvy person could see the URL somewhere and play a prank on their co-workers.... by sending a URL and their phone dial some crazy place. That would be hours of FUN....lol
|
|
|
|
Re: Launch an external Application
Posted: 21 Sep 09 10:21 AM
|
Oh, yeah, that's already happened!
We also have software on our PC's so we can dial a number by pasting it into the software (we're lazy like that!). The software basically does the same thing, makes a call from the phone system to your phone, then when you pick up it transferrs it to the number dialled.
So if you sign into the phone system as someone else...
Oh yes, that kept people entertained for a couple of hours |
|
|
|