SparkWeb getting "not authorized" error

Hi there

I just added red5.war (from the blog post on the front page) to my plugins subdir and openfire properly detected it.

Though I don’t get a /red5 url on my http bind port.

And when running sparkweb via normal http server and telling it about server and port to use for socket connect, I get this in warn.log:

2008.08.03 09:15:00 Closing session due to exception: (SOCKET, R: /84.46.10.95:53203, L: /217.110.206.14:5222, S: orion7.di
gital-server.de/217.110.206.14:5222)
org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.Exception: Disallowed character (Hexdump: 3C 70 6F 6C 69 6
3 79 2D 66 69 6C 65 2D 72 65 71 75 65 73 74 2F 3E 00)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:170)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)
at org.jivesoftware.openfire.plugin.RawPrintFilter.messageReceived(RawPrintFilter. java:57)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.Exception: Disallowed character
at org.jivesoftware.openfire.nio.XMLLightweightParser.read(XMLLightweightParser.ja va:210)
at org.jivesoftware.openfire.nio.XMPPDecoder.doDecode(XMPPDecoder.java:32)
at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtoco lDecoder.java:133)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:163)
… 14 more

if you don’t get the red5 url on the http-bind port, the stop and restart your openfire server. If you still don’t get the red5 url, then check the red5error.log file

Anybody know the solution to this problem? I am getting 401 on sparkweb.

Thanks

CM

I have the sip debug from asterisk. It looks like the sparkweb is not trying again to get authorization after it gets the unauthorized. mjsip is some reason refusing. Can somebody look in to it?

Thanks

<— SIP read from 192.168.1.200:5073 —>
REGISTER sip:ipbx.aus-ofc.newsstand.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.200:5073;rport;branch=z9hG4bK86932
Max-Forwards: 70
To: “5140” sip:5140@ipbx.aus-ofc.newsstand.com
From: “5140” sip:5140@ipbx.aus-ofc.newsstand.com;tag=z9hG4bK49390654
Call-ID: 382987253141@192.168.1.200
CSeq: 1 REGISTER
Contact: sip:5140@192.168.1.200:5073
Expires: 3600
User-Agent: mjsip stack 1.6
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.200 : 5073 (NAT)

<— Transmitting (NAT) to 192.168.1.200:5073 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.200:5073;branch=z9hG4bK86932;received=192.168.1.200;rport=5073
From: “5140” sip:5140@ipbx.aus-ofc.newsstand.com;tag=z9hG4bK49390654
To: “5140” sip:5140@ipbx.aus-ofc.newsstand.com
Call-ID: 382987253141@192.168.1.200
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:5140@192.168.1.200
Content-Length: 0

<------------>

<— Transmitting (NAT) to 192.168.1.200:5073 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.200:5073;branch=z9hG4bK86932;received=192.168.1.200;rport=5073
From: “5140” sip:5140@ipbx.aus-ofc.newsstand.com;tag=z9hG4bK49390654
To: “5140” sip:5140@ipbx.aus-ofc.newsstand.com;tag=as7013447d
Call-ID: 382987253141@192.168.1.200
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="3ca018c6"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘382987253141@192.168.1.200’ in 32000 ms (Method: REGISTER)

Ensure your username and password in the Openfire SIP plugin is what asterisk is expecting. Also make sure your sip realm name is also what is configured in sip.conf and finally, Check the mjSIP log files xxx.xxx.xxx.xxx.nnnn_messages.log and xxx.xxx.xxx.xxx.nnnn_events.log to confirm what the client is doing.

401 problem has been solved. I had to match the realm with the sparkweb. you can add this in /etc/asterisk/sip.conf as realm = whatever.com .

This will fix it.

Thanks again for your quick help and clue.

CM

can you please be CLEARER?

what realm did u put in /etc/asterisk/sip.conf ?

and where do u see the realm setting in sparkweb?

still unanswered questions…

Thanks in advance for you attention.

No Realm setting in Openfire SIP plugin, so Red5 SparkWeb uses the value of server as the realm. Make sure realm in Asterisk matches the server setting in Openfire SIP Plugin

Thanks for the answer Dele. So, i currently have this /etc/hosts file:

127.0.0.1 trixbox1.localdomain trixbox1 localhost.localdomain localhost

(I am on a trixbox machine).

I’ll try to put trixbox1.localdomain as realm in sip_custom.conf. Is it right? or do i have to put the domain name?

Sorry if i bother you again, but i am a bit noob about DNS and domain names.

openfire-sip.jpg

Nothing to do with DNS. Just make sure the Server here matches the asterisk realm name in /etc/asterisk/sip.conf