News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Need help automating sip uri for "Wakeup calls"

Started by QBZappy, April 04, 2012, 03:42:40 PM

Previous topic - Next topic

QBZappy

Typing "sip:" + "phone number" in the browser brings up my jitsi soft phone and makes an out going call. The following sip uri will do it for me: sip:5145551234@192.16.240.3:5060 (PBX). A voip service provider would work as well.

I am certain some bright light out there knows how to automate this into the task scheduler in order to create a wakeup call service. A bat file or a vbs script, cURL maybe?
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

infin8loop


I found https://gist.github.com/802764

It's in perl and I'm not really a perl coder and the comments look to be French which is Greek to me. 

An online French translator at http://translation.babylon.com/french/to-english/ translates comment:

probablement mieux à faire pour le cacher d'un ps 
to
Probably better to do for the hide of a ps

Gee, thanks.  Now I have something else to waste time on.

LOL



"This has not only been fun, it's been a major expense." - Gallagher

pc44

Quote from: QBZappy on April 04, 2012, 03:42:40 PM
Typing "sip:" + "phone number" in the browser brings up my jitsi soft phone and makes an out going call. The following sip uri will do it for me: sip:5145551234@192.16.240.3:5060 (PBX). A voip service provider would work as well.

I am certain some bright light out there knows how to automate this into the task scheduler in order to create a wakeup call service. A bat file or a vbs script, cURL maybe?

Hi QBZappy,

Try this out and let me know what you think.

Open notepad, paste following contents:
     start http://sip:5145551234@192.16.240.3:5060 (or whatever number you are using)

Then, go to File, Save As.  Here save the file as follows:  "test.bat"  The quotation mark eliminates the default .txt extension on Notepad files and should provide you with a true batch file extension.

Now, go to wherever you saved this file and double-click it.  It should launch your default browser.  If this works, then all you need to do is place the batch file in your Task Scheduler as desired.

Let me know if you are successful :o
pc44

pc44

Edit:   If that doesn't work (I don't really know how the jitsi program interprets the web browser urls), then two other things come to mind.

1) Open desired sip address in browser, and then drag the address from the address bar to your desktop to make a shortcut.
-or-
2) Drag Internet Explorer (or Firefox or Chrome) icon from the Start Menu to your Desktop.  This should a nice, easily-accessible shortcut to your web browser.  Now, right-clicking on that, going to properties should give you the target.  Mine is "C:\Program Files (x86)\Internet Explorer\iexplore.exe"  I would just paste your sip:address link at the end of this.  Click Ok.  And test.

Do you think it'll work?

infin8loop

After posting the link to the perl script I realized I probably misread the request.   The suggestions from pc44 are probably close to what you requested.

However, will launching jitsi simply place a call (ie: ring the phone) and when answered no one will be on the line (assuming the script is running unmanned)?  Also, I'm not sure, but I think maybe orphan open browser windows might be left open for each run.  These might not be issues, but are something to think about. 

The perl script looks like it will actually send an audio file over RTP as part of the call.  This makes my head spin with possibilities if it actually works.  Imagine a "Wake up" audio recording,  "Grandma take your medicine", etc.  I'm a bit "developmentally challenged" at the moment for time (and brain power) for non-work related activities, so I'm just tossing out ideas.




     
"This has not only been fun, it's been a major expense." - Gallagher

QBZappy

#5
infin8loop,

I had a feeling you would come to my rescue. Thanks I will have a look at the link. It would be interesting if we could incorporate a message in the wake up call. Can you take this to the next level? It may be over my head. I am not a coder.

σας ευχαριστώ (..-. .. --. ..- .-. . / .. - / --- ..- -)


pc44,

I had already tried the test.bat method. You know how these things go. That would have been too easy if it worked.

sip:
callto:
tel:

These are urls which can be inserted into a browser that can be associated with an application. Inserting this "sip:5145551234@192.16.240.3:5060" into the browser makes an outgoing call because the jitsi app is associated with sip:

Quote from: pc44 on April 04, 2012, 05:31:52 PM
2) Drag Internet Explorer (or Firefox or Chrome) icon from the Start Menu to your Desktop.  This should a nice, easily-accessible shortcut to your web browser.  Now, right-clicking on that, going to properties should give you the target.  Mine is "C:\Program Files (x86)\Internet Explorer\iexplore.exe"  I would just paste your sip:address link at the end of this.  Click Ok.  And test.

Do you think it'll work?


Adding "sip:5145551234@192.16.240.3:5060" to the end of target in the properties box makes the call.

There you have it. Save this text as a bat file. Run the bat file according to your desired schedule and we have Hotel style wake up calls or reminder calls.


Text:
"C:\Program Files\Mozilla Firefox\firefox.exe" sip:5145551234@192.16.240.3:5060


Anyone wishing to try this will need to configure the url to their local voip provider setting. This should work with other softphones as well. I tried Eyebeam and Bria. It just opened the app without making the call. I haven't spent any time trying to figure if these apps need the sip url tweaked in any particular way.

How to associate "sip:" protocol to the browser (Background reading)
http://kb.mozillazine.org/Register_protocol

Thanks pc44 and infin8loop
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

pc44

Quote from: QBZappy on April 04, 2012, 07:49:06 PM
σας ευχαριστώ (..-. .. --. ..- .-. . / .. - / --- ..- -)

That's all Greek to me :)

Thanks for posting the update and the working solution!  It's nice to know it works... and thanks for putting up with my less-than-perfect random thoughts :D

pc44

QBZappy

Quote from: QBZappy on April 04, 2012, 07:49:06 PM
σας ευχαριστώ (..-. .. --. ..- .-. . / .. - / --- ..- -)

Challenge to anyone who can figure out what it means.  infin8loop you are barred because I know you can read it.
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

RonR

Quote from: QBZappy on April 05, 2012, 09:26:06 AM
Quote from: QBZappy on April 04, 2012, 07:49:06 PM
σας ευχαριστώ (..-. .. --. ..- .-. . / .. - / --- ..- -)
Challenge to anyone who can figure out what it means.

I thank you (figure it out)

QBZappy

                                         W E  H A V E  A  W I N N E R !!!!!!
RonR
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

RevKev

Instead of pushing a url through the browser to open jitsi, use a jitsi command (create a shortcut, edit the properties).

Here's a link for jitsi: http://jitsi.org/index.php/GSOC2009/GeekCommunicator
This looks to be a spec for future enhancements but maybe it's been done.