I doubt that you're still looking for an answer to this 6 months later, but here goes:
The Twinkle SIP client supports executing a script when an incoming call is received and I'm sure many others do as well. To get something like this working in Twinkle, you'd write a script like the one below, then go into Edit->User Profile->Scripts and select /path/to/my/script for "Incoming Call".
#!/usr/bin/env python
import os
import re
def get_caller_id(from_hdr):
clid, uri = from_hdr.split(" <sip")
clid = re.sub("\"", "", clid)
# Insert ASCII code for spaces
if re.search("\s", clid):
clid = re.sub("\s", "%20", clid)
return clid
if "SIP_FROM" in os.environ:
from_hdr = os.environ["SIP_FROM"]
if re.match("\"[A-Za-z0-9\s]+\"", from_hdr):
cmd = "firefox "
url = "http://www.google.com/search?q="
caller_id = get_caller_id(from_hdr)
cmd_string = cmd + url + caller_id
# Launch Browser
os.system(cmd_string)
Maybe create a desktop shortcut/hotkey for the database instead? Personally, I prefer something that's predictable over something the computer can screw up on. – digitxp – 2010-08-31T15:30:30.673
rjmunro, did you ever get an answer to this problem? I am looking for something identical - a softphone client that loads a URL to go along with hardware phones. – Christopher Padfield – 2011-10-19T12:30:48.473
@ChristopherPadfield I never did get a solution to this problem. I'm now working somewhere else, where it would be less useful, but am still interested. – rjmunro – 2011-10-19T16:06:45.210