As expected I had to do some fixes and small changes: - ReUse option ist required when sharing port 5060 with OpenSIPS - some oversights ($m / $message, not passing $ip and $port etc) - CRLF line after header - strip_body() doesn't work for replies (even if you put it in a different route it will not work)
Some more notes:
- removing topmost Via, re-adding the other ones line by line (even
if there have been multiple Via's on a single line)
- getting ip and port from the next-topmost Via, with respect to
"rport" and "received" params
- removing all Content-* header lines
- adding Content-Length: 0
- obviously sending no body
You have to use it as follows:
---
loadmodule "perl.so"
modparam("perl", "filename", "/etc/opensips/perlfunctions.pl")
onreply_route[1]
{
...
if(t_check_status("183")) {
perl_exec("sendReplyAs180");
drop();
}
}
---
Attached to this mail you can also find a screenshot of an example
call (if call setup on screenshot seems to be strange: that's because
of using uac_auth).
I tested the whole thing with a stupid client behind NAT, without
STUN support. Still working fine!
Have phun,
Thomas Gelf
perlfunctions.pl
Description: Perl program
<<inline: siptrace_183_to_180_rewrite.png>>
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
