[sr-dev] git:master:a91ca633: topos: force checking of Contact header for INVITE only

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 9 16:06:17 CEST 2016


Module: kamailio
Branch: master
Commit: a91ca63395b9a172c685e051f8a2255a5f1f31c9
URL: https://github.com/kamailio/kamailio/commit/a91ca63395b9a172c685e051f8a2255a5f1f31c9

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-08-09T15:44:47+02:00

topos: force checking of Contact header for INVITE only

- follow up on GH #715

---

Modified: modules/topos/tps_storage.c

---

Diff:  https://github.com/kamailio/kamailio/commit/a91ca63395b9a172c685e051f8a2255a5f1f31c9.diff
Patch: https://github.com/kamailio/kamailio/commit/a91ca63395b9a172c685e051f8a2255a5f1f31c9.patch

---

diff --git a/modules/topos/tps_storage.c b/modules/topos/tps_storage.c
index 9d59e5a..ecce41c 100644
--- a/modules/topos/tps_storage.c
+++ b/modules/topos/tps_storage.c
@@ -298,9 +298,8 @@ int tps_storage_link_msg(sip_msg_t *msg, tps_data_t *td, int dir)
 
 	/* extract the contact address */
 	if(parse_headers(msg, HDR_CONTACT_F, 0)<0 || msg->contact==NULL) {
-		if(td->s_method_id == METHOD_MESSAGE
-				|| td->s_method_id == METHOD_OPTIONS) {
-			/* no contact required for MESSAGE - done */
+		if(td->s_method_id != METHOD_INVITE) {
+			/* no mandatory contact unless is INVITE - done */
 			return 0;
 		}
 		LM_ERR("bad sip message or missing Contact hdr\n");




More information about the sr-dev mailing list