MjSip authentication problem

by andyn » Tue, 08 Jul 2008 15:24:30 GMT


Sponsored Links
 Hi there,

have anyone tried to get the demo application running included in the
MjSip zip package from HSC?
The whole zip package can be downloaded under:

 http://www.hsc.com/resourceCenter/resource.aspx 

I used Wireshark for checking the data transmitted to my sip server.
But there's only one request been sent which is answered by the server
with an "401 Unauthorized". To register again (to start a new try) the
emulator must be restarted.

I checked the authentication data by running x-lite on my notebook and
it works. So it doesn't seem to be a server problem does it? And data
is transmitted to server (hence it isn't a forwarding / firewall
problem)...

Any suggestions?
I hope to get some help...

Thanks


Andy
--~--~---------~--~----~------------~-------~--~----~



MjSip authentication problem

by Zhihong GUO » Wed, 09 Jul 2008 01:19:03 GMT


 Have you try a user id followed by @xx.xx.xx.xx where xx.xx.xx.xx is the
server ip.

2008/7/8 andyn <[EMAIL PROTECTED]>:


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


MjSip authentication problem

by andyn » Wed, 09 Jul 2008 15:18:16 GMT


 Hi,

yes, I've tried both the name and the id after the "@". But what I
just found out:
if I try the same (registering on the sip server) with x-lite, the
same error comes up. So after the first request of x-lite, the
response contains also a 401 error saying the same like on Android /
the demo application (unauthorized). The difference between the demo
application and x-Lite:
x-Lite sends a request AGAIN, and the second request also contains the
authorization data that looks like this:

Authorization:
Digest username="xxx",
realm="xx.somewhere.com",
nonce="4874614acf6992cbc7cd3681a342ec2f0392180a",
uri="sip:xx.somewhere.com",
response="e5fa2fe1b25087b2632c64f8ae006503",
algorithm=MD5

So what I'm now trying to do is to get the application sending these
authorization data too after the first response.

I don't know if it is a normal procedure that first a request is sent
without the authorization data and when it fails the second request
contains this data or if it is a server specific problem...any
ideas???





--~--~---------~--~----~------------~-------~--~----~



MjSip authentication problem

by Andrea Bernardi » Wed, 09 Jul 2008 19:00:59 GMT


 Yes, is a standard procedure for digest-authentication.
The MjSip MjSip should manage this situation, in the code present in
RegisterAgent.java in the function onTransFailureResponse.
Maybe you can debug this section to see if there is an error.

Best Regards,
Andrea Bernardi

2008/7/9 andyn <[EMAIL PROTECTED]>:



--~--~---------~--~----~------------~-------~--~----~



MjSip authentication problem

by andyn » Wed, 09 Jul 2008 20:21:33 GMT


  found out the same. It is automatically handled by the
RegisterAgent, but there seems to be another problem at reading out
some data. So the "realm" and "username" values can not be read out
although they were defined.
I just assigned them my standard values and will take care of that
problem later.

After doing that the demo application also sends a second request
containing the authorization data. But this request is also still
answered with a 401 error.
There's at least one more error....

Andrea, did you change anything in the code or did you just run it and
the app works perfectly?
Did you just try the call functionality or also the register function
by using a sip server?

Making calls isn't also a problem. That now (after rebuilding the
project) works. But the register functionality not....




On 9 Jul., 13:00, "Andrea Bernardi" <[EMAIL PROTECTED]> wrote:
--~--~---------~--~----~------------~-------~--~----~



MjSip authentication problem

by andyn » Wed, 09 Jul 2008 21:03:48 GMT


 've got it!!!

The problem was the password...
I entered one and this password was also saved by the application. But
it wasn't used for generating the nonces etc. (don't ask me why...)
So there always were contents in the several frames (udp / ip /...),
but when the server compared his calculated nonces with these created
by the application, it responses that the authorization failed (but it
didn't say that there was no password used when creating the checksum
what the server cant't know because md5 can be encrypted, but not
decrypted...)!

Such a silly error.... Don't you have the same problem???

Regards,
Andy




On 9 Jul., 14:21, andyn <[EMAIL PROTECTED]> wrote:
--~--~---------~--~----~------------~-------~--~----~



MjSip authentication problem

by Andrea Bernardi » Wed, 09 Jul 2008 21:13:20 GMT


 lso I have made some changes in the code because I should use a proprietary
sip network.
In your case, if you pass the same user, realm and uri used by x-lite user
agent and pass these
values with the nonce obtained from the network value to the
DigestAuthentication class,
you should obtain a digest response to authenticate successfully.

When you close sipdroid a process called hsc.org.sip.ua isn't closed and
mantain the connection,
so instead to restart the emulator you can take the process id from a shell
on the emulator via
command ps and kill it. After that you can restart sipdroid user agent.
It's a bug in the code but I haven't correct it.

Best Regards,
Andrea

2008/7/9 andyn <[EMAIL PROTECTED]>:


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Is it possible to start an remote activity which is loaded by classLoader

You don't need any kind of class, just set the desired ComponentName.






-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~

2. ARMv4, different file systems, and other patches.

Hi Ben,

I'm trying to port android to a s3c2410 develop board..which's only
64m ram..
now I've successfully built out armv4t images with your submitted
patch and sean's patches under reviewing.
but I'm getting servicemanager exiting problem while using nfs as
rootfs.
I'm doubting it's the binder who cannot be inited.. likely you've met
the same problem, as in your patch that add some log for this.
what's the problem it is? about mmap? or is there some option to
enable the nfs support this? or 64m limits this?
I've checked the /dev/binder & /dev/ashmen, both are 777.
looking forward for your replay :-), thanks!
I've no usb cable now..and don't know how to make adb to use a
usb2serial cable..so some help on this is also very nice~



--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [EMAIL PROTECTED]
website:  http://www.***.com/ 
-~----------~----~----~----~------~----~------~--~---

3. Is it possible to start an remote activity which is loaded by classLoader

4. What is the difference between onOptionsItemSelected and onMenuItemSelected?

5. How to draw an image on top of another drawable?

6. Trouble with AssetManager

7. OutOfMemoryError when switching orientation