msowenks / siphon

Automatically exported from code.google.com/p/siphon
0 stars 0 forks source link

Ringback sometimes plays through speaker when early media enabled #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. In Asterisk, enable early media (e.g. proxy-generated ringback) by
setting progressinband=yes in sip.conf
2. Call Siphon from another extension but don't answer (let it ring at
least once).
3. From Siphon, call another phone.
4. A ringback sound plays through iphone speaker, just like it does when
Siphon receives a call (at least until we get a better ringtone!).  If the
call is answered on the other end, voice will correctly be heard in the
earpiece.

NOTE: if in step 2 I *do* answer the call in Siphon, when Siphon makes an
outbound call (step 3), ringback correctly plays through the earpiece.  So
this seems to depend on whether the last place Siphon routed sound was
through the iPhone speaker or the earpiece.

What is the expected output? What do you see instead?
On an outbound call, ringback should always be heard through the earpiece,
never the iphone speaker.

What version of the product are you using? On what operating system?
Siphon beta 9 on iPhone 3G, firmware 2.1.

Please provide any additional information below.

Original issue reported on code.google.com by dblac...@gmail.com on 25 Oct 2008 at 12:06

GoogleCodeExporter commented 9 years ago
1. Ringback

Siphon calls AudioSessionSetProperty with 
kAudioSessionProperty_OverrideAudioRoute
property and value kAudioSessionOverrideAudioRoute_Speaker before ringing.
And when the user answers change the property to 
kAudioSessionOverrideAudioRoute_None.

Like that, iPhone OS should decide to ring on headset or external speaker.

Maybe I forgot to change the property to kAudioSessionOverrideAudioRoute_None 
when
the call is declined.

2. Specific ring file

If you want to run your ring file and vibrate, we need to call:
AudioServicesCreateSystemSoundID (at beginning of Siphon)
AudioServicesPlayAlertSound (when ringing with timer).

Of course, kAudioServicesPropertyIsUISound must be to 1.

All of this is implemented, I just need a ring file.

Original comment by samuelv0...@gmail.com on 25 Oct 2008 at 8:47

GoogleCodeExporter commented 9 years ago
Siphon beta 10

Original comment by samuelv0...@gmail.com on 6 Nov 2008 at 5:37