[SR-Users] How to reply an INVITE with 403

varun pratapsingh varunps2003 at gmail.com
Wed May 14 14:09:44 CEST 2014

Hi All,

I want to handle a special case in the Kamailio 4.1.3. When I receive
INVITE from some UAC I wanto reply it with 403 message. I am using the
Kamailio in Proxy mode when the INVITE comes I want to reply it with 403
and do not want to send this INVITE to SIP Server.

I expored the Kamailio source code and found that fucntion receive_msg() in
file receive.c receives all the SIP messages. I am able to parse the SIP
INVITE from such UACs but how to reply them with 403 SIP Code. I am unable
to use the t_reply("403","Forbidden") here in this function/file. Also in
this function finally the forward_reply(msg); is called which sends the
INVITE to the Sip Server. But I dont want to send anything to SIP Server in
this case but want to reply the UAC with 403. Can you please guide me how
to do and where to do this.

I am new to kamailio. Please help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140514/5417268f/attachment.html>

More information about the sr-users mailing list