Sorry, I had forgotten to mention that during my initial run-in with this problem, even before I made my first post in this forum, I had come across something on the web and had made the changes suggested. You can check out the post here:
http://forums.counterpath.com/viewtopic.php?f=1&t=3820As suggested in that post, I forwarded UDP (and TCP) ports 5060-5061 to the OBi. I also disabled the X_UseRport option in Service Providers > ITSP Profile B > SIP (option not available in OBi Expert config - only when you login to the device directly).
Earlier (before the port forwarding and the rport setting), the OBi status kept showing "Waiting for server response". After the changes, I got the 401. If I enable rport and keep the port forwarding, I keep getting a 400 error.
Anyway, since the earlier logs I forwarded were with the ports forwarded already, here's the rest of the response to the REGISTER with Authorization and the next request:
Response to the REGISTER with AuthorizationSIP/2.0 401 Unauthorized
Call-ID: 3ffdeaaa@192.168.0.3
l: 0
CSeq: 36720 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP2246066421cf1cc74
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5061;received=118.xx.xx.xx;branch=z9hG4bK-64466080
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Sat, 17 Mar 2012 06:38:10 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1331964245", opaque="", stale=FALSE, algorithm=MD5
Next requestREGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3ffdeaaa@192.168.0.3
Content-Length: 0
CSeq: 36721 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP2246066421cf1cc74
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5061;branch=z9hG4bK-9bad5b4
Authorization: DIGEST algorithm=MD5,nonce="1331964245",opaque="",realm="ocn.ne.jp",response="fd261e8e81c87398d84af2d8322d346f",uri="sip:asahi-net.or.jp:5060",username="XXXXXXXX"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@118.xx.xx.xx:5061>;expires=60;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces