Hi,
I know that what I want to do is a bit odd but here is why:
When using Asterisk as PSTN gateway and using SIP INFO for DTMF digits,
there is a problem with devices not understanding SIP INFO. When Asterisk
sends out its INFO packet and gets back a negative reply, it stops bridging
and throws away the whole call. That is a really bad issue on Asterisk side,
but I just wanted to find a workaround.
So what I wanted to do is drop negative replies on INFO packets, so Asterisk
just retransmits them and does not get any feedback. Those INFO packets come
through my loose route and there I put the following little statement in
there:
if(method=="INFO" && src_ip == 10.0.0.1 ) {
xlog("L_NOTICE"," - INFO Request: %mb");
t_on_reply("7");
setflag(3);
};
With that answers jump into onreply_route[7]. This part works ok.
onreply_route[7] {
if (search("CSeq:[0-9 ]+INFO")) {
xlog("L_NOTICE"," - INFO Reply: %mb");
if(t_check_status("405")) {
xlog("L_NOTICE"," - Dropping INFO Reply");
drop();
}
}
}
This part does not work. I also tried creating a route just for dropping and
then jumpinng into this route from my reply_route, but then I also only have
the log line from that route, but drop does not work. I tried sl_send_reply,
t_release and other commands of which I thought they might be helpful. But
the "offending answer" is always transmitted to my gateway.
Does anybody have an idea how to just "throw away" reply packets?
Thanks in advance,
Sebastian
Show replies by date