HI Alex,Thanks for the suggestion. I tried using the function sl_send_reply(msg, 403, "Forbidden") in the receive.c file after including the header files. But the following error is coming when compiling the kamailio.CC (gcc) [kamailio] receive.oreceive.c: In function âsend_denialâ:receive.c:375: warning: implicit declaration of function âsl_send_replyâLD (gcc) [kamailio] kamailioreceive.o: In function `send_denial':/home/varun/EP1.0/kamailio-4.1.3_src/kamailio-4.1.3/receive.c:375: undefined reference to `sl_send_reply'collect2: ld returned 1 exit statusmake: *** [kamailio] Error 1Please suggest any solution to this problem. So I have make some changes in the Makefile as it seems to be linking problem.Thanks in advance.RegardsVarunDate: Wed, 14 May 2014 13:09:44 +0100
From: varun pratapsingh <varunps2003@gmail.com>
To: sr-users@lists.sip-router.org
Subject: [SR-Users] How to reply an INVITE with 403
Message-ID:
<CAMSCRPnCHq+v3hbirAAGWTP2kNSFvmxM=8g=uWHAk8evaUEr7A@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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.
Regards
Varun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140514/5417268f/attachment-0001.html>
------------------------------
Message: 5
Date: Wed, 14 May 2014 08:11:12 -0400
From: Alex Balashov <abalashov@evaristesys.com>
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] How to reply an INVITE with 403
Message-ID: <53735D60.8020308@evaristesys.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Varun,
It's as simple as:
sl_send_reply("403", "Forbidden");
-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users