summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsip-ua/sip_replaces.c
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2012-09-28 06:17:11 +0000
committerNanang Izzuddin <nanang@teluu.com>2012-09-28 06:17:11 +0000
commitf9699a50372fce5b374b3e768fd433296403e894 (patch)
tree7cdc73b10af247f9ddf0261b31ec138b6d3d1d44 /pjsip/src/pjsip-ua/sip_replaces.c
parent19c5ac90fbd3fe8158bc1829249f3da699b8b742 (diff)
Close #1587: Added settings to accept call replace when in early state and as UAS: accept_replace_in_early_state in pjsip_cfg_t and PJSIP_ACCEPT_REPLACE_IN_EARLY_STATE macro.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4267 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsip-ua/sip_replaces.c')
-rw-r--r--pjsip/src/pjsip-ua/sip_replaces.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pjsip/src/pjsip-ua/sip_replaces.c b/pjsip/src/pjsip-ua/sip_replaces.c
index 70329f97..3bda5305 100644
--- a/pjsip/src/pjsip-ua/sip_replaces.c
+++ b/pjsip/src/pjsip-ua/sip_replaces.c
@@ -305,7 +305,9 @@ PJ_DEF(pj_status_t) pjsip_replaces_verify_request( pjsip_rx_data *rdata,
* initiated by this UA, it returns a 481 (Call/Transaction Does Not
* Exist) response to the new INVITE.
*/
- if (inv->state <= PJSIP_INV_STATE_EARLY && inv->role != PJSIP_ROLE_UAC) {
+ if (inv->state <= PJSIP_INV_STATE_EARLY && inv->role != PJSIP_ROLE_UAC &&
+ pjsip_cfg()->endpt.accept_replace_in_early_state == PJ_FALSE)
+ {
code = PJSIP_SC_CALL_TSX_DOES_NOT_EXIST;
warn_text = "Found early INVITE session but not initiated by this UA";
goto on_return;