powered by Jive Software

Red5 Plugin version 0.1.10


Red5 Plugin Changelog

All the Red5phone changes below come from the generous contribution of Lior Herman. Many thanks from all Red5phone users. **

New and Changed Features

  • Add Dial external command to Flex to bed dial from a link.
  • I used UID (unique identifier) in Flex instead of the username value for binding the sipprovider object in Mjsip – now you can use same sip account to register from multiple remote locations.

Faults Fixed

  • Changed registration of red5phone using phone@sip_provider.getViaAddress() instead of phone@realm
  • Mjsip I use Outboundproxy = Proxy like that all sip headers using realm, but the message is send to the proxy ip. (this is how it should be)
  • Process of OPTIONS messages in Mjsip some sbc’s using to check call keep alive.
  • Fix authentication header for REG and INVITE to use cnounce value when proxy send qop= auth in 401 or 407 message.
  • Fix red5phone application close for complete unregister before sipprovider.halt is execute.
  • Fix the microphone.init in Flex to not be bind to the REGISTER SUCCESS message as it can be many SUCCESS messages coming during a call and mic need to be init only once.
  • Fix Cancel message for Invite (call) that have not been answered yet – when you want hangup a call before the remote user answered Mjsip send wrong Cseq in Cancel message.
  • Fixed NullException error when application is closed – in provider.halt() its try to close a null tcp_socket and get Null exception back. Fix is in org.zoolu.net.TcpServer.java in the end of the file.

If you are planning on using Red5 SparkWeb with TLS on Openfire 3.6.3, you will hit a problem with Adobe Flash Player and the cross domain policy. Openfire does NOT grant access to port 5223 for Adobe Flash Player. If you must use TLS with Openfire 3.6.3 and Red5 SparkWeb, then you will need this patch. Replace openfire.jar

Hello Dele!

This version has the same issue as the versions before:

  • SIP does not work in Linux.

I am able to help to solve this problem, but I need some information:

  • Last status is: Registering on debug.log.

Register command:

2009.02.09 17:27:11 InternalComponentManager: Registering

Register check:

2009.02.09 17:27:11 InternalComponentManager: PACKET SENT: Registering

As you can see the packed register is not working and I couldnt find the right place or communication between openfire+sip plugin+red5 plugin where it happens.

Is there any documentation about it ?

Could you say what are the classes that I have to check this registration process ?



I think that the “Registering” status mean that sparkweb/openfire send REGISTRSTION to your proxy but did not get any answer back.

please check the following:

under openfire phone list (where you bind sip account to openfire user) make sure that the outbound proxy field in the sip account is also point to your proxy ip.

in the last version I fixed the use of the proxy, realm and outbound proxy handling as followed:

in red5phone we use realm and proxy/domain when Proxy is the real destantion wher the sip message will be send to.

realm is used as the URI in the sip message headers.

in Sparkweb you configure the sip account in openfire admin page under Phone.

and the configuration over there is called “server” and “outbound proxy” like in red5phone the value of server is the sip domain and outbound proxy is where the sip message will be send too.

i guess your outbound proxy field is empty.

your asterisk pc can be on ip but you send the message to asterisk via outbound proxy on ip

your sip maeesage header will look like REGISTER <my_username>@ /sip 2.0… but this message will be send to

if you don’t have such a configuration you just put in both



No the problem was not that!

I just discorved that “.deb” packages are not working with Red5Plugin.

Check this post, I just put the answer and result there:


i tested so far just on Windows OS and all work for me.

i fixed few things on the Mjsip stack and the new sip messaging handling of correct use of proxy and realm can cause sparkweb to not register if outbound proxy field is emapty in the sip account configuration.

anyway it good news the problem is not related to my changes in mjsip.


Hello Lior,

The point really was: Work on Linux to me…On windows it just worked fine for me too.

hi Jose

I would like to ask from you a little help for the users that would like to compile the plugin by themself on Linux.

would it be possible for you to send the files you used for the compilation so we can put them together in WEB_INF folder with the java compilation batch files for windows.

my traget is to create one version that all are working on for not need to support other users with same problems.

on the day I will test it on Linux I will just use your solution instaed of creating my own make files and tarballs.


Hello Lior!

Thats exactly what I made!

My compilation works great on both systems: windows and linux right now.

I’d test it on Slackware 10.2 and Ubuntu 7.10 (which are totally diferent in packages, libraries and dependencies).

I’d made my own make.sh script to compile everthing at once. (Red5Plugin + Red5SIP Plugin) and update my instalation based on tarball package.

I’m having a little hard time tryting to change the “realm” authentication here becuase I am using Asterisk and dont want use “realm” authentication on it.


Where I can find more infos about how to use the new funcion “********Add Dial external command to Flex to bed dial from a link.”?


Hi Jose Roberto Kerne,

I made it work with Asterisk but I couldn’t with Red5.

Please can you give me some inputs on how you made Red5 with sparkweb work using OpenSER.


Gouri Prasad.

We’re not using OpenSER


I tried the make.sh of Roberto but It didn’t work for me on my fedora core 8 with asterisk:

“cp: cannot stat red5.war”.

Then I decided to find the reason why red5plugin is not working on linux.by analysing the packets i noticed the Via address was wrong.

I modified the SipProvider to assign a static ip addr and it works.I’m a biginner in java programming.Then could anybody be interested on cheking this


can you give some more details about your problem with via header?

is the red5 locate on same pc as your proxy?

what is your red5 ip and what did you see in via heather?

what have you hardcoded as via in SIPprovider?



red5 and asterisk are installed on the same remote server with ip

on the asterisk console I’m getting:

<-- SIP read from
Via: SIP/2.0/UDP;rport;branch=z9hG4bK077801
Max-Forwards: 70
To: “00” sip:00@
From: “00” sip:00@;tag=z9hG4bK05519598
Call-ID: 962945279485@
Contact: sip:00@
Expires: 0
User-Agent: mjsip stack 1.6
Content-Length: 0

— (11 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to : 5070 (NAT)
Transmitting (no NAT) to
SIP/2.0 100 Trying
Via: SIP/2.0/UDP;branch=z9hG4bK077801;received=;rport=5070
From: “00” sip:00@;tag=z9hG4bK05519598
To: “00” sip:00@
Call-ID: 962945279485@
User-Agent: Asterisk PBX
Contact: sip:00@
Content-Length: 0

Mar 4 11:24:45 WARNING[5302]: chan_sip.c:1084 __sip_xmit: sip_xmit of 0xb7deda6c (len 395) to returned -1: Invalid argument
Transmitting (no NAT) to
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP;branch=z9hG4bK077801;received=;rport=5070
From: “00” sip:00@;tag=z9hG4bK05519598
To: “00” sip:00@;tag=as408f8e00
Call-ID: 962945279485@
User-Agent: Asterisk PBX
WWW-Authenticate: Digest algorithm=MD5, realm=“”, nonce="1cd7feaa"
Content-Length: 0

Mar 4 11:24:45 WARNING[5302]: chan_sip.c:1084 __sip_xmit: sip_xmit of 0xb7ded0ec (len 464) to returned -1: Invalid argument
Scheduling destruction of call ‘962945279485@’ in 15000 ms

IP in red is wrong

On the red5phone I get Reg. Failure = Timeout.

/////////////////////////My modifications in SipProvider:

// ***************** Readable/configurable attributes *****************
String sipBusyUrl=null;
/** Via address/name.
* Use ‘auto-configuration’ for auto detection, or let it undefined. */
String via_addr=“”;//null;

  • // I added this line
    private String my_ip = “”;

/** Inits the SipProvider, initializing the SipProviderListeners, the transport protocols, the outbound proxy, and other attributes. */
private void init(String viaddr, int port, String[] protocols, String ifaddr)
{ if (!SipStack.isInit()) SipStack.init();
via_addr=my_ip; //viaddr;
if (via_addr==null || via_addr.equalsIgnoreCase(AUTO_CONFIGURATION)) via_addr=IpAddress.getLocalHostAddress().toString();

public String pickCallId()
{ //String str=Long.toString(Math.abs(Random.nextLong()),16);
//if (str.length()<12) str+=“000000000000”;
//return str.substring(0,12)+"@"+getViaAddress();
return Random.nextNumString(12)+"@"+my_ip;//getViaAddress();

I know this is not a solution but it works.Could you help find a definitive solution? Thanks


try put in sip.cfg


what is this ip ? your server use it for something as i don’t think mjsip just take it out of the blue