sksushilkumar / red5phone

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

red5phone registering to asterisk server with 127.0.0.1 and unable to make calls outgoing from red5phone #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
fire up http://red5ip/sip/flex

2.Enter user credentials and login
phone:1000
usename:1000
secret: -
realm:asterisk
sipserver: 192.168.1.2
red5 url: rtmp:/sip
login 

What is the expected output? What do you see instead?

1.host colum under my asterisk sip show peers should be 
  my red5phone client ip address..

What version of the product are you using? On what operating system?

i)red5 using svn from red5.googlecode.com(0.8 rc2)
ii)ant 1.7.1
iii)red5 phone using svn from red5.googlecode.com
iv)OS -CentOS-5 release final
 kernel-2.6.18-128.1.6.el5
 asterisk-1.4.6

Please provide any additional information below.

# i tried with qualify=no and password="" in sip.conf but no use

my aim is when i try to register with my asterisk server
my ip should be shown at host colum of asterik CLI command sip show peers.
and when i make a call i should forward to the destination..

Thanks and regards
srinivas antarvedi

Original issue reported on code.google.com by srinivas...@gmail.com on 28 Apr 2009 at 7:46

GoogleCodeExporter commented 9 years ago
it is correct, the sip peer is your red5 server.
red5phone client don't implement sip, just rtmp.

About the outgoing calls, can be an asterisk configuration problem.

Original comment by gutomart...@gmail.com on 28 Apr 2009 at 12:49

GoogleCodeExporter commented 9 years ago
hello gutomartinez,

Thanks for the reply..

my setup is like this

asterisk                  ip: 192.168.1.2
red5server                ip: 192.168.1.50
redphone accessing from   ip: 192.168.1.70

so when i fire up my browser in 1.70 to http://192.168.1.50/sip/flex
and filled out username, empty password, server address, red5 url to
the following

phone:1000
username:1000
password:-
mailbox:1000
sip relam: - 
sip server: 192.168.1.2
red5url : rtmp:/sip

and login i get the following error:

failed to connect to Red5..

what i have to do now ??

i am good at both asterisk and linux..

thanks in advance
srinivas antarvedi

Original comment by srinivas...@gmail.com on 28 Apr 2009 at 1:46

GoogleCodeExporter commented 9 years ago
what is your sip realm?
the default is "asterisk"

Original comment by gutomart...@gmail.com on 28 Apr 2009 at 2:20

GoogleCodeExporter commented 9 years ago
my sip realm is 'asterisk' only.

the problem is i think the red5 server trying to register with asterisk
with from address 127.0.0.1 or contact header 127.0.0.1 . so how to change it
to red5 server address and where to change it.. and in sip.conf of asterisk 
i even disabled the secret filed and also put qualify=no ..

Thanks

Original comment by srinivas...@gmail.com on 29 Apr 2009 at 4:15

GoogleCodeExporter commented 9 years ago
Hello
try my fix for that on http://red5phone.googlecode.com/files/sip1.rar
set your realm to be asterisk, in proxy and OB Proxy put the ip of your 
Asterisk.

Lior

Original comment by lior.her...@gmail.com on 29 Apr 2009 at 10:51

GoogleCodeExporter commented 9 years ago
i dont think this is the problem, but the configuration file is "config.xml".

I have exactly the same structure, and everything works fine, even the filled 
secret
parameter.

be sure to set realm to asterisk in the red5 client.

Original comment by gutomart...@gmail.com on 29 Apr 2009 at 12:19

GoogleCodeExporter commented 9 years ago
hai lior,

i have tested with ur code.
the first call works fine ...
then how many times i tried i am getting the error
which is i am attaching as an attachement

Original comment by srinivas...@gmail.com on 29 Apr 2009 at 12:43

Attachments:

GoogleCodeExporter commented 9 years ago
hello gutomartinez,

i am giving you the complete picture..

i)red5 downloaded from
  svn co http://red5.googlecode.com/svn/java/server/trunk red5

ii)red5 phone downloaded from
 svn co http://red5phone.googlecode.com/svn/trunk/sip/

iii)apache-ant version
    apache-ant-1.7.1-bin.tar.gz

iv)CentOS5, 
   Asterisk1.4.6

today morning once again i downloded from the svn both
the red5 server and phone and its behaving in the
same manner..

with lior given sip attachement i was able to connect
to the asterisk server with the same 127.0.0.1 but
able to made call only once.. immediately i tried
and i got the above attached error in my ./red.sh shell

my sip.conf 
[1000]
username=1000
host=dynamic
qualify=no
type=peer
context=digium

my extensions.con

[digium]
exten => 2,1,Dial(Zap/g1/XXXXXXXXXX)
exten => 2,n,Hangup()

my red5phone configuration..

phone=1000
username=1000
password=
mailbox=
siprealm=asterisk
sipserver=192.168.1.99
OBproxy=192.168.1.99
Red5URL=rtmp:/sip

Thanks in advance
srinivas antarvedi

Original comment by srinivas...@gmail.com on 29 Apr 2009 at 12:57

GoogleCodeExporter commented 9 years ago
hello everyone..

it seems the latest red5,red5phone bundle from svn seems to be crashing after 
the
first call made... 

if anyone of you try and have the same problem can you guide me towards the
stablized versions of both red5 server and red5phone packages???

Thanks in advance
srini

Original comment by srinivas...@gmail.com on 30 Apr 2009 at 5:21

GoogleCodeExporter commented 9 years ago
hi
i will try look into it next week.
i did not have any probelm with making calls as my red5 do not bind to 
127.0.0.1 and 
give correct ip in via, contact and SDP.
the problem you get is red5 can not bind the BYE or the call close because 
binding 
to local host is problem that should not happened. you tried refresh the web 
page or 
close the web page and the app try to unregister and get from your asterisk 4XX 
message and its come with wrong contact or something that is not match for the 
transaction of the REG message and there for you get "not the current call".

Lior

Original comment by lior.her...@gmail.com on 1 May 2009 at 4:50

GoogleCodeExporter commented 9 years ago
# the problem is i think the red5 server trying to register with asterisk with 
from
address 127.0.0.1 or contact header 127.0.0.1

Red5phone is asking system for the IP. Ensure that when you execute
$ resolveip <your_red5_gw_hostname>
you will get a valid address.

Original comment by v.svob...@softdec.cz on 26 May 2009 at 12:51

GoogleCodeExporter commented 9 years ago
I also have the problem with second call. The first one is ok. Then i hang up 
the
call (no matter from the flex app or from the remote phone) and call again. 
There are
no more SIP packets are sent and Red5 hangs taking about 50% of processor's 
time.

Original comment by alx...@gmail.com on 9 Jul 2009 at 1:20

GoogleCodeExporter commented 9 years ago
It hangs in startStream method of RTMPUser class here:

while ( !startPublish ) {
     Thread.yield();
}

Original comment by alx...@gmail.com on 9 Jul 2009 at 1:43

GoogleCodeExporter commented 9 years ago
hello every one when  try to login from red5 phone  I got following error on 
asterisk

 chan_sip.c:18390 handle_request_register: Registration from '"RED5PHONE"
<sip:RED5PHONE@>' failed for '172.18.100.65' - Not a local domain
 red5 configuration
phone=RED5PHONE
username=RED5PHONE
password=wcte12xp
mailbox=
siprealm=asterisk
sipserver=172.18.100.65
OBproxy=172.18.100.65
Red5URL=rtmp:/sip

asterisk configuration

[RED5PHONE]
type=friend
secret=wcte12xp
qualify=yes
port=5060
host=dynamic
context=direct-conf      
callerid=device <RED5PHONE>
disallow=all
allow=ulaw
allow=alaw

Original comment by dhaval.i...@gmail.com on 23 Jul 2009 at 11:04

GoogleCodeExporter commented 9 years ago
please try modify /etc/hosts . set the 127.0.0.1  localhost  to be the ipaddr 
which you are. then restart the asterisk. the registion problem will be fixed.

Original comment by helen...@gmail.com on 15 Mar 2011 at 3:42