summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/baresip.h1
-rw-r--r--src/account.c6
-rw-r--r--src/ua.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/include/baresip.h b/include/baresip.h
index 890cc9a..62e5966 100644
--- a/include/baresip.h
+++ b/include/baresip.h
@@ -57,6 +57,7 @@ uint32_t account_regint(const struct account *acc);
uint32_t account_pubint(const struct account *acc);
uint32_t account_ptime(const struct account *acc);
enum answermode account_answermode(const struct account *acc);
+const char *account_aor(const struct account *acc);
const char *account_auth_user(const struct account *acc);
const char *account_outbound(const struct account *acc, unsigned ix);
const char *account_stun_user(const struct account *acc);
diff --git a/src/account.c b/src/account.c
index c3f26eb..8f10940 100644
--- a/src/account.c
+++ b/src/account.c
@@ -520,6 +520,12 @@ enum answermode account_answermode(const struct account *acc)
}
+const char *account_aor(const struct account *acc)
+{
+ return acc ? acc->aor : NULL;
+}
+
+
/**
* Get the authentication username of an account
*
diff --git a/src/ua.c b/src/ua.c
index bceae63..601c4fc 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -992,7 +992,7 @@ int ua_options_send(struct ua *ua, const char *uri,
*/
const char *ua_aor(const struct ua *ua)
{
- return ua ? ua->acc->aor : NULL;
+ return ua ? account_aor(ua->acc) : NULL;
}