![]() |
2010-12-12
, 17:17
|
Posts: 356 |
Thanked: 123 times |
Joined on Dec 2008
|
#2
|
The Following User Says Thank You to xur17 For This Useful Post: | ||
![]() |
2010-12-12
, 17:28
|
Posts: 93 |
Thanked: 13 times |
Joined on Nov 2010
|
#3
|
I have a bash script that does this. I set it up as a queen beecon widget that runs every time my n900 connects to a network. When it sees that it is connected to a specific wifi network it enables my sip account, changes my forwarding options in google voice, and disables the cell phone part of my phone (to save battery).
The only issue is that it uses my data connection to change my forwarding options after I leave my house, but as long as you click on the queen beecon before you leave, it would work.
Let me know if this doesn't make sense, or if you want me to post the script.
![]() |
2010-12-12
, 17:29
|
Posts: 93 |
Thanked: 13 times |
Joined on Nov 2010
|
#4
|
![]() |
2010-12-12
, 22:16
|
Posts: 356 |
Thanked: 123 times |
Joined on Dec 2008
|
#5
|
![]() |
2010-12-13
, 01:29
|
Posts: 93 |
Thanked: 13 times |
Joined on Nov 2010
|
#6
|
Here you go. I tried to comment it, but I haven't released it before now, so let me know if you have questions:
gv_toggle_phones_public.sh
account_status.py
These both should go in the same directory. You will have to change some settings in the first script, but you shouldn't have to change anything int he second script.
![]() |
2010-12-13
, 01:42
|
Posts: 356 |
Thanked: 123 times |
Joined on Dec 2008
|
#7
|
Thank you. How can i run a python script on N900? How can i install Python runtime?. Sorry for being a noob at N900 scripting.
With the current system i can not do that (i.e. check the SIP first and if its down try the TMO # via GV). So i have the following idea. Not sure if its worth to try. However i have no knowledge writing scripts in N900.
Here are the steps.
1. N900 should send a HTTP GET or POST request to a given address whenever SIP/IM account is getting up or down. (or within regular intervals). Ex. www.myserver.php?sip=1 (when sip is up) or sip=0 when its down.
2. I can write a program in PHP to get the request and change my GV forwarding option according to the sip=1/0 status.
Ex. Say im in WiFi an my Sip is up. Then my N900 should send www.myserver.php?sip=1 and my PHP script on the server grab it and set the GV to farward the call to my SIP no and vise versa.
------------------
I can manage to write the PHP scrip to manage GV forwarding option according to the GET/POST request.
If somebody can help to write a script to send the SIP/IM status (plus WiFi name if possible to check where you are, home or office additionally) via HTTP request it would be great.
Hope the story is clear and any idea appreciated.