qickrooms / red5phone

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

Reg. Failure = 401 Unauthorized #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When I first time to use the red5phone, it works fine.
2.  Close Broser, open browser, then use red5phone to login again, it shows
"Reg. Failure = 401 Unauthorized"

What is the expected output? What do you see instead?
Reg. Failure = 401 Unauthorized

What version of the product are you using? On what operating system?
red5phone for red5 0.8 RC2 version, Asterisk, linux

Please provide any additional information below.
I have search the error message, it seems bug of mjsip?

thank you

Original issue reported on code.google.com by chengwei...@gmail.com on 27 Mar 2009 at 8:08

GoogleCodeExporter commented 9 years ago
I am also getting 401 unauthorized when i am trying to register with asterisk
server.Please help to solve the issue.

Thanks

Original comment by errach...@gmail.com on 31 Mar 2009 at 11:46

GoogleCodeExporter commented 9 years ago
Hi All,
       I am also facing the same issue while registering with asterisk server.can any
body help me to solve the problem.

Thanks in Advance

Original comment by allath...@gmail.com on 1 Apr 2009 at 2:47

GoogleCodeExporter commented 9 years ago
hi
this problem is result of someone changed my code :)
in SIPUser.java there is no use of "realm" just proxy value while in the 
function:
public void register() it try to use realm 
ra = new SIPRegisterAgent( sip_provider, user_profile.fromUrl, 
user_profile.contactUrl, username,
                    user_profile.realm, password, this );

to fix it:
line 136 add "private String realm;"
line 181 add "this.realm = realm;"

line 183 change to be like:"String fromURL = "\"" + phone + "\" <sip:" + phone 
+ "@" 
+ realm + ">";"

problem solved!!!

BR,
Lior 

Original comment by lior.her...@gmail.com on 2 Apr 2009 at 7:30

GoogleCodeExporter commented 9 years ago
1. I can't reproduce this error
2. If we use realm in fromURL, it will be a problem when realm name is not an 
address. For example, for Asterisk the default realm of asterisk is "asterisk" 
and 
for Cisco call manager is "sipline"

Original comment by olajide....@gmail.com on 4 Apr 2009 at 2:57

GoogleCodeExporter commented 9 years ago
hi
in sip stack extendedInviteDialog.java was old for handling correct 401 error 
with 
new branch.
2nd thing is to fixed this realm,domain,proxy once and for all.
the realm is osmething that use only in Authentication header and can be any 
string 
like "asterisk" or "spiderman". 
the current way we use realm in the code is should be reffer as Proxy or Domain 
and 
the value we use in Proxy should be called "outbound proxy". 
so To: and From: header should be "subscriber@proxy", but the meesage should be 
send 
to the outbound proxy ip. the realm should be used only in realm="value" in WWW-
Authentication  header. this value can be exteracted automaticlly from the 401 
or 
407 authentication challenge.

to solve it can leave realm and proxy as it is and read outbound_proxy from 
sip.cfg, 
but as far as i see red5 standalone do not use sip.cfg

Original comment by lior.her...@gmail.com on 6 Apr 2009 at 2:21

GoogleCodeExporter commented 9 years ago
So best thing would be to pass it from client API and softphones

Original comment by olajide....@gmail.com on 7 Apr 2009 at 12:26

GoogleCodeExporter commented 9 years ago
 I can't reproduce this error still.

 lior.her...@suomenpuhelin.com, 

why the sipphone mapping( plugin of openfire) can test sip config success? 

Original comment by louli2...@gmail.com on 21 Apr 2009 at 2:23

GoogleCodeExporter commented 9 years ago
 ok i find a method!handle the sip register 401&407 failer

refresh new brach id  in mjsiplib ExtendedInviteDialog.onTransFailureResponse

code like this:

 ViaHeader v=(ViaHeader)req.getViaHeader();  
 v.setBranch(SipProvider.pickBranch());  
 req.removeViaHeader();  
 req.addViaHeader(v); 

Original comment by louli2...@gmail.com on 21 Apr 2009 at 2:48