diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-03-26 08:05:22 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-03-26 08:05:22 +0000 |
commit | 58297f1c1073e824a711fba33cf7e941338744f2 (patch) | |
tree | 2d8cf068d3a61c6f2166c5be9944e6da292a2402 | |
parent | 060d32ff5bc9e8c9f3dbd82407d92bf78cedf745 (diff) |
Fixed ticket #195: The ---contact option was ignored in pjsua
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@1105 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_acc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index b168c9ad..3e39b15f 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -943,6 +943,12 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uac_contact( pj_pool_t *pool, PJ_ASSERT_RETURN(pjsua_acc_is_valid(acc_id), PJ_EINVAL); acc = &pjsua_var.acc[acc_id]; + /* If force_contact is configured, then use use it */ + if (acc->cfg.force_contact.slen) { + *contact = acc->cfg.force_contact; + return PJ_SUCCESS; + } + /* If route-set is configured for the account, then URI is the * first entry of the route-set. */ @@ -1037,6 +1043,12 @@ PJ_DEF(pj_status_t) pjsua_acc_create_uas_contact( pj_pool_t *pool, PJ_ASSERT_RETURN(pjsua_acc_is_valid(acc_id), PJ_EINVAL); acc = &pjsua_var.acc[acc_id]; + /* If force_contact is configured, then use use it */ + if (acc->cfg.force_contact.slen) { + *contact = acc->cfg.force_contact; + return PJ_SUCCESS; + } + /* If Record-Route is present, then URI is the top Record-Route. */ if (rdata->msg_info.record_route) { sip_uri = (pjsip_sip_uri*) |