![]() |
2010-01-21
, 00:57
|
Posts: 236 |
Thanked: 223 times |
Joined on Oct 2009
@ NE UK
|
#12
|
#!/usr/bin/perl # listen for incoming calls $dbus_mon_cmd = "/usr/bin/dbus-monitor " . "--system \"type='signal',path=" . "'/com/nokia/csd/call',interface='com.nokia.csd.Call'\""; # map incoming numbers to ringtones %tones = ( # gf number '077XXXXXX' => '/home/user/MyDocs/.sounds/harp.wav', # boss's number '01XXXXXXX' => '/home/user/MyDocs/.sounds/parp.wav', 'default' => '/home/user/MyDocs/.sounds/mystery.wav', ); # play a file in media player via dbus. sub pf($) { ($f) = @_; $pf_cmd = "dbus-send --print-reply " . "--dest=com.nokia.mediaplayer " . "/com/nokia/mediaplayer com.nokia.mediaplayer" . ".mime_open string:\"file:///$f\""; system("$pf_cmd &"); } # start listening on dbus open(DBUS, "$dbus_mon_cmd|") or die "couldn't read output from dbus-monitor: $!"; $debug=0; while(<DBUS>) { print if($debug); # find the incoming number. if(/string\s"(\d*)"/) { $num = $1; print "$num is calling..\n"; if($num =~ /^\d+$/ and ($tones{$num})) { # play corresponding tone pf($tones{$num}); } else { pf($tones{'default'}); } } }
![]() |
2010-02-10
, 13:15
|
Posts: 179 |
Thanked: 99 times |
Joined on Feb 2010
@ Yorkshire, UK
|
#13
|
![]() |
2010-03-03
, 21:23
|
|
Posts: 1,296 |
Thanked: 1,773 times |
Joined on Aug 2009
@ Budapest, Hungary
|
#14
|
![]() |
2010-03-05
, 20:02
|
Posts: 228 |
Thanked: 145 times |
Joined on Dec 2009
|
#15
|
![]() |
2010-03-05
, 20:08
|
Posts: 1,179 |
Thanked: 770 times |
Joined on Nov 2009
|
#16
|
I just got the N900 and can't believe this function is missing. For me it is work related. I can set various ringtones for mates etc. And ignore them when at work, but if the missus rings me I know it is slightly more serious or important and can answer just by ring tone. Vice versa, at weekends if the boss calls I can ignore it (unless 'on call') A glowing error not to have it.
I come from HTC phones that have had this for years as standard and It should be added.
![]() |
2010-03-05
, 20:49
|
Posts: 47 |
Thanked: 19 times |
Joined on Jan 2010
|
#17
|
![]() |
2010-03-05
, 21:55
|
Posts: 104 |
Thanked: 60 times |
Joined on Dec 2009
@ London
|
#18
|
Here is my idea:
We should write a daemon which intercepts the phone calls, and BEFORE the ringtone starts, it would rewrite the config file which stores which audio file should be played.
Then after the call is received, it would rewrite the config to its original value.
![]() |
2010-03-06
, 00:53
|
|
Posts: 1,296 |
Thanked: 1,773 times |
Joined on Aug 2009
@ Budapest, Hungary
|
#19
|
I agree that sounds like the best way to do it. Would be nice to then have a plugin for Contacts which configured the daemon and told it the path to the new ringtone.
The Following User Says Thank You to Venemo For This Useful Post: | ||
![]() |
2010-03-29
, 00:35
|
Posts: 323 |
Thanked: 76 times |
Joined on Jan 2010
|
#20
|
Just read somewhere else that you have 2 different setups for calendar and general alarm. what alarm do you mean? different per clock alarm? Thats what I read from the starting post. Per calendar notification setup would be another idea but that should be filed with the alarm system. Is alarmd handling phone calls? If not this topic should be split into two, one for alarmd and one for the call handler.
Please request a solution move from the collecting brainstorm.
useful links for newcomers: New members say hello, New users start here, Community subforum, Beginners' wiki page, Maemo5 101, FAQ
Last edited by chemist; 2010-01-21 at 00:41.