Ringback tone implementation...

33 views
Skip to first unread message

Jiri

unread,
Sep 17, 2009, 3:45:02 PM9/17/09
to Sipdroid Developers
I have implemented the ringback tone (http://en.wikipedia.org/wiki/
Ringback_tone) feature in the latest Sipdroid v1.0.8. See the file
"sipdroid_ringback.patch". After you apply the patch, you must also
insert the "ringback.ogg" file in the directory /res/raw.

This feature is disabled by default, but it is possible to enable it
in the Settings -> Call Options -> Ringback tone.

I'm not sure if the implementation is correct so I welcome any
comments.

Best regards,
Jiri

Pascal Merle

unread,
Sep 18, 2009, 7:44:17 AM9/18/09
to Sipdroid Developers
Adding ring back tone should not be an option. It is always better
than silence.

I am not sure if it is optimal to add ringing as a new call_state.
Have you checked all
references to call_state if the new state needs to be tested for?

If not then it might be better to just start playing the tone (from
where you set the new
state) and stop it on the next state change (as you already did).

Thanks

Jiri

unread,
Sep 19, 2009, 11:22:07 AM9/19/09
to Sipdroid Developers
On Sep 18, 1:44 pm, Pascal Merle <pmerl...@googlemail.com> wrote:
> Adding ring back tone should not be an option. It is always better
> than silence.

I'm not sure but some switchboard can produce a ringback tone or am I
wrong? Then it would be better to have it as an option but maybe ON by
default.

> I am not sure if it is optimal to add ringing as a new call_state.
> Have you checked all
> references to call_state if the new state needs to be tested for?

No I did not.

> If not then it might be better to just start playing the tone (from
> where you set the new
> state) and stop it on the next state change (as you already did).

The problem is that there is no Context available in the UserAgent
which is neaded for the MediaPlayer. This is why I have implemented
the MediaPlayer into the Receiver.

Pascal Merle

unread,
Sep 19, 2009, 12:42:35 PM9/19/09
to Sipdroid Developers
> I'm not sure but some switchboard can produce a ringback tone or am I
> wrong? Then it would be better to have it as an option but maybe ON by
> default.

Currently there is only silence before answer. So ring back will
always be better than that.

> The problem is that there is no Context available in the UserAgent
> which is neaded for the MediaPlayer. This is why I have implemented
> the MediaPlayer into the Receiver.

Use Receiver.mContext

Jiri

unread,
Sep 19, 2009, 4:19:30 PM9/19/09
to Sipdroid Developers
Please test my new patch (sipdroid_ringback2.patch).
Reply all
Reply to author
Forward
0 new messages