diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-09-24 00:07:11 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-09-24 00:07:11 +0000 |
commit | e3f862fca94af0cb4812796055b18d2ba107b613 (patch) | |
tree | 1a49b7381865830cebba5a2b62a905d60c7f0483 /pjsip/include | |
parent | 6ff54be10fd9c0ceff14e10f83a1d1af82ede83f (diff) |
Fixed several bugs in PJSUA-API:
- in some condition, when outgoing call fails, call count
incorrectly decremented to -1
- introduce account priority in pjsua_acc_config, and
improve the account searching for incoming calls
- pjsua will hangup call after sending transfer/REFER request.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@737 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 15 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua_internal.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 0a106f47..82e22abe 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -1020,10 +1020,25 @@ PJ_DECL(pj_status_t) pjsua_transport_close( pjsua_transport_id id, /** + * Default account priority. + */ +#ifndef PJSUA_DEFAULT_ACC_PRIORITY +# define PJSUA_DEFAULT_ACC_PRIORITY 0 +#endif + + +/** * Account configuration. */ typedef struct pjsua_acc_config { + /** + * Account priority, which is used to control the order of matching + * incoming/outgoing requests. The higher the number means the higher + * the priority is, and the account will be matched first. + */ + int priority; + /** * The full SIP URL for the account. The value can take name address or * URL format, and will look something like "sip:account@serviceprovider". diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index 10e76635..ca9a51d0 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -189,6 +189,7 @@ struct pjsua_data unsigned acc_cnt; /**< Number of accounts. */ pjsua_acc_id default_acc; /**< Default account ID */ pjsua_acc acc[PJSUA_MAX_ACC]; /**< Account array. */ + pjsua_acc_id acc_ids[PJSUA_MAX_ACC]; /**< Acc sorted by prio*/ /* Calls: */ pjsua_config ua_cfg; /**< UA config. */ |