Hello,
On 12/2/10 4:15 PM, nikita wrote:
Hello,
Sorry for the late reply, I was a little busy by something else.
On 30/11/2010 22:24, Daniel-Constantin Mierla wrote:
Hello,
do you have
#!KAMAILIO
as first line in config file? This is required only for kamailio 3.0,
next versions has the feature of dropping replies by default.
Yes I have
#!KAMAILIO at the beginning of my kamailio.cfg.
is your config that you pasted located in a tm onreply route or the
default onreply route? TM onreply route can drop only provisional
replies (100-199).
Also, someone notided me that it could be a better
idea to do a proper
dialog establishment and try to end it after that, for example with
dlg_bye("all");
So I think I will try to use something like :
#!ifdef WITH_MEDIA_PROXY
if (is_method("INVITE")&& status == "200") {
use_media_proxy();
if($rc< 0) {
xlog("L_ERR", "invite reply error,
use_media_proxy() failed with $rc \n");
if (dlg_get("$ci", "$ft", "$tt"))
{
xlog("L_DBG", "ending a new
dialog\n");
dlg_bye("all");
}
}
}
#!endif
Anyone has ever tried something like that ?
You will send the BYE before the 200ok is sent to caller, so it will get
rejected most probably.
Cheers,
Daniel
Thanks,
> Cheers,
> Daniel
>
> On 11/26/10 12:55 PM, nikita wrote:
>> Hello,
>>
>> I'm using kamailio 3.0 with mediaproxy and I want to cancel calls if
>> I have no mediaproxy relay connected to my mediaproxy dispatcher.
>>
>> In my request route I'm checking if "use_media_proxy()" is
returning
>> me a positive result and it's working fine :
>>
>> use_media_proxy();
>> if($rc< 0) {
>> sl_send_reply("480","Temporarily
Unavailable");
>> exit;
>> }
>>
>>
>> But I'm also want check in my onreply_route If I still have an active
>> relay because I need to rewrite the sdp in the 200/OK reply.
>> My problem is that I don't know how to end the transaction, I have
>> tried :
>>
>> if (is_method("INVITE")&& status ==
"200") {
>> #!ifdef WITH_MEDIA_PROXY
>> use_media_proxy();
>> if($rc< 0) {
>> xlog("L_ERR", "invite reply error $rc
\n");
>> dlg_bye("all");
>> }
>> #!endif
>> }
>>
>> and also :
>>
>> if (is_method("INVITE")&& status ==
"200") {
>> #!ifdef WITH_MEDIA_PROXY
>> use_media_proxy();
>> if($rc< 0) {
>> xlog("L_ERR", "invite reply error $rc
\n");
>> drop();
>> }
>> #!endif
>> }
>>
>> In both case I'm seeing in my log file that use_media_proxy()
>> returned me -1, but the reply is routed to the caller ...
>>
>> Any idea on how I can cancel my call in the onreply_route ?
>> Also, I don't know if it's a good thing to make a second call to
>> "use_media_proxy" in the onreply_route, mediaproxy module couldn't
>> reply me with a different relay address if I have multiple mediaproxy
>> relay?
>>
>> Regards,
>>
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com