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: https://svn.pjsip.org/repos/pjproject/trunk@737 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 0a106f4..82e22ab 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -1020,10 +1020,25 @@
/**
+ * 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".