diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-11-06 03:41:40 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-11-06 03:41:40 +0000 |
commit | 121e4a8539f12237dacb933742dbe9c9443cec5b (patch) | |
tree | e2c6891d1b3d8aa7f5c719f84e6333116e213f06 /pjsip/src/pjsua-lib/pjsua_call.c | |
parent | da7bae2d171749429799d059ae3951416f756b8b (diff) |
The NAT type investigation in incoming INVITE caused assertion error when the INVITE comes without SDP
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1553 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_call.c')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index aaf02efe..f0f5a611 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -688,8 +688,12 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata) return PJ_TRUE; } - /* Update NAT type of remote endpoint */ - if (pjsua_var.ua_cfg.nat_type_in_sdp) { + /* Update NAT type of remote endpoint, only when there is SDP in + * incoming INVITE! + */ + if (pjsua_var.ua_cfg.nat_type_in_sdp && + pjmedia_sdp_neg_get_state(inv->neg) > PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) + { const pjmedia_sdp_session *remote_sdp; if (pjmedia_sdp_neg_get_neg_remote(inv->neg, &remote_sdp)==PJ_SUCCESS) |