juha-h / baresip-studio

baresip library based SIP client for Android
BSD 3-Clause "New" or "Revised" License
274 stars 70 forks source link

Calling from Contacts app does not remove '%20' #490

Closed futomaki-bit closed 1 month ago

futomaki-bit commented 1 month ago

I have set baresip as default phone app. In the Contacts app I press call (718) 111-1111, baresip would see it as tel:718%201111111

I see in Contact.kt it filters some characters: filterNot{setOf('-', ' ', '(', ')').contains(it)

juha-h commented 1 month ago

I'm not currently able to reproduce this. Could you get adb debug log of the call attempt (https://github.com/juha-h/baresip-studio/wiki/Debugging)?

Edit: Perhaps baresip receives from your contact app %20 instead of space character?

futomaki-bit commented 1 month ago

Edit: Perhaps baresip receives from your contact app %20 instead of space character?

Yes I think that's my issue.

with https://github.com/juha-h/baresip-studio/wiki/Debugging On baresip app, I turned on Debug and SIP Trace [ :heavy_check_mark: ] adb logcat | grep Baresip and adb shell 'logcat --pid=$(pidof -s com.tutpro.baresip)' does not show anything when attempting to call from Google Contacts app. adb logcat does show some logs of ConnectivityService

My device: Samsung Galaxy Z Flip5 on Android 14

juha-h commented 1 month ago

I don't currently have a device with me where I could use Default Phone App setting.

juha-h commented 1 month ago

I was able to get debug of the call:

07-25 21:21:25.952  8567  8567 D Baresip : onNewIntent with action/data 'android.intent.action.CALL/tel:(718)%20111-1111'
07-25 21:21:25.952  8567  8567 D Baresip : Action call to tel:(718)%20111-1111

So it was like I suspected. I'll investigate what is the best way to remove %20.

juha-h commented 1 month ago

Can you try with this: https://box.tutpro.com/tmp/baresip.apk ? Backup before installing.

futomaki-bit commented 1 month ago

Works for me, but hopefully it did not break anything else.

Thank you

juha-h commented 1 month ago

@futomaki-bit Thanks for testing. I committed the fix. Will be included in next version.