react-native-webrtc / react-native-incall-manager

Handling media-routes/sensors/events during a audio/video chat on React Native
ISC License
559 stars 195 forks source link

Ringback tone is same as Ringtone for iOS #148

Open ghanshyamecosmob opened 4 years ago

ghanshyamecosmob commented 4 years ago

I'm playing ringbacktone for outbound calls using my application.

InCallManager.start({media: 'audio', ringback: '_DEFAULT_'});

For Android, it's playing tring tring tone but it's not same in case of iOS. I'm getting default ringtone of iPhone in case of ringbacktone as well.

Also, can anyone let me know the process to define custom audio files as ringback/ringtone file?

akshaya-rao-s commented 4 years ago

Did you manage to fix this? i am also facing the same thing on android, iOS no tone at all.

saurabh874 commented 3 years ago

@akshaya-rao-s i am also facing same issue do you have any idea how to resolved it?

anniewey commented 2 years ago

Refer to the docs, you need to add the custom audio files to the path specified and rename them.

incallmanager_busytone.mp3
incallmanager_ringback.mp3 
incallmanager_ringtone.mp3 

Then play the audio:

InCallManager.startRingtone('_BUNDLE_') //ringtone
InCallManager.start({media: 'audio', ringback: '_BUNDLE_'}) //ringback

https://github.com/react-native-webrtc/react-native-incall-manager#optional-sound-files-on-android https://github.com/react-native-webrtc/react-native-incall-manager#optional-sound-files-on-ios

iammadanlal commented 8 months ago

@anniewey How can do the same with default system ring for incoming and outgoing. I have tried the DEFAULT value as well. But it playing same for both.