Module: kamailio
Branch: master
Commit: 416d79b462986317f2c3a3ed8aa30a502d116095
URL:
https://github.com/kamailio/kamailio/commit/416d79b462986317f2c3a3ed8aa30a5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-11-20T08:11:18+01:00
topos: allow various replies for INVITE without contact
- GH #1720
---
Modified: src/modules/topos/tps_storage.c
---
Diff:
https://github.com/kamailio/kamailio/commit/416d79b462986317f2c3a3ed8aa30a5…
Patch:
https://github.com/kamailio/kamailio/commit/416d79b462986317f2c3a3ed8aa30a5…
---
diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c
index 69d5c7c2b5..83d81172dd 100644
--- a/src/modules/topos/tps_storage.c
+++ b/src/modules/topos/tps_storage.c
@@ -353,6 +353,18 @@ int tps_storage_link_msg(sip_msg_t *msg, tps_data_t *td, int dir)
/* no mandatory contact unless is INVITE - done */
return 0;
}
+ if(msg->first_line.type==SIP_REPLY) {
+ if(msg->first_line.u.reply.statuscode>=100
+ && msg->first_line.u.reply.statuscode<200
+ && msg->first_line.u.reply.statuscode!=183) {
+ /* provisional response with no mandatory contact header */
+ return 0;
+ }
+ if(msg->first_line.u.reply.statuscode>=400) {
+ /* failure response with no mandatory contact header */
+ return 0;
+ }
+ }
LM_ERR("bad sip message or missing Contact hdr\n");
goto error;
}