I am using kamailio 4.4.2 IMS

Registration completes successfully, but S-CSCF gives the following error when P-CSCF relays INVITE to S-CSCF:

32(1349) ERROR: ims_dialog [dlg_handlers.c:190]: populate_leg_info(): bad sip message or missing Contact hdr
32(1349) ERROR: ims_dialog [dlg_handlers.c:1352]: dlg_onreply(): could not add further info to the dlg out

Resultantly, P-CSCF returns a 403 with: "Forbidden - You must register first with a S-CSCF"
It appears that pcscf_is_registered("location") is unable to lookup the location although the database seems to have valid entries.

Any hints on how I can get the INVITE processed without this issue?

Regards,
Owais