Tung Dao
Tung Dao

Reputation: 53

How to make multiple calls from one sip account to multi sip accounts?

I don't have experience in pjsip. Now I want coding a feature in iPhone like this: from my sip number I make multiple calls to group of sip numbers. If anyone accepts call, the others are denied. I'm using pjsip library to develop my app in iPhone. Can anyone help me?

Upvotes: 3

Views: 2495

Answers (2)

nguyentran
nguyentran

Reputation: 458

Please take a look at pjsua_app_cli.c in function cmd_make_multi_call.

for (i=0; i<count; ++i) {
pj_status_t status;

status = pjsua_call_make_call(current_acc, &tmp, &call_opt, NULL,
    NULL, NULL);
if (status != PJ_SUCCESS)
    break;
}

Hope it helps!

Upvotes: 0

raj_paps
raj_paps

Reputation: 114

pjsip does allow to make multiple calls from same account. It is limited by this PJSUA_MAX_CALLS

Go through simple_pjsua.c. It does provide a good example of exactly what you have asked.

Here you will find 'on_call_state, this callback is called whenever call state is changed. Typically whenever a call is answered call state will transition to PJSIP_INV_STATE_CONNECTING/PJSIP_INV_STATE_CONFIRMED as 200OK/ACK is received/sent.

To make a call look for pjsua_call_make_call

Good luck!!

Upvotes: 1

Related Questions