[OpenSIPS-Users] Sending 180 Reply for incoming 183 Early media (instead of)

Zizolazizo frederic.johnson70 at gmail.com
Fri Apr 10 22:12:52 CEST 2009


print "Hello World\n";

if (Thomas!= Friendly){
print " OpenSIPS Fatal error\n";
}

---------------------------------------
Compiling.................
Error: Config Error... Line 3: you cannot use this statement and change this variable cause Thomas is Very friendly......
System shutdown.....
---------------------------------------------


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


 
 
_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



-- 
View this message in context: http://n2.nabble.com/Sending-180-Reply-for-incoming-183-Early-media-tp2616929p2618118.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.




More information about the Users mailing list