<div dir="ltr">HI Alex,<div><br></div><div>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.</div>
<div><br></div><div><br><div class="gmail_extra"><div class="gmail_extra">CC (gcc) [kamailio]             receive.o</div><div class="gmail_extra">receive.c: In function âsend_denialâ:</div><div class="gmail_extra">receive.c:375: warning: implicit declaration of function âsl_send_replyâ</div>
<div class="gmail_extra">LD (gcc) [kamailio]             kamailio</div><div class="gmail_extra">receive.o: In function `send_denial':</div><div class="gmail_extra">/home/varun/EP1.0/kamailio-4.1.3_src/kamailio-4.1.3/receive.c:375: undefined reference to `sl_send_reply'</div>
<div class="gmail_extra">collect2: ld returned 1 exit status</div><div class="gmail_extra">make: *** [kamailio] Error 1</div><div><br></div><div>Please suggest any solution to this problem. So I have make some changes in the Makefile as it seems to be linking problem.</div>
<div><br></div><div>Thanks in advance.</div><div><br></div><div>Regards</div><div>Varun</div><div><br></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Date: Wed, 14 May 2014 13:09:44 +0100<br>
From: varun pratapsingh <<a href="mailto:varunps2003@gmail.com">varunps2003@gmail.com</a>><br>
To: <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
Subject: [SR-Users] How to reply an INVITE with 403<br>
Message-ID:<br>
        <CAMSCRPnCHq+v3hbirAAGWTP2kNSFvmxM=8g=<a href="mailto:uWHAk8evaUEr7A@mail.gmail.com">uWHAk8evaUEr7A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi All,<br>
<br>
I want to handle a special case in the Kamailio 4.1.3. When I receive<br>
INVITE from some UAC I wanto reply it with 403 message. I am using the<br>
Kamailio in Proxy mode when the INVITE comes I want to reply it with 403<br>
and do not want to send this INVITE to SIP Server.<br>
<br>
I expored the Kamailio source code and found that fucntion receive_msg() in<br>
file receive.c receives all the SIP messages. I am able to parse the SIP<br>
INVITE from such UACs but how to reply them with 403 SIP Code. I am unable<br>
to use the t_reply("403","Forbidden") here in this function/file. Also in<br>
this function finally the forward_reply(msg); is called which sends the<br>
INVITE to the Sip Server. But I dont want to send anything to SIP Server in<br>
this case but want to reply the UAC with 403. Can you please guide me how<br>
to do and where to do this.<br>
<br>
I am new to kamailio. Please help.<br>
<br>
Regards<br>
Varun<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.sip-router.org/pipermail/sr-users/attachments/20140514/5417268f/attachment-0001.html" target="_blank">http://lists.sip-router.org/pipermail/sr-users/attachments/20140514/5417268f/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Wed, 14 May 2014 08:11:12 -0400<br>
From: Alex Balashov <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>><br>
To: <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
Subject: Re: [SR-Users] How to reply an INVITE with 403<br>
Message-ID: <<a href="mailto:53735D60.8020308@evaristesys.com">53735D60.8020308@evaristesys.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Varun,<br>
<br>
It's as simple as:<br>
<br>
    sl_send_reply("403", "Forbidden");<br>
<br>
-- Alex<br>
<br>
--<br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
235 E Ponce de Leon Ave<br>
Suite 106<br>
Decatur, GA 30030<br>
United States<br>
Tel: +1-678-954-0670<br>
Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.alexbalashov.com/" target="_blank">http://www.alexbalashov.com/</a><br>
<br></blockquote></div></div></div></div>