# Call not connecting when stun run on public and openvidu on private in android

**URL:** <https://openvidu.discourse.group/t/call-not-connecting-when-stun-run-on-public-and-openvidu-on-private-in-android/4598>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [May 21, 2023, 4:22am UTC](https://openvidu.discourse.group/t/call-not-connecting-when-stun-run-on-public-and-openvidu-on-private-in-android/4598 "2023-05-21T04:22:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jagdeep\_Khatana](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/jagdeep_khatana/32/2223_2.png) [@Jagdeep\_Khatana](https://openvidu.discourse.group/u/Jagdeep_Khatana)\
**Post date:** [May 21, 2023, 4:22am UTC](https://openvidu.discourse.group/t/call-not-connecting-when-stun-run-on-public-and-openvidu-on-private-in-android/4598/1 "2023-05-21T04:22:53Z")

</div>

Hi team, i’m running coturn on public ip with [example.test.com](http://example.test.com) domain and openvidu server and kms server running on private ip. when i run the call through browser it is working fine but when i try from android app getting this error.  
i take some packet trace for stun

| 722 | 67.870170 | 152.58.124.160 | private ip | STUN | 64 | Binding Request |
| --- | --- | --- | --- | --- | --- | --- |
| 723 | 67.870196 | 152.58.124.160 | 172.31.0.2 | STUN | 64 | Binding Request |
| 724 | 67.870200 | 152.58.124.160 | 172.31.0.2 | STUN | 64 | Binding Request |
| 725 | 67.870244 | 152.58.124.160 | private ip | STUN | 64 | Binding Request |
| 726 | 67.870254 | 152.58.124.160 | 172.31.0.2 | STUN | 64 | Binding Request |
| 727 | 67.870256 | 152.58.124.160 | 172.31.0.2 | STUN | 64 | Binding Request |
| 728 | 67.870788 | 172.31.0.2 | 152.58.124.160 | STUN | 148 | Binding Success Response XOR-MAPPED-ADDRESS: 152.58.124.160:49570 MAPPED-ADDRESS: 152.58.124.160:49570 RESPONSE-ORIGIN: 172.31.0.2:3478 OTHER-ADDRESS: 172.31.0.2:3479 |
| 729 | 67.870789 | 172.31.0.2 | 152.58.124.160 | STUN | 148 | Binding Success Response XOR-MAPPED-ADDRESS: 152.58.124.160:45371 MAPPED-ADDRESS: 152.58.124.160:45371 RESPONSE-ORIGIN: 172.31.0.2:3478 OTHER-ADDRESS: 172.31.0.2:3479 |
| 730 | 67.870789 | 172.31.0.2 | 152.58.124.160 | STUN | 148 | Binding Success Response XOR-MAPPED-ADDRESS: 152.58.124.160:45371 MAPPED-ADDRESS: 152.58.124.160:45371 RESPONSE-ORIGIN: 172.31.0.2:3478 OTHER-ADDRESS: 172.31.0.2:3479 |
| 731 | 67.870788 | 172.31.0.2 | 152.58.124.160 | STUN | 148 | Binding Success Response XOR-MAPPED-ADDRESS: 152.58.124.160:49570 MAPPED-ADDRESS: 152.58.124.160:49570 RESPONSE-ORIGIN: 172.31.0.2:3478 OTHER-ADDRESS: 172.31.0.2:3479 |
| 732 | 67.870807 | private ip | 152.58.124.160 | STUN | 148 | Binding Success Response XOR-MAPPED-ADDRESS: 152.58.124.160:49570 MAPPED-ADDRESS: 152.58.124.160:49570 RESPONSE-ORIGIN: 172.31.0.2:3478 OTHER-ADDRESS: 172.31.0.2:3479 |
| 733 | 67.870807 | private ip | 152.58.124.160 | STUN | 148 | Binding Success Response XOR-MAPPED-ADDRESS: 152.58.124.160:45371 MAPPED-ADDRESS: 152.58.124.160:45371 RESPONSE-ORIGIN: 172.31.0.2:3478 OTHER-ADDRESS: 172.31.0.2:3479 |

[INFO] 2023-05-21 04:13:46,109 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t51] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChanged]: → endpoint: con\_KVIo9FC2wo\_str\_CAM\_IAQW\_con\_BQhgK3jQp6 (subscriber) | state: FAILED | componentId: 2 | streamId: 1 | timestamp: 1684642426108  
[INFO] 2023-05-21 04:13:46,110 [AbstractJsonRpcClientWebSocket-reqResEventExec-e2-t41] io.openvidu.server.kurento.core.KurentoParticipantEndpointConfig - KMS event [IceComponentStateChanged]: → endpoint: con\_KVIo9FC2wo\_str\_CAM\_IAQW\_con\_BQhgK3jQp6 (subscriber) | state: FAILED | componentId: 1 | streamId: 1 | timestamp: 1684642426108

---

<div class="post-metadata">

**Author:** ![Jagdeep\_Khatana](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/jagdeep_khatana/32/2223_2.png) [@Jagdeep\_Khatana](https://openvidu.discourse.group/u/Jagdeep_Khatana)\
**Post date:** [May 21, 2023, 4:25am UTC](https://openvidu.discourse.group/t/call-not-connecting-when-stun-run-on-public-and-openvidu-on-private-in-android/4598/2 "2023-05-21T04:25:38Z")

</div>

Notes: call working fine in browser and i’m facing these issue only in android app

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [May 22, 2023, 8:28pm UTC](https://openvidu.discourse.group/t/call-not-connecting-when-stun-run-on-public-and-openvidu-on-private-in-android/4598/3 "2023-05-22T20:28:19Z")

</div>

How did you configured the Coturn Server? Are you using the default one deployed with OpenVidu? Or an external one?

If you are using an external Coturn, did you configure OpenVidu to use it, and how?

Read this doc carefully to know how to configure OpenVidu with an external Turn if it is your case: [Allow users behind firewalls - OpenVidu Docs](https://docs.openvidu.io/en/2.27.0/deployment/allow-users-behind-firewalls/)
