dizag / red5phone

Automatically exported from code.google.com/p/red5phone
1 stars 0 forks source link

Can't get the JS-Example to work - No connection to Asterisk but to Red5 #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Just use the Javascript Interface
2.
3.

What is the expected output? What do you see instead?
There is no connection to my asterisk made by red5phone

What version of the product are you using? On what operating system?
latest (r_29) red5phone and red5 0.9.1 RC1

Please provide any additional information below.

Hi, I am trying to make to JS-Interface work for me but it fails.
I never get any messages back to JS from the SWF.

I tried the laszlow-version which worked just fine with my asterisk server.

With the Javascriptversion the connection to Red5 seems to succeed. After that 
the registration to my asterisk server doesn't happen. I can't see a single SIP 
package on my Asterisk box.

This is the output from red5-console after connecting with the JS-Example:

SIPUser] Constructor: sip port 5077 rtp port:3007
[SIPUser] login
SipUserAgent - initSessionDescriptor -> Init...
SdpUtils - createInitialSdp -> Init...
SdpUtils - createInitialSdp -> userName = [soft], viaAddress = [127.0.1.1], 
audioPort = [3007], videoPort = [21070], audioCodecsPrecedence = [8;18;0;111].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecsPrecedence = 
[8;18;0;111], initIndex =  [0], finalIndex =  [1].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecId = [8].
SIPCodecFactory - getSIPAudioCodec -> Init...
SIPCodecFactory - getSIPAudioCodec -> codecId = [8].
SIPCodecFactory - getSIPAudioCodec -> codecId = [8], codecName =  [PCMA].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecId = [8], 
codecName =  [PCMA].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecsIndex = [1], 
initIndex =  [2], finalIndex =  [4].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecId = [18].
SIPCodecFactory - getSIPAudioCodec -> Init...
SIPCodecFactory - getSIPAudioCodec -> codecId = [18].
SIPCodecFactory - getSIPAudioCodec -> codecId = [18], codecName =  [G729].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecId = [18], 
codecName =  [G729].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecsIndex = [2], 
initIndex =  [5], finalIndex =  [6].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecId = [0].
SIPCodecFactory - getSIPAudioCodec -> Init...
SIPCodecFactory - getSIPAudioCodec -> codecId = [0].
SIPCodecFactory - getSIPAudioCodec -> codecId = [0], codecName =  [PCMU].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecId = [0], 
codecName =  [PCMU].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecsIndex = [3], 
initIndex =  [7], finalIndex =  [10].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecId = [111].
SIPCodecFactory - getSIPAudioCodec -> Init...
SIPCodecFactory - getSIPAudioCodec -> codecId = [111].
SIPCodecFactory - getSIPAudioCodec -> codecId = [111], codecName =  [ILBC].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecId = [111], 
codecName =  [ILBC].
SIPCodecFactory - getAvailableAudioCodecsWithPrecedence -> codecsIndex = [4], 
initIndex =  [11], finalIndex =  [-1].
SdpUtils - createInitialSdp -> Adding rtpmap for payload [8] with value = [8 
PCMA/8000/1].
SdpUtils - createInitialSdp -> Audio codec has no especific media attributes.
SdpUtils - createInitialSdp -> Adding rtpmap for payload [18] with value = [18 
G729/8000/1].
SdpUtils - createInitialSdp -> Adding 1 audio codec media attributes.
SdpUtils - createInitialSdp -> Adding audio media attribute [fmtp:18 annexb=no].
SdpUtils - parseAttributeField -> Init...
SdpUtils - parseAttributeField -> codecMediaAttribute = [fmtp:18 annexb=no].
SdpUtils - parseAttributeField -> attribName = [fmtp] attribValue  = [18 
annexb=no].
SdpUtils - parseAttributeField -> End...
SdpUtils - createInitialSdp -> Adding rtpmap for payload [0] with value = [0 
PCMU/8000/1].
SdpUtils - createInitialSdp -> Audio codec has no especific media attributes.
SdpUtils - createInitialSdp -> Adding rtpmap for payload [111] with value = 
[111 ILBC/8000/1].
SdpUtils - createInitialSdp -> Adding 1 audio codec media attributes.
SdpUtils - createInitialSdp -> Adding audio media attribute [fmtp:111 mode=30].
SdpUtils - parseAttributeField -> Init...
SdpUtils - parseAttributeField -> codecMediaAttribute = [fmtp:111 mode=30].
SdpUtils - parseAttributeField -> attribName = [fmtp] attribValue  = [111 
mode=30].
SdpUtils - parseAttributeField -> End...
SdpUtils - getFormatList -> Init...
SdpUtils - getPayloadIdFromAttribute -> Init...
SdpUtils - getPayloadIdFromAttribute -> AttributeName = [rtpmap], 
AttributeValue = [8 PCMA/8000/1].
SdpUtils - isPayloadRelatedAttribute -> Init...
SdpUtils - isPayloadRelatedAttribute -> AttributeName = [rtpmap], 
AttributeValue = [8 PCMA/8000/1].
SdpUtils - isPayloadRelatedAttribute -> isPayloadAttribute = true
SdpUtils - isPayloadRelatedAttribute -> End...
SdpUtils - getPayloadIdFromAttribute -> payloadId = 8
SdpUtils - getPayloadIdFromAttribute -> End...
SdpUtils - getPayloadIdFromAttribute -> Init...
SdpUtils - getPayloadIdFromAttribute -> AttributeName = [rtpmap], 
AttributeValue = [18 G729/8000/1].
SdpUtils - isPayloadRelatedAttribute -> Init...
SdpUtils - isPayloadRelatedAttribute -> AttributeName = [rtpmap], 
AttributeValue = [18 G729/8000/1].
SdpUtils - isPayloadRelatedAttribute -> isPayloadAttribute = true
SdpUtils - isPayloadRelatedAttribute -> End...
SdpUtils - getPayloadIdFromAttribute -> payloadId = 18
SdpUtils - getPayloadIdFromAttribute -> End...
SdpUtils - getPayloadIdFromAttribute -> Init...
SdpUtils - getPayloadIdFromAttribute -> AttributeName = [rtpmap], 
AttributeValue = [0 PCMU/8000/1].
SdpUtils - isPayloadRelatedAttribute -> Init...
SdpUtils - isPayloadRelatedAttribute -> AttributeName = [rtpmap], 
AttributeValue = [0 PCMU/8000/1].
SdpUtils - isPayloadRelatedAttribute -> isPayloadAttribute = true
SdpUtils - isPayloadRelatedAttribute -> End...
SdpUtils - getPayloadIdFromAttribute -> payloadId = 0
SdpUtils - getPayloadIdFromAttribute -> End...
SdpUtils - getPayloadIdFromAttribute -> Init...
SdpUtils - getPayloadIdFromAttribute -> AttributeName = [rtpmap], 
AttributeValue = [111 ILBC/8000/1].
SdpUtils - isPayloadRelatedAttribute -> Init...
SdpUtils - isPayloadRelatedAttribute -> AttributeName = [rtpmap], 
AttributeValue = [111 ILBC/8000/1].
SdpUtils - isPayloadRelatedAttribute -> isPayloadAttribute = true
SdpUtils - isPayloadRelatedAttribute -> End...
SdpUtils - getPayloadIdFromAttribute -> payloadId = 111
SdpUtils - getPayloadIdFromAttribute -> End...
SdpUtils - getFormatList -> formatList = [8 18 0 111].
SdpUtils - getFormatList -> End...
SdpUtils - createInitialSdp -> Creating audio media descriptor.
SdpUtils - createInitialSdp -> Just adding attribute.
SdpUtils - createInitialSdp -> Just adding attribute.
SdpUtils - createInitialSdp -> Just adding attribute.
SdpUtils - createInitialSdp -> Just adding attribute.
SdpUtils - createInitialSdp -> Just adding attribute.
SdpUtils - createInitialSdp -> Adding 1 common audio media attributes.
SdpUtils - createInitialSdp -> Adding common audio media attribute [ptime:20].
SdpUtils - parseAttributeField -> Init...
SdpUtils - parseAttributeField -> codecMediaAttribute = [ptime:20].
SdpUtils - parseAttributeField -> attribName = [ptime] attribValue  = [20].
SdpUtils - parseAttributeField -> End...
SdpUtils - createInitialSdp -> End...
SipUserAgent - initSessionDescriptor -> localSession = v=0
o=soft 0 0 IN IP4 127.0.1.1
s=Session SIP/SDP
c=IN IP4 127.0.1.1
t=0 0
m=audio 3007 RTP/AVP 8 18 0 111
a=rtpmap:8 PCMA/8000/1
a=rtpmap:18 G729/8000/1
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000/1
a=rtpmap:111 ILBC/8000/1
a=fmtp:111 mode=30
a=ptime:20

SipUserAgent - listen -> Init...
[SIPUser] close1
[SIPUser] hangup
[SIPUser] closeStreams
RTMPUser stopStream
[SIPUser] unregister
SipUserAgent - hangup -> Init...
SipUserAgent - closeMediaApplication -> Init...
[SIPUser] provider.halt

Original issue reported on code.google.com by wonde...@gmail.com on 20 Jun 2010 at 7:35

GoogleCodeExporter commented 8 years ago
This is what sip.log says after pressing "Register":

2010-06-20 22:04:36,154 [NioProcessor-1] INFO  
o.r.server.webapp.sip.Application - Red5SIP open creating sipUser for soft on 
sip port 5074 audio port 3004 uid soft
2010-06-20 22:04:36,154 [NioProcessor-1] DEBUG 
org.red5.server.webapp.sip.SIPUser - Constructor: sip port 5074 rtp port:3004
2010-06-20 22:04:36,155 [NioProcessor-1] DEBUG 
org.red5.server.webapp.sip.SIPUser - login
2010-06-20 22:04:36,208 [NioProcessor-1] INFO  
o.r.server.webapp.sip.Application - Red5SIP Client leaving app 36
2010-06-20 22:04:36,209 [NioProcessor-1] INFO  
o.r.server.webapp.sip.Application - Red5SIP Client closing client soft
2010-06-20 22:04:36,209 [NioProcessor-1] DEBUG 
org.red5.server.webapp.sip.SIPUser - close1
2010-06-20 22:04:36,210 [NioProcessor-1] DEBUG 
org.red5.server.webapp.sip.SIPUser - hangup
2010-06-20 22:04:36,210 [NioProcessor-1] DEBUG 
org.red5.server.webapp.sip.SIPUser - closeStreams
2010-06-20 22:04:36,211 [NioProcessor-1] DEBUG 
org.red5.server.webapp.sip.SIPUser - unregister
2010-06-20 22:04:39,214 [NioProcessor-1] DEBUG 
org.red5.server.webapp.sip.SIPUser - provider.halt

Original comment by wonde...@gmail.com on 20 Jun 2010 at 8:05

GoogleCodeExporter commented 8 years ago
In my trying of fixing this I firstly fixed the JS-Code to work in Firefox 
(File is attached). I added alerts to the script to get the messages that come 
back from the script. All i get is a "Phone Ready" on an irregular base.

Still there is no connection to asterisk.
I can see the stuff on the Red5-Console and in sip.conf when loading the Page 
in Firefox. The username (soft) i passed with the HTML to the SWF actually 
reaches the Red5server (it's in the output) but i still see nothing at all on 
the asterisk CLI with high verbosity and sip debugging on. 

I tried several versions of Red5 (latest, RC1 and at the moment the proposed 
0.8.0)
I tried 0.38 and 0.37 of the Red5Phone.

As i really would love to get this thing to work I am wondering if the 
JS-Version is working for anyone else? What's the right setting for "Realm". Do 
i have to configure the value for "Realm" in Asterisk?

As i said, the other two versions (Flex, Laszlow) work fine for me, but I need 
the JS-Version for my testings, because it's the most flexible one.

Any help?
Tnx.

Original comment by wonde...@gmail.com on 22 Jun 2010 at 9:39

Attachments:

GoogleCodeExporter commented 8 years ago
Correc the DOM access using javascript. 
for example:

html: 
<input id="phoneno" name="myid" />

javascript: 
correct: phoneno.value = "3210000"
error & wrong: myid.value = "222"

Original comment by shamun.toha@gmail.com on 31 Jul 2010 at 9:51