|
@@ -155,8 +155,10 @@ int get_to_uid(str* uid, struct sip_msg* msg)
|
|
*uid = val.s;
|
|
*uid = val.s;
|
|
return 1;
|
|
return 1;
|
|
} else {
|
|
} else {
|
|
- if (parse_headers(msg, HDR_TO_F, 0) < 0) {
|
|
|
|
- LOG(L_ERR, "get_to_uid: Error while parsing To URI (parse_headers)\n");
|
|
|
|
|
|
+ if ((msg->to==0) &&
|
|
|
|
+ (parse_headers(msg, HDR_TO_F, 0)<0 || msg->to==0)) {
|
|
|
|
+ LOG(L_ERR, "get_to_uid: Error while parsing To URI: "
|
|
|
|
+ " to header bad or missing\n");
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
to = get_to(msg);
|
|
to = get_to(msg);
|