Dear PJSIP Community,
I am running the app-kotlin in the PJSIP sdk and encountered an issue with
the pjsua_call_make_callfunction while working on a VOIP dialer project
using the PJSIP SDK. The application crashes with the following assertion
failure:
.*./src/pjsua-lib/pjsua_call.c:844: pj_status_t
pjsua_call_make_call(pjsua_acc_id, const pj_str_t *, const
pjsua_call_setting *, void *, const pjsua_msg_data *, pjsua_call_id
): assertion "acc_id>=0 &&
acc_id<(int)(sizeof(pjsua_var.acc)/sizeof(pjsua_var.acc[0]))" failed
I also received the warnings in the logcat in android studio as follows:-
11:22:07.175 pjsua_core.c .pjsua version 2.15.1 for
Linux-5.10.110/aarch64 initialized
2025-04-10 11:22:07.175 11542-11542 System.out
org.pjsip.pjsua2.app_kotlin I 11:22:07.175
pjsua_core.c .PJSUA state changed: CREATED --> INIT
2025-04-10 11:22:07.177 11542-11542 System.out
org.pjsip.pjsua2.app_kotlin I 11:22:07.177
*pjsua_core.c Error creating transport: Unsupported transport
(PJSIP_EUNSUPTRANSPORT) [status=171060]*2025-04-10 11:22:07.177
11542-11542 System.out org.pjsip.pjsua2.app_kotlin I
11:22:07.177 endpoint.cpp pjsua_transport_create(type,
&tcfg, &tid) error: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
(status=171060) [../src/pjsua2/endpoint.cpp:2285]
2025-04-10 11:22:07.177 11542-11542 System.out
org.pjsip.pjsua2.app_kotlin I java.lang.Exception: Title:
pjsua_transport_create(type, &tcfg, &tid)
2025-04-10 11:22:07.177 11542-11542 System.out
org.pjsip.pjsua2.app_kotlin I Code: 171060
2025-04-10 11:22:07.177 11542-11542 System.out
org.pjsip.pjsua2.app_kotlin I Description: Unsupported
transport (PJSIP_EUNSUPTRANSPORT)
2025-04-10 11:22:07.177 11542-11542 System.out
org.pjsip.pjsua2.app_kotlin I Location:
../src/pjsua2/endpoint.cpp:2285
2025-04-10 11:22:07.178 11542-11542 System.out
org.pjsip.pjsua2.app_kotlin I 11:22:07.177
pjsua_core.c PJSUA state changed: INIT --> STARTING
2025-04-10 11:22:07.178 11542-11542 System.out
org.pjsip.pjsua2.app_kotlin I 11:22:07.178
sip_endpoint.c .Module "mod-unsolicited-mwi" registered
I have installed and built PJSIP successfully. Under the "app-kotlin"
application of PJSIP in kotlin, in the MainActivity.kt file I set the
following configurations rest remaining same:-
For client app 1:-
const val ACC_DOMAIN = "sip.pjsip.org" const val ACC_USER = "101" const val
ACC_PASSWD = "--secret--" // Peer to call const val CALL_DST_URI = "
sip:103@sip.pjsip.org"
For client app 2:-
const val ACC_DOMAIN = "sip.pjsip.org" const val ACC_USER = "103" const val
ACC_PASSWD = "--secret--" // Peer to call const val CALL_DST_URI = "
sip:103@sip.pjsip.org"
In the onCreate() method the following account and transport config:-
/* Create transports and account. / try { val sipTpConfig =
TransportConfig() sipTpConfig.port = SIP_LISTENING_PORT.toLong()
g.ep.transportCreate(pjsip_transport_type_e.PJSIP_TRANSPORT_TLS,
sipTpConfig) // Account Configuration val accCfg = AccountConfig()
accCfg.sipConfig.proxies.add("sip:$ACC_DOMAIN;hide;transport=tls") // SIP
Proxy accCfg.idUri = "sip:$ACC_USER@$ACC_DOMAIN" // Account URI
accCfg.regConfig.registrarUri = "sip:$ACC_DOMAIN" // Registrar URI //
Authentication Credentials val creds = accCfg.sipConfig.authCreds
creds.add(AuthCredInfo("Digest", "", ACC_USER, 0, ACC_PASSWD))
accCfg.videoConfig.autoShowIncoming = true
accCfg.videoConfig.autoTransmitOutgoing = true
accCfg.videoConfig.defaultCaptureDevice = VIDEO_CAPTURE_DEVICE_ID
g.acc.create(accCfg) } catch (e: Exception) { println(e) }
*Goal:- *To install the app-kotlin application on 2 different android
phones so that they can communicate with each other using different user
configurations.
Context:-
App Language:- Kotlin
*PJSIP **SDK Version: *pjproject-2.15.1
Platform: OS - MacOS, IDE - Android Studio Ladybug Feature Drop | 2024.2.2
Documentation refered:-
https://docs.pjsip.org/en/latest/get-started/android/kotlin-sip-client.html
Observations: The crash seems to indicate that the acc_id is either invalid
or not properly set up.
Questions:-
- I want to know the details of the warnings and errors I am getting.
- How should I set up the transport and account for 2 different android
phones which have the kotlin app installed on them to be able to call and
answer each other, basically steps to set up user accounts for SIP server?
- Are there additional steps I should take to verify or initialize the
acc_id before passing it to pjsua_call_make_call?
Any guidance or suggestions to resolve this issue would be greatly
appreciated.
Thank you for your time and support.
Best regards,
Arsh K
Email:-gogq58196@gmail.com
Dear PJSIP Community,
I am running the app-kotlin in the PJSIP sdk and encountered an issue with
the pjsua_call_make_callfunction while working on a VOIP dialer project
using the PJSIP SDK. The application crashes with the following assertion
failure:
.*./src/pjsua-lib/pjsua_call.c:844: pj_status_t
pjsua_call_make_call(pjsua_acc_id, const pj_str_t *, const
pjsua_call_setting *, void *, const pjsua_msg_data *, pjsua_call_id
*): assertion "acc_id>=0 &&
acc_id<(int)(sizeof(pjsua_var.acc)/sizeof(pjsua_var.acc[0]))" failed*
I also received the warnings in the logcat in android studio as follows:-
11:22:07.175 pjsua_core.c .pjsua version 2.15.1 for
> Linux-5.10.110/aarch64 initialized
> 2025-04-10 11:22:07.175 11542-11542 System.out
> org.pjsip.pjsua2.app_kotlin I 11:22:07.175
> pjsua_core.c .PJSUA state changed: CREATED --> INIT
> 2025-04-10 11:22:07.177 11542-11542 System.out
> org.pjsip.pjsua2.app_kotlin I 11:22:07.177
> *pjsua_core.c Error creating transport: Unsupported transport
> (PJSIP_EUNSUPTRANSPORT) [status=171060]*2025-04-10 11:22:07.177
> 11542-11542 System.out org.pjsip.pjsua2.app_kotlin I
> 11:22:07.177 *endpoint.cpp pjsua_transport_create(type,
> &tcfg, &tid) error: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
> (status=171060) [../src/pjsua2/endpoint.cpp:2285]*
> 2025-04-10 11:22:07.177 11542-11542 System.out
> org.pjsip.pjsua2.app_kotlin I *java.lang.Exception: Title:
> pjsua_transport_create(type, &tcfg, &tid)*
> 2025-04-10 11:22:07.177 11542-11542 System.out
> org.pjsip.pjsua2.app_kotlin I *Code: 171060*
> 2025-04-10 11:22:07.177 11542-11542 System.out
> org.pjsip.pjsua2.app_kotlin I *Description: Unsupported
> transport (PJSIP_EUNSUPTRANSPORT)*
> 2025-04-10 11:22:07.177 11542-11542 System.out
> org.pjsip.pjsua2.app_kotlin I *Location:
> ../src/pjsua2/endpoint.cpp:2285*
> 2025-04-10 11:22:07.178 11542-11542 System.out
> org.pjsip.pjsua2.app_kotlin I 11:22:07.177
> pjsua_core.c PJSUA state changed: INIT --> STARTING
> 2025-04-10 11:22:07.178 11542-11542 System.out
> org.pjsip.pjsua2.app_kotlin I 11:22:07.178
> sip_endpoint.c .Module "mod-unsolicited-mwi" registered
I have installed and built PJSIP successfully. Under the "app-kotlin"
application of PJSIP in kotlin, in the MainActivity.kt file I set the
following configurations rest remaining same:-
For client app 1:-
const val ACC_DOMAIN = "sip.pjsip.org" const val ACC_USER = "101" const val
ACC_PASSWD = "--secret--" // Peer to call const val CALL_DST_URI = "
sip:103@sip.pjsip.org"
For client app 2:-
const val ACC_DOMAIN = "sip.pjsip.org" const val ACC_USER = "103" const val
ACC_PASSWD = "--secret--" // Peer to call const val CALL_DST_URI = "
sip:103@sip.pjsip.org"
In the onCreate() method the following account and transport config:-
/* Create transports and account. */ try { val sipTpConfig =
TransportConfig() sipTpConfig.port = SIP_LISTENING_PORT.toLong()
g.ep.transportCreate(pjsip_transport_type_e.PJSIP_TRANSPORT_TLS,
sipTpConfig) // Account Configuration val accCfg = AccountConfig()
accCfg.sipConfig.proxies.add("sip:$ACC_DOMAIN;hide;transport=tls") // SIP
Proxy accCfg.idUri = "sip:$ACC_USER@$ACC_DOMAIN" // Account URI
accCfg.regConfig.registrarUri = "sip:$ACC_DOMAIN" // Registrar URI //
Authentication Credentials val creds = accCfg.sipConfig.authCreds
creds.add(AuthCredInfo("Digest", "*", ACC_USER, 0, ACC_PASSWD))
accCfg.videoConfig.autoShowIncoming = true
accCfg.videoConfig.autoTransmitOutgoing = true
accCfg.videoConfig.defaultCaptureDevice = VIDEO_CAPTURE_DEVICE_ID
g.acc.create(accCfg) } catch (e: Exception) { println(e) }
*Goal:- *To install the app-kotlin application on 2 different android
phones so that they can communicate with each other using different user
configurations.
*Context:-*
*App Language:*- Kotlin
*PJSIP **SDK Version: *pjproject-2.15.1
*Platform*: OS - MacOS, IDE - Android Studio Ladybug Feature Drop | 2024.2.2
*Documentation refered:-*
https://docs.pjsip.org/en/latest/get-started/android/kotlin-sip-client.html
Observations: The crash seems to indicate that the acc_id is either invalid
or not properly set up.
Questions:-
1. I want to know the details of the warnings and errors I am getting.
2. How should I set up the transport and account for 2 different android
phones which have the kotlin app installed on them to be able to call and
answer each other, basically steps to set up user accounts for SIP server?
3. Are there additional steps I should take to verify or initialize the
acc_id before passing it to pjsua_call_make_call?
Any guidance or suggestions to resolve this issue would be greatly
appreciated.
Thank you for your time and support.
Best regards,
Arsh K
Email:-gogq58196@gmail.com