kyujin-cho / pixel-volte-patch

Pixel IMS: Rootless replacement for Tensor Pixel VoLTE patch
GNU General Public License v3.0
1.34k stars 91 forks source link

VoWiFi on Pixel 7 not working #24

Open phdalandan opened 1 year ago

phdalandan commented 1 year ago

Prior to the most recent stable Android update (yesterday), VoWiFi was working. I could see the wifi icon when calling. However, after updating, I can no longer see this icon. Both Pixel IMS settings and device settings show that VoWifi is enabled but the calls always go through cellular.

The cell service inside my house is next to nothing so VoWiFi was a great option.

Additionally, I have both a physical sim and an eSim

Hoping you could look into this. Thanks!

victor-marino commented 1 year ago

I have just pulled a dump of my carrier_config (adb shell dumpsys carrier_config), as VoWiFi is not working for me either, and I'm seeing this:

ims.ims_user_agent_string = #MANUFACTURER#_#MODEL#_Android#AV#_#BUILD#

I've never had Wi-Fi calling working before, as Google hasn't yet enabled it for my carrier (that's what I'm trying to fix with this patch). So I don't know what my SIP user-agent was before, if any.

But is it possible that the app is incorrectly setting the user agent to this "dummy" value and that's what's preventing VoWiFi calls from going through?

@phdalandan, could you try pulling a dumpsys in both situations (when VoWiFi is working for you and when it isn't) to check if there's any difference in the user agent?

kyujin-cho commented 1 year ago

I have just pulled a dump of my carrier_config (adb shell dumpsys carrier_config), as VoWiFi is not working for me either, and I'm seeing this:

ims.ims_user_agent_string = #MANUFACTURER#_#MODEL#_Android#AV#_#BUILD#

I've never had Wi-Fi calling working before, as Google hasn't yet enabled it for my carrier (that's what I'm trying to fix with this patch). So I don't know what my SIP user-agent was before, if any.

But is it possible that the app is incorrectly setting the user agent to this "dummy" value and that's what's preventing VoWiFi calls from going through?

@phdalandan, could you try pulling a dumpsys in both situations (when VoWiFi is working for you and when it isn't) to check if there's any difference in the user agent?

@victor-marino The template you've mentioned is what android treats as default value for SIP User-Agent, so that it can be used as a fallback when carrier does not provide any specific configuration.

victor-marino commented 1 year ago

Thanks @kyujin-cho! Didn't know that.

And I assume the app respects whatever value is already there in case it's already set, right? Which should be the case for @phdalandan.

I guess it's still possible that my carriers are using a user-agent whitelist, and so I need to set the user-agent to something else for the calls to go through. I'll try to find the value for a certified model and report back.

Aldo97 commented 1 year ago

I guess it's still possible that my carriers are using a user-agent whitelist, and so I need to set the user-agent to something else for the calls to go through. I'll try to find the value for a certified model and report back.

If you find the SIP UA for a galaxy s22, s22+, s22 ultra or xiaomi 12 pro share it because they are the only four phones that are officially supported by my carrier. I tried searching but without success.

adryb commented 1 year ago

"adb shell dumpsys carrier_config" from Galaxy S21 shows the same:

ims.ims_user_agentstring = #MANUFACTURER##MODEL#Android#AV##BUILD#

phdalandan commented 1 year ago

Okay. A little update. After numerous retries and reboots, the VoWiFi is working again. I tried to bring the device outside to get a signal and tried the process again, and it somehow worked.

Looks like having cellular signal while completing the process as well as making sure that the provider supports VoWiFi is key in making this work.

@kyujin-cho

victor-marino commented 1 year ago

I still don't have it working, but did some more investigation:

I can apply the patch, enable VoWiFi and the status in the app shows my IMS Status as Registered. BUT:

Then my IMS Status changes to Unregistered, and I can't even make VoLTE calls anymore (they fall back to 3G, or drop if I force the phone to 4G/5G only).

If I disconnect from Wi-Fi, I'm Registered into the IMS again. Or, if I set the call preference to cellular while on Wi-Fi, I'm also Registered again (and calls will use VoLTE).

So in summary, my phone is unable to register into the IMS through Wi-Fi.

phdalandan commented 1 year ago

@victor-marino I assume you've done the basic things such as reboot multiple times. I just want to know if you keep running the patch every time you reboot your phone or do you just apply the patch once then keep rebooting until it works?

Also, by applying the patch, I mean running Shizuku and checking the status in Pixel IMS.

The reason why I asked is because when I was not able to make it work, I would keep running Shizuku before restarting and I don't know if that somehow resets the patch or not. But afterwards, I tried to apply the patch once, then kept rebooting until it worked.

Every time I rebooted, I would dial ##4636##, then check the IMS status via the dialer and not Pixel IMS app. I would also try to make a call and check both VoLTE and VoWiFi before rebooting again.

Hope this helps!

victor-marino commented 1 year ago

I have just captured some ADB logs of the exact moment un which I activate Wi-Fi and the IMS registration fails against my carrier's ePDG.

It looks like the ePDG returns some kind of response that the Pixel doesn't expect, and the IMS tunnel is closed:

02-09 18:10:05.883  2439 21126 E EpdgTunnelManager[0]: Closing tunnel with exception for apn: ims sessionType:5 error: TYPE: IWLAN_IKE_PROTOCOL_EXCEPTION ERR: 7
02-09 18:10:05.883  2439 21126 E EpdgTunnelManager[0]: DATA:
02-09 18:10:05.883  2439 21126 W System.err: android.net.ipsec.ike.exceptions.InvalidSyntaxException: Unexpected payloads - IKE Delete response should be empty.
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.IkeSessionStateMachine$DeleteBase.validateIkeDeleteResp(IkeSessionStateMachine.java:2301)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.IkeSessionStateMachine$DeleteIkeLocalDelete.handleResponseIkeMessage(IkeSessionStateMachine.java:5348)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.IkeSessionStateMachine$BusyState.handleReceivedIkePacket(IkeSessionStateMachine.java:1868)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.IkeSessionStateMachine$BusyState.processStateMessage(IkeSessionStateMachine.java:1747)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.AbstractSessionStateMachine$ExceptionHandlerBase.processMessage(AbstractSessionStateMachine.java:147)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.utils.StateMachine$SmHandler.processMsg(StateMachine.java:993)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.utils.StateMachine$SmHandler.handleMessage(StateMachine.java:810)
02-09 18:10:05.883  2439 21126 W System.err:   at android.os.Handler.dispatchMessage(Handler.java:106)
02-09 18:10:05.884  2439 21126 W System.err:   at android.os.Looper.loopOnce(Looper.java:201)
02-09 18:10:05.884  2439 21126 W System.err:   at android.os.Looper.loop(Looper.java:288)
02-09 18:10:05.884  2439 21126 W System.err:   at android.os.HandlerThread.run(HandlerThread.java:67)

Searching online, this seems to be the piece of code that throws that exception: https://cs.android.com/android/platform/superproject/+/master:packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/IkeSessionStateMachine.java;drc=49e26db5a23e24239366ae98bb27232d3bcfe496;l=2263

Not sure of where to go from here to be honest. Looks as if Google would need to adapt something in the protocol to communicate with my carrier's ePDG?

azaidi4 commented 1 year ago

@kyujin-cho I've been experiencing something similar, yet different 🤡 (Pixel 6). My carrier supports VoLTE and VoWiFi. Prior to running this patch, VoLTE was already enabled and working, I never saw the setting for enabling WiFi calling. After running patch, I can see the toggle to enable WiFi calling, but when I try to activate it I run into this error.

I've attached my carrier_config, lmk if I could provide anything else that could be of help.

NXij commented 1 year ago

VoWifi had stopped working for me once my carrier got its own carrierconfig with volte allowed. It had previously worked when adding the required bools to the xml in /data/user_de/0/com.android.phone/files (with root). Manually replacing the new xml with the old one does not change anything in this regard.

I see it unlikely to be resolvable on a non-rooted device, would probably make sense to look at the source in aosp for carrierconfig pb loading whether there are additional things set if the carrierconfig gets loaded vs there not being one.

adryb commented 1 year ago

I have just captured some ADB logs of the exact moment un which I activate Wi-Fi and the IMS registration fails against my carrier's ePDG.

It looks like the ePDG returns some kind of response that the Pixel doesn't expect, and the IMS tunnel is closed:

02-09 18:10:05.883  2439 21126 E EpdgTunnelManager[0]: Closing tunnel with exception for apn: ims sessionType:5 error: TYPE: IWLAN_IKE_PROTOCOL_EXCEPTION ERR: 7
02-09 18:10:05.883  2439 21126 E EpdgTunnelManager[0]: DATA:
02-09 18:10:05.883  2439 21126 W System.err: android.net.ipsec.ike.exceptions.InvalidSyntaxException: Unexpected payloads - IKE Delete response should be empty.
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.IkeSessionStateMachine$DeleteBase.validateIkeDeleteResp(IkeSessionStateMachine.java:2301)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.IkeSessionStateMachine$DeleteIkeLocalDelete.handleResponseIkeMessage(IkeSessionStateMachine.java:5348)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.IkeSessionStateMachine$BusyState.handleReceivedIkePacket(IkeSessionStateMachine.java:1868)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.IkeSessionStateMachine$BusyState.processStateMessage(IkeSessionStateMachine.java:1747)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.AbstractSessionStateMachine$ExceptionHandlerBase.processMessage(AbstractSessionStateMachine.java:147)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.utils.StateMachine$SmHandler.processMsg(StateMachine.java:993)
02-09 18:10:05.883  2439 21126 W System.err:   at com.android.internal.net.ipsec.ike.utils.StateMachine$SmHandler.handleMessage(StateMachine.java:810)
02-09 18:10:05.883  2439 21126 W System.err:   at android.os.Handler.dispatchMessage(Handler.java:106)
02-09 18:10:05.884  2439 21126 W System.err:   at android.os.Looper.loopOnce(Looper.java:201)
02-09 18:10:05.884  2439 21126 W System.err:   at android.os.Looper.loop(Looper.java:288)
02-09 18:10:05.884  2439 21126 W System.err:   at android.os.HandlerThread.run(HandlerThread.java:67)

Searching online, this seems to be the piece of code that throws that exception: https://cs.android.com/android/platform/superproject/+/master:packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/IkeSessionStateMachine.java;drc=49e26db5a23e24239366ae98bb27232d3bcfe496;l=2263

Not sure of where to go from here to be honest. Looks as if Google would need to adapt something in the protocol to communicate with my carrier's ePDG?

How you get this logs? I would like to try get mine - for Polish Play operator.

victor-marino commented 1 year ago
adb logcat
IhorSoloviov commented 1 year ago

I guess it's still possible that my carriers are using a user-agent whitelist, and so I need to set the user-agent to something else for the calls to go through. I'll try to find the value for a certified model and report back.

If you find the SIP UA for a galaxy s22, s22+, s22 ultra or xiaomi 12 pro share it because they are the only four phones that are officially supported by my carrier. I tried searching but without success.

As I understand, you mean Lifecell? I'm Pixel 6 user and want to use mostly VoWiFi. IMS shows as unregistered and user agent is empty. Can we just ask Ukrainian users on 4pda to "run adb shell dumpsys carrier_config" in Samsung S22 thread or Ukrainian carriers thread?

kszaq commented 1 year ago

@phdalandan Please try this https://github.com/kyujin-cho/pixel-volte-patch/issues/17#issuecomment-1435661999

victor-marino commented 1 year ago

@phdalandan Please try this #17 (comment)

I can confirm this works for me too! Just adding an 'ims' APN did it :-)

msilcher commented 1 year ago

I can confirm vowifi is working for me too after adding "ims" APN!! Running on Pixel 6a and carrier "Claro AR" from Argentina!!

P.S: First it was only working partially (outgoing calls, not incoming) but after talking to my provider they re-provisioned services and it started working.

amotruk commented 1 year ago

I guess it's still possible that my carriers are using a user-agent whitelist, and so I need to set the user-agent to something else for the calls to go through. I'll try to find the value for a certified model and report back.

If you find the SIP UA for a galaxy s22, s22+, s22 ultra or xiaomi 12 pro share it because they are the only four phones that are officially supported by my carrier. I tried searching but without success.

As I understand, you mean Lifecell? I'm Pixel 6 user and want to use mostly VoWiFi. IMS shows as unregistered and user agent is empty. Can we just ask Ukrainian users on 4pda to "run adb shell dumpsys carrier_config" in Samsung S22 thread or Ukrainian carriers thread?

I also have lifecell and VoLTE/VoWIFI doesn't work on my esim, but it works on another sim that was in iPhone 14 before. Seems the reason is that something is disabled on lifecell side for my esim.

IhorSoloviov commented 1 year ago

I also have lifecell and VoLTE/VoWIFI doesn't work on my esim, but it works on another sim that was in iPhone 14 before. Seems the reason is that something is disabled on lifecell side for my esim.

Do you mean that you have working VoLTE/VoWiFi with Lifecell on Pixel 6 on the sim that was in iphone?

amotruk commented 1 year ago

I also have lifecell and VoLTE/VoWIFI doesn't work on my esim, but it works on another sim that was in iPhone 14 before. Seems the reason is that something is disabled on lifecell side for my esim.

Do you mean that you have working VoLTE/VoWiFi with Lifecell on Pixel 6 on the sim that was in iphone?

yes, also tried my esim with iphone volte doesn't work...

DIMICH-git commented 1 year ago

Also tried to make Lifecell VoLTE work with esim on Pixel 7 with no success. Interestingly national roaming does not work as well.

amotruk commented 1 year ago

@DIMICH-git @IhorSoloviov i made it work:

chuckman commented 1 year ago

@phdalandan Please try this #17 (comment)

I can confirm this works for me too! Just adding an 'ims' APN did it :-)

I see you're also from Spain, is Movistar/O2 your ISP? If that's the case, even with the ims APN I guess you still cannot use VoWifi in airplane mode, right? Check this #152 as I saw in the log that the IKE error might come from a diffie-hellman group not accepted by the server. However, I've compared 2 carrier_config files from a phone that works and the Pixel and the IKE config looks exactly the same.

Shuna322 commented 1 year ago

@DIMICH-git @IhorSoloviov i made it work:

  • first contact lifecell support and ask them to enable VoLTE for your sim (in my case I reached them in telegram and said that I use iPhone 14 and VoLTE doesn't work)
  • create ims apn
  • activate VoLTE and VoWIFI with PixelIMS now both VoLTE and VoWIFI are working for me on Pixel 7 Pro

Greetings recently got an ad about VoLTE on Lifecell and tried activating it but with no success. My IMS status stays Unregistered, I tried contacting support but they tell me that they cannot activate it for me to be forced since they see that my phone doesn't support this feature. I'll try again with a different support guy, but I think they figured something out 😅

Shuna322 commented 1 year ago

@DIMICH-git @IhorSoloviov i made it work:

  • first contact lifecell support and ask them to enable VoLTE for your sim (in my case I reached them in telegram and said that I use iPhone 14 and VoLTE doesn't work)
  • create ims apn
  • activate VoLTE and VoWIFI with PixelIMS now both VoLTE and VoWIFI are working for me on Pixel 7 Pro

Greetings recently got an ad about VoLTE on Lifecell and tried activating it but with no success. My IMS status stays Unregistered, I tried contacting support but they tell me that they cannot activate it for me to be forced since they see that my phone doesn't support this feature. I'll try again with a different support guy, but I think they figured something out 😅

I figured it out!!! So what I did is borrowed my GF's iPhone, added my eSIM to her phone, enabled VoLTE, made a test call, added SIM back to my phone and both VoLTE and VoWiFi worked flawlessly right away. It's stupidly bizarre how carriers will simply lock you out of some of the useful features in the modern world just because you are not on their fancy-allowed list... P.S. Clarification on my full course of action. Setup Pixel IMS normally -> Add ims apn in settings -> Inserted Sim in device from a supported devices list from my carrier (iPhone 13) -> activated VoLTE feature with carrier -> Made a test call -> Inserted Sim back into my Pixel 7 Pro -> Verified IMS Status changed from Unregistered to Registered -> Used VoWiFi and VoLTE

StepanSad commented 1 year ago

@DIMICH-git @IhorSoloviov i made it work:

  • first contact lifecell support and ask them to enable VoLTE for your sim (in my case I reached them in telegram and said that I use iPhone 14 and VoLTE doesn't work)
  • create ims apn
  • activate VoLTE and VoWIFI with PixelIMS now both VoLTE and VoWIFI are working for me on Pixel 7 Pro

Greetings recently got an ad about VoLTE on Lifecell and tried activating it but with no success. My IMS status stays Unregistered, I tried contacting support but they tell me that they cannot activate it for me to be forced since they see that my phone doesn't support this feature. I'll try again with a different support guy, but I think they figured something out 😅

I figured it out!!! So what I did is borrowed my GF's iPhone, added my eSIM to her phone, enabled VoLTE, made a test call, added SIM back to my phone and both VoLTE and VoWiFi worked flawlessly right away. It's stupidly bizarre how carriers will simply lock you out of some of the useful features in the modern world just because you are not on their fancy-allowed list... P.S. Clarification on my full course of action. Setup Pixel IMS normally -> Add ims apn in settings -> Inserted Sim in device from a supported devices list from my carrier (iPhone 13) -> activated VoLTE feature with carrier -> Made a test call -> Inserted Sim back into my Pixel 7 Pro -> Verified IMS Status changed from Unregistered to Registered -> Used VoWiFi and VoLTE

I contacted Lifecell with this problem, they said that reinserting the sim card from a supported device to a "artificially activated" one will not work.Is it true that you were able to activate VoLTE on an unsupported device? I'm using a pixel 5, would this method work for it?

arsradu commented 1 year ago

Pixel 5 devices are not supported by this software. Only Pixel 6 and up.

StepanSad commented 1 year ago

Oh, ok, thanks

Shuna322 commented 1 year ago

I contacted Lifecell with this problem, they said that reinserting the sim card from a supported device to a "artificially activated" one will not work.Is it true that you were able to activate VoLTE on an unsupported device? I'm using a pixel 5, would this method work for it?

Yeah, the best working method is to put the SIM card into a supported device to activate the feature. After that, it was working flawlessly (but you need to reactivate it after every update)

Here is my Pixel 7 Pro: image image

VolodymyrHlazovyi commented 2 months ago

для використання VoLTE Lifecell зверніться до оператора для реєстрації IMS, її виконують вручну)