Cantemir Mihu wrote:
again about the different phone states: If I make a call to WP NG, then I receive following debug messages for a conversation:

PhoneCall: call state changed state=PCSIncoming
PhoneCall: call state changed state=PCSOk
PhoneCall: call accepted
PhoneCall: call state changed state=PCSClosed

The PhoneCallStateRinging state does not appear. Why?

Just discovered that my diagram is wrong

for an incoming call:
PhoneCallStateIncoming
PhoneCallStateTalking

for an outgoing call:
PhoneCallStateDialing
PhoneCallStateRinging
PhoneCallStateTalking

(PhoneCallStateTalking was showing PhoneCallStateOk because PhoneCallStateTalking::toString() was returning a wrong string)


SIP trace is for an incoming phone call is:
- server -> client INVITE sip:client@        //PhoneCallStateIncoming
- client -> server 180 Ringing
//User clicks on accept call button
- client -> server 200 OK
- server -> client ACK sip:client@   //PhoneCallStateTalking

So there is only 2 states (PhoneCallStateInconing & PhoneCallStateTalking) corresponding to the 2 SIP msg (INVITE & ACK) from the server. There is no need for a PhoneCallStateRinging when receiving a phone call.

So the right way to accept a call is:
on state incoming: start a ringing sound
the pick up with PhoneCall::accept()
then hang up with PhoneCall:close()

Is thir right?

You don't have to play a ringing sound since there is a ring back tone.
So just do accept() and that's all.

--
Tanguy Krotoff <[EMAIL PROTECTED]>
http://dev.openwengo.com
_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to