|
@@ -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;
|
|
|
}
|