Active Topics

 


Reply
Thread Tools
Posts: 46 | Thanked: 31 times | Joined on Jun 2010 @ Lebanon
#1
Hello,

I would like to know the status of a phone call once programmatically started.

I know so far that i can start a call by:
Code:
dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$NUMBER" uint32:0
And i know that a call has been answered by:
Code:
bus.connect("com.nokia.csd.Call.Instance", "/com/nokia/csd/call/1", "com.nokia.csd.Call.Instance", "AudioConnect", this, SLOT(handleCall(const QDBusMessage&)))
But how do I know that the call has started and that the network is not busy or my contact isn't?

Are there more members in "com.nokia.csd.Call.Instance" other than "AudioConnect"?

Thanks
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call/1 com.nokia.csd.Call.Instance.GetStatus

Retvals (AFAICT):
0 == no call in progress;
1 == call initiaited;
8 == call in progress (dial tones can be heard/recipient has picked up the phone)
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
Posts: 46 | Thanked: 31 times | Joined on Jun 2010 @ Lebanon
#3
Thanks for taking intrest qwerty12!

Perhaps if I explain the purpose of my request things might become more clear.
I'm making a python script, which works on creating a missed call for the other party.
That is, it dials a number, waits for a "valid" dial tone to beep for say 2 seconds, then hangs up.

I got all the mechanics of creating the call and hanging it up and running.
The only problem is, how to distinguish between dialtones (Busy, No Service, etc...)?

Thanks again!
 
Posts: 155 | Thanked: 61 times | Joined on Nov 2009
#4
Originally Posted by karimko View Post
Thanks for taking intrest qwerty12!

Perhaps if I explain the purpose of my request things might become more clear.
I'm making a python script, which works on creating a missed call for the other party.
That is, it dials a number, waits for a "valid" dial tone to beep for say 2 seconds, then hangs up.

I got all the mechanics of creating the call and hanging it up and running.
The only problem is, how to distinguish between dialtones (Busy, No Service, etc...)?

Thanks again!
It's been a while, but can you not open the modem device, send "AT DT <number>" then wait for two "RING"s before sending a <CR> to end the call.
 

The Following 2 Users Say Thank You to phedders For This Useful Post:
Posts: 46 | Thanked: 31 times | Joined on Jun 2010 @ Lebanon
#5
Originally Posted by phedders View Post
It's been a while, but can you not open the modem device, send "AT DT <number>" then wait for two "RING"s before sending a <CR> to end the call.
phedders, I just need a way to be able to make sure the two "RING"s are actual ones not busy tones, or out of service ones. I'm not familiar with modem commands but in your example, how do I distinguish the tones? Is there a commmand for that?

Thanks
 
Posts: 46 | Thanked: 31 times | Joined on Jun 2010 @ Lebanon
#6
After some research I found that if I use modem commands using pnatd I could actually poll the status of the call.
Something like: atd<number>;
then poll every 500ms at+clcc

But i'm sure there is something neater than this.
How can I find out the members com.nokia.csd.Call.Instance?
So far I know there is AudioConnect... What else?
 
Posts: 46 | Thanked: 31 times | Joined on Jun 2010 @ Lebanon
#7
Well peeps, I am giving up.

To give this thread closure I found a loop hole which I think is impossible to overcome.

The application I was intending to do was supposed to create a missed call for the party being called programatically. I have successfuly started a call then hung it up after x seconds, but the problem is that i couldn't figure out the status of the call (Ie. Busy, Out of service..)

I tried two approaches:
  • Dbus route: I found out that there is no way to find if the status of the call is busy, or anything else. I used the signal AudioConnect & looked at telephony-maemo.c to no avail.
  • AT commands via pnatd: I found that i could get busy & invalid number signals, but when the party has their phones turned off or no signal then it's impossible to know as the modem thinks it's still ringing. This helped me with AT commands.

Thanks qwerty12, & phedders for your suggestions.
 

The Following User Says Thank You to karimko For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 07:41.