Open edimondi opened 1 year ago
Typically the way to read any external text into an application text field, you would add a parameter into the .exe so that you can read this and populate the text field. Something like: “C:/my app.exe 123”. This is typically how this is done.
The problem here is that you want the web page to be able to imitate a call to an executable on your pc… this sounds a lot like virus ;), and probably something that chrome etc are trying to vigorously stop. That being said… there are ways to load browsers in an unsafe way, and maybe it’s possible to just call the url as a file url, with the path to the exe and the number as a parameter… I’m not sure… it may work.
Maybe a "safer" implementation would to make an ajax call to a custom web service within the on_invite web hook where one could pass the client info as well as the phone number. The Windows program would then have to poll the same custom webservice to retrieve the number based on host information.
If Asterisk is the voip server then maybe you can also try connecting the Windows program to listen for AMI events, filter them and get the phone number there instead.
Nice idea. In fact what you would do is host a small web socket service. I think .net May have something out the box. Just make sure your windows app hosts it as 127.0.0.1:XXXX where XXXX is above 1024. Then from the browser connect to the web service as a websocket connection, and parse it json messages based off the built in events.
hi there, i have a question if its possible to insert the phone number into windows app textbox when answering the phone call, is there a way to do it? Thanks