[OpenSIPS-Users] Sending 180 Reply for incoming 183 Early media (instead of)
Thomas Gelf
thomas at gelf.net
Fri Apr 10 21:16:16 CEST 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perlfunctions.pl
Type: application/x-perl
Size: 3849 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/users/attachments/20090410/d191f8fc/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: siptrace_183_to_180_rewrite.png
Type: image/png
Size: 12466 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/users/attachments/20090410/d191f8fc/attachment.png
More information about the Users
mailing list