cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The startPlayingSoundFile function is not playing on iOS

koganiz
Contributor
Hi guys,
 
I'm implementing the SDK based on the VideoCallKitSwift swift sample.
SDK 5.23.5 dynamic, iOS 16.5.1.
Not sure if it's related, but the hosting app is in SwiftUI.
Everything looks good so far, the only problem I have is the startPlayingSoundFile function.
It's not failing, and in the log I see the line:
 
[audio-controller] Successfully played audio file at path '/private/var/containers/Bundle/Application/579036B2-938F-4708-8EF9-6BADD83546A4/test.app/ringback.wav'
 
The audio file I took from the sample folder.
Sometimes only when I stop in debugger I can hear the ring for a short while, but then it stops.
 
Any ideas?
 
Here is the code.
 do {
try AppDelegate.callKitMediator.client?.audioController.startPlayingSoundFile(withPath: Bundle.main.path(forResource: "ringback", ofType: "wav"), looping: true)
} catch {
os_log("WARNING: path for resource %{public}@ not found in the main bundle", log: self.customLog, type: .error, "ringback.wav")
}
 
 
2 ACCEPTED SOLUTIONS

Accepted Solutions

koganiz
Contributor

I found how to fix it.

When the function is running on a background thread it works fine:

 

 

DispatchQueue.global(qos: .background).async {
          do {
              try AppDelegate.callKitMediator.client?.audioController.startPlayingSoundFile(withPath: Bundle.main.path(forResource: "ringback", ofType: "wav"), looping: true)
          } catch {
            os_log("WARNING: path for resource %{public}@ not found in the main bundle", log: self.customLog, type: .error, "ringback.wav")
          }
      }

 

 

View solution in original post

Roland_Ian
Employee
Employee

Hi,

 

Thanks for the feedback in regards of the SwiftUI code implementation. We will produce some SwiftUI code reference documentation going forward. 

 

In answer to your questions:

 

Are Local network permissions required for stable video signal?

If you are on a mobile data connection then local network permission is not required (4G / 5G). This is discerned by Apple / iOS and is outside of the Sinch SDK control.

 

Again this restriction is because of Apples definition of a local network, we use the WebRTC library in the Sinch SDK, it communicates between two peers and UDP is the primary protocol for sending and receiving media, if a path is discerned as available on your local network then you need this permission (read on..)

 

Apple define the WebRTC ICE candidate gathering as needing the local network, as it can include your local interfaces. There could be UDP ports assigned on different interfaces of your device (Wifi, Mobile data etc.) to find the optimal way of sending / receiving media) whilst discerning the best ICE candidate.  If both your devices are on the local network this is the most optimal path for the media to traverse.

 

This is a valid use-case for say clients used within the same local network.  Apple added this change in iOS 14 and onwards (see the Apple developer link below to see what Apple defines as "local" network traffic (opening a UDP port for example)

 

Notes:

Apple local network definition

https://developer.apple.com/forums/thread/663874 

WebRTC report of changes in iOS 14 for this behaviour

https://bugs.chromium.org/p/webrtc/issues/detail?id=11859

 

For some reason calling another phone with the same app outside my local network doesn't work

Not clear what doesn't work here, the call is not received?  Do you see the push arrive when receiving the call in the XCode logs? 

 

Example from sample application of push message arriving:

 

 

2023-08-01 14:43:01.654947+0200 SinchCallKit[532:51880] [AppDelegate] didReceiveIncomingPushWithPayload: {
    aps =     {
        alert =         {
            "loc-key" = "SIN_INCOMING_CALL";
        };
    };
    sin = "{\"version\":4,\"type\":1,\"session_id\":\"46fd4983-5432-4c98-91f5-e4b88a3aa65b\",\"timestamp\":1690893781,\"user_id\":\"shrubbery\",\"flags\":0,\"domain\":\"mxp\",\"public_headers\":{\"clientOS\":\"pfcclient\"}}";
}

 

 

applicationWillTerminate, it didn't abort the call

Correct if you terminate the application from the OS there is no way of aborting the call.

 

Roland-Ian Clothier, Developer Support Engineer

View solution in original post

9 REPLIES 9

koganiz
Contributor

I found how to fix it.

When the function is running on a background thread it works fine:

 

 

DispatchQueue.global(qos: .background).async {
          do {
              try AppDelegate.callKitMediator.client?.audioController.startPlayingSoundFile(withPath: Bundle.main.path(forResource: "ringback", ofType: "wav"), looping: true)
          } catch {
            os_log("WARNING: path for resource %{public}@ not found in the main bundle", log: self.customLog, type: .error, "ringback.wav")
          }
      }

 

 

Roland_Ian
Employee
Employee

Hi!

Glad to hear you fixed your issue so quickly.  Was there anything that you think might have been clearer in the sample application in this regard  (background thread) for your SDK implementation?

 

We are always happy to get feedback from developers.

 

Roland-Ian Clothier, Developer Support Engineer

Hi,

 

A SwiftUI code implementation would be nice 🙂

 

I also couldn't find how to abort an ongoing call when exiting the app. I tried to do it in the applicationWillTerminate, it didn't abort the call, probably because the app terminated the function before it was executed.

 

 

 

func applicationWillTerminate(_ application: UIApplication) {
        if let call = AppDelegate.callKitMediator.currentCall() {
            AppDelegate.callKitMediator.end(call:  call)
        }
        if let client = AppDelegate.callKitMediator.client {
            client.unregisterPushNotificationDeviceToken()
            client.terminateGracefully()
        }
}

 

 

Another thing, I have 3 phones, 2 in my home network, and 1 outside of my network, all have the same app, I logged in with deafferent user ids to each one of them. The 2 phones in my network work fine when calling each other, the third phone can call only 1 of the home phones, and can't call the other home phone. None of the home phones can call the phone outside my home.

 

Phone 1 (Home) <-> Phone 2 (Home) - good
Phone 3 (Office) -> Phone 1 (Home) - good

Phone 1 (Home) -> Phone 3 (Office) - no call

Phone 3 (Office) <-> Phone 2 (Home) - no call

 

Any ideas?

 

Thank you!

Igor Kogan

Roland_Ian
Employee
Employee

Hi,

 

Thanks for the feedback in regards of the SwiftUI code implementation. We will produce some SwiftUI code reference documentation going forward. 

 

In answer to your questions:

 

Are Local network permissions required for stable video signal?

If you are on a mobile data connection then local network permission is not required (4G / 5G). This is discerned by Apple / iOS and is outside of the Sinch SDK control.

 

Again this restriction is because of Apples definition of a local network, we use the WebRTC library in the Sinch SDK, it communicates between two peers and UDP is the primary protocol for sending and receiving media, if a path is discerned as available on your local network then you need this permission (read on..)

 

Apple define the WebRTC ICE candidate gathering as needing the local network, as it can include your local interfaces. There could be UDP ports assigned on different interfaces of your device (Wifi, Mobile data etc.) to find the optimal way of sending / receiving media) whilst discerning the best ICE candidate.  If both your devices are on the local network this is the most optimal path for the media to traverse.

 

This is a valid use-case for say clients used within the same local network.  Apple added this change in iOS 14 and onwards (see the Apple developer link below to see what Apple defines as "local" network traffic (opening a UDP port for example)

 

Notes:

Apple local network definition

https://developer.apple.com/forums/thread/663874 

WebRTC report of changes in iOS 14 for this behaviour

https://bugs.chromium.org/p/webrtc/issues/detail?id=11859

 

For some reason calling another phone with the same app outside my local network doesn't work

Not clear what doesn't work here, the call is not received?  Do you see the push arrive when receiving the call in the XCode logs? 

 

Example from sample application of push message arriving:

 

 

2023-08-01 14:43:01.654947+0200 SinchCallKit[532:51880] [AppDelegate] didReceiveIncomingPushWithPayload: {
    aps =     {
        alert =         {
            "loc-key" = "SIN_INCOMING_CALL";
        };
    };
    sin = "{\"version\":4,\"type\":1,\"session_id\":\"46fd4983-5432-4c98-91f5-e4b88a3aa65b\",\"timestamp\":1690893781,\"user_id\":\"shrubbery\",\"flags\":0,\"domain\":\"mxp\",\"public_headers\":{\"clientOS\":\"pfcclient\"}}";
}

 

 

applicationWillTerminate, it didn't abort the call

Correct if you terminate the application from the OS there is no way of aborting the call.

 

Roland-Ian Clothier, Developer Support Engineer

Thank you for the info!

 

Here is the clarification, I have 3 phones, 2 in my home network, and 1 outside of my network, all have the same app, I logged in with deafferent user ids to each one of them. The 2 phones in my network work fine when calling each other, the third phone can call only 1 of the home phones, and can't call the other home phone. None of the home phones can call the phone outside my home.

 

Phone 1 (Home) <-> Phone 2 (Home) - good
Phone 3 (Office) -> Phone 1 (Home) - good

Phone 1 (Home) -> Phone 3 (Office) - call not received

Phone 3 (Office) <-> Phone 2 (Home) - call not received

 

Here is the caller log when the call in not received by the callee:

 

2023-08-01 09:04:44.067312-0400 Badge Messenger[1833:1131980] [CallKitMediator.CXProviderDelegate] provider perform action: CXStartCallAction
2023-08-01 09:04:44.070571-0400 Badge Messenger[1833:1132329] [audiosession] Successfully set audio session category 'AVAudioSessionCategoryPlayback'
2023-08-01 09:04:44.070603-0400 Badge Messenger[1833:1132329] [call] [980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A] callUserWithId: member3
2023-08-01 09:04:44.073487-0400 Badge Messenger[1833:1132474] [http] REQUEST 1: Request GET https://ocra.api.sinch.com/ocra/v1/users/member2/instances/c3524d32-6f51-4c04-9674-0cc17b44216e/iceServers
Accept: application/json
x-sin-cc: userId=bWVtYmVyMg,instanceId=c3524d32-6f51-4c04-9674-0cc17b44216e
x-sin-client-obj-id: 7774c984-10c8-486a-ae69-d732fbad8b2e
x-sin-client-platform: ios
x-sin-date: 20230801T130444Z
x-sin-client-version: 5.23.5+d30bd48e
x-sin-request-id: c8ae11d1-1626-4337-acda-5cba6e76fa21
x-sin-api-key-id: c182cb3d-d287-4b65-868c-7a22448e16a3
x-sin-client-lang-flavor: swift
Authorization: instance-v1 c182cb3d-d287-4b65-868c-7a22448e16a3 bWVtYmVyMg== c3524d32-6f51-4c04-9674-0cc17b44216e fab4832c4bb3c1d5170ca07f4ff13ef7c12e98cda7f005e0fc6cc2537779b3cb
2023-08-01 09:04:44.074407-0400 Badge Messenger[1833:1132329] [callclient] trying to get a call instance with non-existing id: 980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A
2023-08-01 09:04:44.193900-0400 Badge Messenger[1833:1132474] [call-client] [980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A] -[SINCallClient provider:didActivateAudioSession:]
2023-08-01 09:04:44.547594-0400 Badge Messenger[1833:1132546] [http] REQUEST 1: Response status code: 200, body: {"iceServers":[{"validUntil":"2023-08-02T13:04:44Z","urls":["turn:3.231.219.152:3478?transport=udp","stun:3.231.219.152:3478","turn:[2600:1f18:322:d703:fccc:91e4:4ce7:1e46]:3478?transport=udp","stun:[2600:1f18:322:d703:fccc:91e4:4ce7:1e46]:3478"],"username":"1690981484:1ea77f95:68578107cfa895c7200e295dcdf4c520d08cf2c8759064dee3775554abc3a1ff","credentialType":"password","password":"UBvhMi73FrvdEM399PKrSEqPhPc="}]}
2023-08-01 09:04:44.555447-0400 Badge Messenger[1833:1132546] [webrtc-pc] Created new SINPeerConnection for instance: com.sinch.rtc.private.default-instance
2023-08-01 09:04:44.557077-0400 Badge Messenger[1833:1132546] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Will apply (local) session description:
v=0
o=- 6379358496909222641 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=extmap-allow-mixed
a=msid-semantic: WMS SINMS0
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Eu63
a=ice-pwd:nZ1GqA3ge+t3qYHrZAUXdvDy
a=ice-options:trickle renomination
a=fingerprint:sha-256 F0:0C:0A:12:A0:1E:A9:72:6A:EC:EE:B6:EB:3C:11:9C:D7:A6:EE:88:4F:0A:50:BE:D6:13:F9:53:EE:4B:7D:42
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:SINMS0 SINMS0a0
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:2894755433 cname:/w4JX1ghPk4COIV7
a=ssrc:2894755433 msid:SINMS0 SINMS0a0
2023-08-01 09:04:44.557929-0400 Badge Messenger[1833:1132546] [webrtc] (audio_device_generic.cc:18): BuiltInAECIsAvailable: Not supported on this platform
2023-08-01 09:04:44.558035-0400 Badge Messenger[1833:1132546] [webrtc] (audio_device_generic.cc:28): BuiltInAGCIsAvailable: Not supported on this platform
2023-08-01 09:04:44.558211-0400 Badge Messenger[1833:1132475] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] PeerConnection signaling state changed: HAVE_LOCAL_OFFER
2023-08-01 09:04:44.559205-0400 Badge Messenger[1833:1132546] [webrtc] (audio_device_generic.cc:18): BuiltInAECIsAvailable: Not supported on this platform
2023-08-01 09:04:44.559279-0400 Badge Messenger[1833:1132546] [webrtc] (audio_device_generic.cc:28): BuiltInAGCIsAvailable: Not supported on this platform
2023-08-01 09:04:44.560228-0400 Badge Messenger[1833:1132546] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] ICE gathering state changed: GATHERING
2023-08-01 09:04:44.560518-0400 Badge Messenger[1833:1132546] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] ICE candidate generated: candidate:3129798225 1 udp 2122265343 fd86:c0ff:bee9:b14:4fe:bb23:7271:4d35 57526 typ host generation 0 ufrag Eu63 network-id 2 network-cost 10
2023-08-01 09:04:44.560573-0400 Badge Messenger[1833:1132546] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:04:44.560793-0400 Badge Messenger[1833:1132329] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] ICE candidate generated: candidate:1579721983 1 udp 2122194687 192.168.0.46 62069 typ host generation 0 ufrag Eu63 network-id 1 network-cost 10
2023-08-01 09:04:44.561180-0400 Badge Messenger[1833:1132546] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] PeerConnection signaling state changed: HAVE_LOCAL_OFFER
2023-08-01 09:04:44.561237-0400 Badge Messenger[1833:1132546] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Successfully set local session description:
v=0
o=- 6379358496909222641 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=extmap-allow-mixed
a=msid-semantic: WMS SINMS0
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Eu63
a=ice-pwd:nZ1GqA3ge+t3qYHrZAUXdvDy
a=ice-options:trickle renomination
a=fingerprint:sha-256 F0:0C:0A:12:A0:1E:A9:72:6A:EC:EE:B6:EB:3C:11:9C:D7:A6:EE:88:4F:0A:50:BE:D6:13:F9:53:EE:4B:7D:42
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:SINMS0 SINMS0a0
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:2894755433 cname:/w4JX1ghPk4COIV7
a=ssrc:2894755433 msid:SINMS0 SINMS0a0
2023-08-01 09:04:44.561485-0400 Badge Messenger[1833:1132546] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Not applicable to apply remote ICE candidates (awaiting both local and remote session descriptions)
2023-08-01 09:04:44.561509-0400 Badge Messenger[1833:1132546] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Pending emitting locally generated ICE candidate
2023-08-01 09:04:44.561524-0400 Badge Messenger[1833:1132546] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Pending emitting locally generated ICE candidate
2023-08-01 09:04:44.561763-0400 Badge Messenger[1833:1132546] [call] [980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A] isCallValidForActions: YES
2023-08-01 09:04:44.561783-0400 Badge Messenger[1833:1132546] [call] [980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A] Start signaling
2023-08-01 09:04:44.562410-0400 Badge Messenger[1833:1132391] [pubsub] beginning background task with token: 1 (channel: 5093e4a3-a4b0-43c7-9516-c24f8e633196S)
2023-08-01 09:04:44.563352-0400 Badge Messenger[1833:1132391] [http] REQUEST 2: Request POST https://ocra.api.sinch.com/ocra/v2/calls
Accept: application/json
Content-Type: application/json
x-sin-cc: userId=bWVtYmVyMg,instanceId=c3524d32-6f51-4c04-9674-0cc17b44216e,callId=980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A
x-sin-client-obj-id: 7774c984-10c8-486a-ae69-d732fbad8b2e
x-sin-client-platform: ios
x-sin-client-version: 5.23.5+d30bd48e
x-sin-date: 20230801T130445Z
x-sin-request-id: c166b29c-8f1c-440f-af92-158e4640c9e8
x-sin-api-key-id: c182cb3d-d287-4b65-868c-7a22448e16a3
x-sin-client-lang-flavor: swift
Authorization: instance-v1 c182cb3d-d287-4b65-868c-7a22448e16a3 bWVtYmVyMg== c3524d32-6f51-4c04-9674-0cc17b44216e f1b1cc0a343a9971f4bb1474b4cbb8ebaab59c1cefeba0ccd641cb45d698abd9
{"callId":"980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A","cli":"","destination":{"domain":"mxp","identity":"member3","type":"userId"},"legacyMediaProxyEngage":false,"requestedAudio":true,"requestedVideo":false,"rtcOffer":{"sdp":"v=0\r\no=- 6379358496909222641 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS SINMS0\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:Eu63\r\na=ice-pwd:nZ1GqA3ge+t3qYHrZAUXdvDy\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 F0:0C:0A:12:A0:1E:A9:72:6A:EC:EE:B6:EB:3C:11:9C:D7:A6:EE:88:4F:0A:50:BE:D6:13:F9:53:EE:4B:7D:42\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendrecv\r\na=msid:SINMS0 SINMS0a0\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:63 red/48000/2\r\na=fmtp:63 111/111\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:102 ILBC/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:2894755433 cname:/w4JX1ghPk4COIV7\r\na=ssrc:2894755433 msid:SINMS0 SINMS0a0\r\n","type":"offer"}}
2023-08-01 09:04:44.564090-0400 Badge Messenger[1833:1132391] [pubsub] Pubnub request SCHEDULED (ID=5EAEF882-D55C-487D-880E-16DD5AFB85C5, URL=https://pubsub-ga.api.sinch.com/subscribe/subr-c-dd0a1338-8ee1-4bc4-9627-e986466c4287/5093e4a3-a4b0-43c7-9516-c24f8e633196S/0/0?uuid=f0f9b4ed-00ef-4ccd-86ae-beef65151a2f, NST-VoIP: NO)
2023-08-01 09:04:44.564384-0400 Badge Messenger[1833:1132391] [pubsub] Pubnub request STARTED (ID=5EAEF882-D55C-487D-880E-16DD5AFB85C5)
2023-08-01 09:04:44.616035-0400 Badge Messenger[1833:1132329] [webrtc] (turn_port.cc:856): Port[2061a00:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65
2023-08-01 09:04:44.664488-0400 Badge Messenger[1833:1132475] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] ICE candidate generated: candidate:402512895 1 udp 41820159 3.231.219.152 45426 typ relay raddr 142.189.220.99 rport 62069 generation 0 ufrag Eu63 network-id 1 network-cost 10
2023-08-01 09:04:44.664607-0400 Badge Messenger[1833:1132475] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Pending emitting locally generated ICE candidate
2023-08-01 09:04:44.684614-0400 Badge Messenger[1833:1132391] [pubsub] Pubnub request SUCCESS (ID=5EAEF882-D55C-487D-880E-16DD5AFB85C5)
2023-08-01 09:04:44.685173-0400 Badge Messenger[1833:1132329] [pubsub] Pubnub request SCHEDULED (ID=9540277F-FDF5-4E9E-898B-266BCA025BEF, URL=https://pubsub-ga.api.sinch.com/subscribe/subr-c-dd0a1338-8ee1-4bc4-9627-e986466c4287/5093e4a3-a4b0-43c7-9516-c24f8e633196S/0/16908950740000000?uuid=f0f9b4ed-00ef-4ccd-86ae-beef65151a2f, NST-VoIP: NO)
2023-08-01 09:04:44.685617-0400 Badge Messenger[1833:1132391] [client-internal] onPubSubSubscriptionSuccess: userInfo: {
    channel = "5093e4a3-a4b0-43c7-9516-c24f8e633196S";
    subscribeSequence = 1;
    timetoken = 0;
}
2023-08-01 09:04:44.686999-0400 Badge Messenger[1833:1132546] [http] REQUEST 2: Response status code: 200, body: {"callId":"980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A","mxpEncryptionKey":"rZ2+iYR45VFV4XO3CrvhVw==","mxpSignalChannel":"4ae55e8d-709a-4f0c-b614-5bd12ddd1ef5S","instances":[{"id":"0a04f6d4-f832-4d6e-82ef-56bbc4b6a40b","capabilities":["ice-proxy.1","ocra.1","p2p","push","push.2","push.3","push.4","turn.1","turn.2"],"pushProfile":{"maxPayloadSize":4096,"managed":true}},{"id":"9c070d5c-22df-4e2c-a864-3f65be4adadb","capabilities":["ice-proxy.1","ocra.1","p2p","push","push.2","push.3","push.4","turn.1","turn.2"]},{"id":"adeac9df-4a64-46b4-9e11-5790424abd19","capabilities":["ice-proxy.1","ice-restart.1","ocra.1","p2p","push","push.2","push.3","push.4","turn.1","turn.2"]},{"id":"0afc9d32-0156-459e-a300-bac7c487f22a","capabilities":["ice-proxy.1","ocra.1","p2p","push","push.2","push.3","push.4","turn.1","turn.2"]}],"startTime":"2023-08-01T13:04:44Z","legacyRelayIceCandidates":[],"apiBaseUrl":"https://ocra-use1.api.sinch.com"}
2023-08-01 09:04:44.687298-0400 Badge Messenger[1833:1132546] [pubsub] Pubnub request STARTED (ID=9540277F-FDF5-4E9E-898B-266BCA025BEF)
2023-08-01 09:04:44.689938-0400 Badge Messenger[1833:1132391] [http] REQUEST 3: Request POST https://ocra.api.sinch.com/ocra/v2/pushNotifications
Accept: application/json
Content-Type: application/json
x-sin-cc: userId=bWVtYmVyMg,instanceId=c3524d32-6f51-4c04-9674-0cc17b44216e,callId=980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A
x-sin-client-obj-id: 7774c984-10c8-486a-ae69-d732fbad8b2e
x-sin-client-platform: ios
x-sin-client-version: 5.23.5+d30bd48e
x-sin-date: 20230801T130445Z
x-sin-request-id: 3056f020-5f3e-45bc-9278-b3d85842d88f
x-sin-api-key-id: c182cb3d-d287-4b65-868c-7a22448e16a3
x-sin-client-lang-flavor: swift
Authorization: instance-v1 c182cb3d-d287-4b65-868c-7a22448e16a3 bWVtYmVyMg== c3524d32-6f51-4c04-9674-0cc17b44216e 4e7201449c70e122b33a6267714591531f289ad91090fc20ce56439725971244
[{"collapseId":"980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A","templateId":"incoming_call","templateParameters":{"sinch":"{\"domain\":\"mxp\",\"flags\":0,\"public_headers\":{},\"session_id\":\"980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A\",\"timestamp\":1690895084,\"type\":1,\"user_id\":\"member2\",\"version\":4}"},"to":[{"instanceId":"0a04f6d4-f832-4d6e-82ef-56bbc4b6a40b","userId":"member3"}]}]
2023-08-01 09:04:44.691320-0400 Badge Messenger[1833:1132546] [call] [980C8CF4-2C21-4BEE-AACC-8B6537FC6C4A] callDidProgress
Sinch call callback: unknown
Sinch call callback: callDidProgress
2023-08-01 09:04:44.712526-0400 Badge Messenger[1833:1132391] [audiosession] Successfully set audio session category 'AVAudioSessionCategoryPlayback'
2023-08-01 09:04:44.806216-0400 Badge Messenger[1833:1132391] [http] REQUEST 3: Response status code: 200, body:
2023-08-01 09:04:44.813593-0400 Badge Messenger[1833:1132391] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:04:44.814690-0400 Badge Messenger[1833:1132329] [audio-controller] Successfully played audio file at path '/private/var/containers/Bundle/Application/1A262B4D-B6D9-488D-A2B5-A6EEC4BB4A9C/Badge Messenger.app/ringback.wav'
2023-08-01 09:04:44.872321-0400 Badge Messenger[1833:1132391] [webrtc] (turn_port.cc:856): Port[2061a00:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65
2023-08-01 09:04:45.318945-0400 Badge Messenger[1833:1132329] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:04:45.376686-0400 Badge Messenger[1833:1132391] [webrtc] (turn_port.cc:856): Port[2061a00:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65
2023-08-01 09:04:46.322678-0400 Badge Messenger[1833:1132546] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:04:46.382545-0400 Badge Messenger[1833:1132546] [webrtc] (turn_port.cc:856): Port[2061a00:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65
2023-08-01 09:04:48.328557-0400 Badge Messenger[1833:1132329] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:04:48.388343-0400 Badge Messenger[1833:1132391] [webrtc] (turn_port.cc:856): Port[2061a00:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65

 


Not clear what doesn't work here, the call is not received?  Do you see the push arrive when receiving the call in the XCode logs? 


I have 3 phones, 2 in my home network, and 1 outside of my network, all have the same app, I logged in with deafferent user ids to each one of them. The 2 phones in my network work fine when calling each other, the third phone can call only 1 of the home phones, and can't call the other home phone. None of the home phones can call the phone outside my home.

 

Phone 1 (Home) <-> Phone 2 (Home) - good
Phone 3 (Office) -> Phone 1 (Home) - good

Phone 1 (Home) -> Phone 3 (Office) - no call received

Phone 3 (Office) <-> Phone 2 (Home) - no call received

 

I don't see the push arrive.

 

Here is the caller log:

 

2023-08-01 09:43:52.418276-0400 Badge Messenger[1833:1131980] [CallKitMediator.CXProviderDelegate] provider perform action: CXStartCallAction
2023-08-01 09:43:52.432198-0400 Badge Messenger[1833:1140874] [audiosession] Successfully set audio session category 'AVAudioSessionCategoryPlayback'
2023-08-01 09:43:52.432298-0400 Badge Messenger[1833:1140874] [call] [06F47E89-AFA4-4E09-B59D-C169D935B251] callUserWithId: member3
2023-08-01 09:43:52.435920-0400 Badge Messenger[1833:1140874] [callclient] trying to get a call instance with non-existing id: 06F47E89-AFA4-4E09-B59D-C169D935B251
2023-08-01 09:43:52.438293-0400 Badge Messenger[1833:1140874] [webrtc-pc] Created new SINPeerConnection for instance: com.sinch.rtc.private.default-instance
2023-08-01 09:43:52.439603-0400 Badge Messenger[1833:1140874] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Will apply (local) session description:
v=0
o=- 3651194291681620561 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=extmap-allow-mixed
a=msid-semantic: WMS SINMS0
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:GcDD
a=ice-pwd:Z4dA6erVjhHIUI5RiozLSWB7
a=ice-options:trickle renomination
a=fingerprint:sha-256 8B:0B:02:40:DA:1C:D5:06:AC:41:89:EC:06:CA:8D:46:F4:1D:8A:CB:D6:4F:70:0F:52:A9:37:B9:BF:23:B2:94
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:SINMS0 SINMS0a0
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:2713320082 cname:yvKKWzfjfY9TIXPR
a=ssrc:2713320082 msid:SINMS0 SINMS0a0
2023-08-01 09:43:52.440048-0400 Badge Messenger[1833:1140874] [webrtc] (audio_device_generic.cc:18): BuiltInAECIsAvailable: Not supported on this platform
2023-08-01 09:43:52.440141-0400 Badge Messenger[1833:1140874] [webrtc] (audio_device_generic.cc:28): BuiltInAGCIsAvailable: Not supported on this platform
2023-08-01 09:43:52.440571-0400 Badge Messenger[1833:1140880] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] PeerConnection signaling state changed: HAVE_LOCAL_OFFER
2023-08-01 09:43:52.441576-0400 Badge Messenger[1833:1140789] [webrtc] (audio_device_generic.cc:18): BuiltInAECIsAvailable: Not supported on this platform
2023-08-01 09:43:52.441942-0400 Badge Messenger[1833:1140789] [webrtc] (audio_device_generic.cc:28): BuiltInAGCIsAvailable: Not supported on this platform
2023-08-01 09:43:52.442124-0400 Badge Messenger[1833:1140789] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] ICE gathering state changed: GATHERING
2023-08-01 09:43:52.442223-0400 Badge Messenger[1833:1140789] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] PeerConnection signaling state changed: HAVE_LOCAL_OFFER
2023-08-01 09:43:52.442292-0400 Badge Messenger[1833:1140789] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Successfully set local session description:
v=0
o=- 3651194291681620561 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0
a=extmap-allow-mixed
a=msid-semantic: WMS SINMS0
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:GcDD
a=ice-pwd:Z4dA6erVjhHIUI5RiozLSWB7
a=ice-options:trickle renomination
a=fingerprint:sha-256 8B:0B:02:40:DA:1C:D5:06:AC:41:89:EC:06:CA:8D:46:F4:1D:8A:CB:D6:4F:70:0F:52:A9:37:B9:BF:23:B2:94
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:SINMS0 SINMS0a0
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:2713320082 cname:yvKKWzfjfY9TIXPR
a=ssrc:2713320082 msid:SINMS0 SINMS0a0
2023-08-01 09:43:52.442490-0400 Badge Messenger[1833:1140789] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Not applicable to apply remote ICE candidates (awaiting both local and remote session descriptions)
2023-08-01 09:43:52.442519-0400 Badge Messenger[1833:1140789] [call] [06F47E89-AFA4-4E09-B59D-C169D935B251] isCallValidForActions: YES
2023-08-01 09:43:52.442536-0400 Badge Messenger[1833:1140789] [call] [06F47E89-AFA4-4E09-B59D-C169D935B251] Start signaling
2023-08-01 09:43:52.442555-0400 Badge Messenger[1833:1140789] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] ICE candidate generated: candidate:992676173 1 udp 2122265343 fd86:c0ff:bee9:b14:4fe:bb23:7271:4d35 54954 typ host generation 0 ufrag GcDD network-id 2 network-cost 10
2023-08-01 09:43:52.443556-0400 Badge Messenger[1833:1140789] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Pending emitting locally generated ICE candidate
2023-08-01 09:43:52.443613-0400 Badge Messenger[1833:1140789] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:43:52.443818-0400 Badge Messenger[1833:1140789] [pubsub] beginning background task with token: 1 (channel: 5093e4a3-a4b0-43c7-9516-c24f8e633196S)
2023-08-01 09:43:52.444229-0400 Badge Messenger[1833:1140874] [http] REQUEST 6: Request POST https://ocra.api.sinch.com/ocra/v2/calls
Accept: application/json
Content-Type: application/json
x-sin-cc: userId=bWVtYmVyMg,instanceId=c3524d32-6f51-4c04-9674-0cc17b44216e,callId=06F47E89-AFA4-4E09-B59D-C169D935B251
x-sin-client-obj-id: 7774c984-10c8-486a-ae69-d732fbad8b2e
x-sin-client-platform: ios
x-sin-client-version: 5.23.5+d30bd48e
x-sin-date: 20230801T134352Z
x-sin-request-id: 2a533fbe-c6d8-4dc2-89f7-ced243ac77d7
x-sin-api-key-id: c182cb3d-d287-4b65-868c-7a22448e16a3
x-sin-client-lang-flavor: swift
Authorization: instance-v1 c182cb3d-d287-4b65-868c-7a22448e16a3 bWVtYmVyMg== c3524d32-6f51-4c04-9674-0cc17b44216e 2a242d36fabe1af024810c8fa12f7b8cda8215c07c761f73c7e5630c6a77adb3
{"callId":"06F47E89-AFA4-4E09-B59D-C169D935B251","cli":"","destination":{"domain":"mxp","identity":"member3","type":"userId"},"legacyMediaProxyEngage":false,"requestedAudio":true,"requestedVideo":false,"rtcOffer":{"sdp":"v=0\r\no=- 3651194291681620561 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS SINMS0\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:GcDD\r\na=ice-pwd:Z4dA6erVjhHIUI5RiozLSWB7\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 8B:0B:02:40:DA:1C:D5:06:AC:41:89:EC:06:CA:8D:46:F4:1D:8A:CB:D6:4F:70:0F:52:A9:37:B9:BF:23:B2:94\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendrecv\r\na=msid:SINMS0 SINMS0a0\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:63 red/48000/2\r\na=fmtp:63 111/111\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:102 ILBC/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:2713320082 cname:yvKKWzfjfY9TIXPR\r\na=ssrc:2713320082 msid:SINMS0 SINMS0a0\r\n","type":"offer"}}
2023-08-01 09:43:52.445451-0400 Badge Messenger[1833:1140874] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] ICE candidate generated: candidate:3750708195 1 udp 2122194687 192.168.0.46 50295 typ host generation 0 ufrag GcDD network-id 1 network-cost 10
2023-08-01 09:43:52.445477-0400 Badge Messenger[1833:1140874] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Pending emitting locally generated ICE candidate
2023-08-01 09:43:52.445493-0400 Badge Messenger[1833:1140874] [pubsub] Pubnub request SCHEDULED (ID=95F44243-D24E-41BE-BDDB-228E2DE5C585, URL=https://pubsub-ga.api.sinch.com/subscribe/subr-c-dd0a1338-8ee1-4bc4-9627-e986466c4287/5093e4a3-a4b0-43c7-9516-c24f8e633196S/0/0?uuid=f0f9b4ed-00ef-4ccd-86ae-beef65151a2f, NST-VoIP: NO)
2023-08-01 09:43:52.445945-0400 Badge Messenger[1833:1140874] [pubsub] Pubnub request STARTED (ID=95F44243-D24E-41BE-BDDB-228E2DE5C585)
2023-08-01 09:43:52.498268-0400 Badge Messenger[1833:1140789] [webrtc] (turn_port.cc:856): Port[205e400:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65
2023-08-01 09:43:52.515401-0400 Badge Messenger[1833:1140880] [call-client] [06F47E89-AFA4-4E09-B59D-C169D935B251] -[SINCallClient provider:didActivateAudioSession:]
2023-08-01 09:43:52.554713-0400 Badge Messenger[1833:1140881] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] ICE candidate generated: candidate:2522496227 1 udp 41820159 3.231.219.152 49828 typ relay raddr 142.189.220.99 rport 50295 generation 0 ufrag GcDD network-id 1 network-cost 10
2023-08-01 09:43:52.554744-0400 Badge Messenger[1833:1140881] [webrtc-pc] [i:com.sinch.rtc.private.default-instance] Pending emitting locally generated ICE candidate
2023-08-01 09:43:52.614619-0400 Badge Messenger[1833:1140789] [pubsub] Pubnub request SUCCESS (ID=95F44243-D24E-41BE-BDDB-228E2DE5C585)
2023-08-01 09:43:52.614663-0400 Badge Messenger[1833:1140789] [pubsub] Pubnub request SCHEDULED (ID=F607208B-81C8-4E12-9456-2E21CF2F2B14, URL=https://pubsub-ga.api.sinch.com/subscribe/subr-c-dd0a1338-8ee1-4bc4-9627-e986466c4287/5093e4a3-a4b0-43c7-9516-c24f8e633196S/0/16908974220000000?uuid=f0f9b4ed-00ef-4ccd-86ae-beef65151a2f, NST-VoIP: NO)
2023-08-01 09:43:52.614705-0400 Badge Messenger[1833:1140789] [client-internal] onPubSubSubscriptionSuccess: userInfo: {
    channel = "5093e4a3-a4b0-43c7-9516-c24f8e633196S";
    subscribeSequence = 1;
    timetoken = 0;
}
2023-08-01 09:43:52.615017-0400 Badge Messenger[1833:1140789] [pubsub] Pubnub request STARTED (ID=F607208B-81C8-4E12-9456-2E21CF2F2B14)
2023-08-01 09:43:52.698907-0400 Badge Messenger[1833:1140874] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:43:52.754692-0400 Badge Messenger[1833:1140874] [webrtc] (turn_port.cc:856): Port[205e400:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65
2023-08-01 09:43:52.808872-0400 Badge Messenger[1833:1140881] [http] REQUEST 6: Response status code: 200, body: {"callId":"06F47E89-AFA4-4E09-B59D-C169D935B251","mxpEncryptionKey":"qP6g9piaWCtwaOYi89dXbQ==","mxpSignalChannel":"4ae55e8d-709a-4f0c-b614-5bd12ddd1ef5S","instances":[{"id":"0a04f6d4-f832-4d6e-82ef-56bbc4b6a40b","capabilities":["ice-proxy.1","ocra.1","p2p","push","push.2","push.3","push.4","turn.1","turn.2"],"pushProfile":{"maxPayloadSize":4096,"managed":true}},{"id":"9c070d5c-22df-4e2c-a864-3f65be4adadb","capabilities":["ice-proxy.1","ocra.1","p2p","push","push.2","push.3","push.4","turn.1","turn.2"]},{"id":"adeac9df-4a64-46b4-9e11-5790424abd19","capabilities":["ice-proxy.1","ice-restart.1","ocra.1","p2p","push","push.2","push.3","push.4","turn.1","turn.2"]},{"id":"0afc9d32-0156-459e-a300-bac7c487f22a","capabilities":["ice-proxy.1","ocra.1","p2p","push","push.2","push.3","push.4","turn.1","turn.2"]}],"startTime":"2023-08-01T13:43:52Z","legacyRelayIceCandidates":[],"apiBaseUrl":"https://ocra-use1.api.sinch.com"}
2023-08-01 09:43:52.816431-0400 Badge Messenger[1833:1140881] [http] REQUEST 7: Request POST https://ocra.api.sinch.com/ocra/v2/pushNotifications
Accept: application/json
Content-Type: application/json
x-sin-cc: userId=bWVtYmVyMg,instanceId=c3524d32-6f51-4c04-9674-0cc17b44216e,callId=06F47E89-AFA4-4E09-B59D-C169D935B251
x-sin-client-obj-id: 7774c984-10c8-486a-ae69-d732fbad8b2e
x-sin-client-platform: ios
x-sin-client-version: 5.23.5+d30bd48e
x-sin-date: 20230801T134353Z
x-sin-request-id: df6f687f-608f-4550-9d0b-f5c6a31ce1ef
x-sin-api-key-id: c182cb3d-d287-4b65-868c-7a22448e16a3
x-sin-client-lang-flavor: swift
Authorization: instance-v1 c182cb3d-d287-4b65-868c-7a22448e16a3 bWVtYmVyMg== c3524d32-6f51-4c04-9674-0cc17b44216e 4d6256d5b202cea3df9e333cac00e26168e370e82da6f2a00779d9fc47113cd5
[{"collapseId":"06F47E89-AFA4-4E09-B59D-C169D935B251","templateId":"incoming_call","templateParameters":{"sinch":"{\"domain\":\"mxp\",\"flags\":0,\"public_headers\":{},\"session_id\":\"06F47E89-AFA4-4E09-B59D-C169D935B251\",\"timestamp\":1690897432,\"type\":1,\"user_id\":\"member2\",\"version\":4}"},"to":[{"instanceId":"0a04f6d4-f832-4d6e-82ef-56bbc4b6a40b","userId":"member3"}]}]
2023-08-01 09:43:52.818037-0400 Badge Messenger[1833:1140881] [call] [06F47E89-AFA4-4E09-B59D-C169D935B251] callDidProgress
Sinch call callback: callDidEnd
Sinch call callback: callDidProgress
2023-08-01 09:43:52.837149-0400 Badge Messenger[1833:1140874] [audiosession] Successfully set audio session category 'AVAudioSessionCategoryPlayback'
2023-08-01 09:43:52.924507-0400 Badge Messenger[1833:1140789] [audio-controller] Successfully played audio file at path '/private/var/containers/Bundle/Application/1A262B4D-B6D9-488D-A2B5-A6EEC4BB4A9C/Badge Messenger.app/ringback.wav'
2023-08-01 09:43:52.986915-0400 Badge Messenger[1833:1140874] [http] REQUEST 7: Response status code: 200, body:
2023-08-01 09:43:53.201384-0400 Badge Messenger[1833:1140874] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:43:53.255698-0400 Badge Messenger[1833:1140881] [webrtc] (turn_port.cc:856): Port[205e400:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65
2023-08-01 09:43:54.205196-0400 Badge Messenger[1833:1140874] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:43:54.260332-0400 Badge Messenger[1833:1140874] [webrtc] (turn_port.cc:856): Port[205e400:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65
2023-08-01 09:43:56.209408-0400 Badge Messenger[1833:1140881] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:43:56.264029-0400 Badge Messenger[1833:1140874] [webrtc] (turn_port.cc:856): Port[205e400:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65

 

 


 

For some reason calling another phone with the same app outside my local network doesn't work

Not clear what doesn't work here, the call is not received?  Do you see the push arrive when receiving the call in the XCode logs? 

 


I have 3 phones, 2 in my home network, and 1 outside of my network, all have the same app, I logged in with deafferent user ids to each one of them. The 2 phones in my network work fine when calling each other, the third phone can call only 1 of the home phones, and can't call the other home phone. None of the home phones can call the phone outside my home.

 

Phone 1 (Home) <-> Phone 2 (Home) - good
Phone 3 (Office) -> Phone 1 (Home) - good

Phone 1 (Home) -> Phone 3 (Office) - no call received

Phone 3 (Office) <-> Phone 2 (Home) - no call received

 

For some reason when I add a log here, the post disappear 😞

I don't see the push arrive on the callee phone.

On the caller phone I see some errors:

 

2023-08-01 09:43:52.698907-0400 Badge Messenger[1833:1140874] [webrtc] (stun_port.cc:631): UDP send of 20 bytes to host [2600:1f18:322:x:x:x:x:x]:3478 (2600:1f18:322:x:x:x:x:x:3478) failed with error 0 : [0x00000041] No route to host
2023-08-01 09:43:52.754692-0400 Badge Messenger[1833:1140874] [webrtc] (turn_port.cc:856): Port[205e400:0:1:0:relay:Net[en0:fd86:c0ff:bee9:x:x:x:x:x/64:Wifi:id=2]]: Failed to send TURN message, error: 65


For some reason calling another phone with the same app outside my local network doesn't work

Not clear what doesn't work here, the call is not received?  Do you see the push arrive when receiving the call in the XCode logs? 

 


For some reason my responses here keep disappearing, I'll open a new topic for the issue. 

Roland_Ian
Employee
Employee

Hi Koganiz,

Some of your posts were being marked as SPAM - but we have resolved this and the posts should now be visible. I will review your additional comments and get back to you.

 

Roland-Ian Clothier, Developer Support Engineer