OBiTALK Community

General Support => Installation and Set-Up (Devices) => Topic started by: ichigo on March 14, 2012, 06:35:54 PM

Title: SIP registration problems - please help!
Post by: ichigo on March 14, 2012, 06:35:54 PM
Hi,
I am trying to set up my OBi100 to work with my ITSP in Japan. However, I keep getting a "Register Failed: 401 Unauthorized" error. Here's what I have tried so far:
I used the obitalk portal to do the configuration.

1. Tried the simple setup by using the "Generic Service Provider" option and filling in the "ITSP Proxy Server", "Auth User Name" and "Auth Password" fields.
That got me a "403 Forbidden" error.

2. Next, I tried the OBi Expert config (I had enabled auto provisioning earlier) and changed the following:
Service Providers > ITSP Profile B General > Name: asahi-net
Service Providers > ITSP Profile B SIP > ProxyServer: voip02.nc.asahi-net.or.jp
Voice Service > SP2 Service > Enable: <checked>
Voice Service > SP2 Service > X_ServProvProfile:B
Voice Service > SP2 Service > X_RingProfile:B
Voice Service > SP2 Service > X_CodecProfile:B
AuthUserName > {User ID provided by ITSP}
AuthPassword > {password provided by ITSP}
URI > 050xxxxxxxx@asahi-net.or.jp
where 050xxxxxxxx is the phone number provided by the ITSP

Note that if I swap the UserName with the phone number OR just put only the phone number in the URI field OR leave the URI field blank, etc - I keep getting 403 Forbidden error.
Its only with the combo described above, that I get the "Register Failed: 401 Unauthorized (server=210.227.109.205:5060; retry in 26s)"

Just to check, I tried putting in the same details in X-lite or ExpressTalk on my computer, and it registers and I can ring the IP softphone from another phone.

Not sure what I am missing with OBi. When replying, please consider that I am not a tech person, but I can find my way around IT :)

Cheers!
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 14, 2012, 08:09:01 PM
一護さん (or is it 苺さん?),

Please describe your successful settings in X-Lite and I'll try to provide the corresponding ones for the OBi.

User ID: (User ID provided by ITSP, phone number from ITSP, or something else)?
Domain: (asahi-net.or.jp, voip02.nc.asahi-net.or.jp, or something else)?
Password: (I assume that's the password provided by ITSP)
Display name: (your name, blank, something else)? (OBi may have a problem with kana or kanji in this field.)
Authorization name: (User ID provided by ITSP, blank, or something else)?
Also, any settings in the Domain Proxy box.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 14, 2012, 09:09:15 PM
ha! Probably the strawberry is better :)

I will check the X-Lite settings and let you know once I am back home.
Don't think kana/kanji is a problem, since I don't use it. Besides, I am using a Mac with a US keyboard and US character map (I didn't activate any Japanese setting on my Mac).
And Stewart, thanks for your quick reply!
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 15, 2012, 08:25:02 AM
Hi Stewart... I've attached screenshots for the X-Lite settings that got it to register properly. Password is provided by the ITSP.
Thanks for your help!
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 15, 2012, 09:42:47 AM
Try the following (keeping other settings as you had described):

ITSP Profile B -> SIP -> ProxyServer: asahi-net.or.jp
ITSP Profile B -> SIP -> OutboundProxy: voip02.nc.asahi-net.or.jp
Voice Services -> SP2 Service -> AuthUserName: User ID from ITSP
Voice Services -> SP2 Service -> URI: 050xxxxxxxx@asahi-net.or.jp

If you still get a 401:  Confirm that password is correct, e.g. by pasting into both X-Lite and device.  If that's not it, we can use Wireshark and SIP Debug to compare what is being sent in both cases.

If you still get a 403, note that some providers disallow multiple registrations with the same credentials.  Make sure that X-Lite (and any other VoIP apps or devices) have been shut down (not just minimized).  Otherwise, we should look at the response with SIP Debug -- there may be a clue in the text following the 403, or in e.g. a Warning header.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 15, 2012, 03:19:10 PM
Tried changing the settings for ProxyServer and OutboundProxy and by pasting the password into both X-Lite and the OBi. Still getting a 401.

I have downloaded and installed Wireshark. How do I use i?
I have now enabled
Voice Services -> SP2 Service -> X_SipDebugOption:Log All Messages
on the device
But how do I configure Device Admin >Syslog?
The OBi is connected to an Apple Time Capsule, which is wirelessly connected to another Airport Express which gets the internet/vdsl modem connection. (the outlet is in an odd place, hence this setup). My computer is on the same wireless network, but to log the OBi, do I connect the computer to the Time Capsule by ethernet or do I connect the OBi to the computer? Or is there a simpler way?
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 15, 2012, 08:05:45 PM
Conceivably, one of the Apple devices has a SIP ALG that is causing trouble.  Possibly, changing SP2 Service -> X_UserAgentPort from 5061 to 5070 will help.

Otherwise, I'm not familiar with the Time Capsule, but if it is acting as a simple bridge, the syslog packets should be able to reach your computer with no topology changes.

In the OBi, set Syslog -> Server to the private IP address (probably 192.168.x.x) of the computer running Wireshark.  Start a capture and confirm that syslog packets appear.  To make it easier to see SIP, select one of the packets, right-click and choose Decode As, choose destination (514) as SIP.

For X-Lite, you should be able to see the SIP traffic directly.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 15, 2012, 08:51:03 PM
I will try out your suggestions once I am back home.

You can consider Time Capsule to be just an Airport Extreme Base Station plus a disk, for simplicity. Its been set up to extend the network of the main wireless base station - not sure if that is the same as a "bridge".

I was just thinking... since the OBi has been configured, why don't I just connect it directly to the phone co's modem, temporarily disconnecting the Apple devices, and see if it works? If it does, then you are probably right with the SIP ALG problems on Apple devices. You think this course of action might help to identify the issue?
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 15, 2012, 09:33:39 PM
Testing with a direct connection to the modem is a good idea.  Does the Airport Express get a public IP address on the WAN side?  If not, the modem is likely also configured as a router (but it's still worth trying the test).  Is the Airport Express set up to do PPPoE (or some other PPP protocol) to the modem?  If so, you won't be able to connect the OBi directly, as it does not support such protocols.

In any case, confirm that the direct modem connection is working, by calling the echo test **9 222 222 222.  Do you have another service on SP1?  Does it work properly?  When connected directly to the modem, if you have another path to the Internet (smartphone, neighbor's Wi-Fi, etc.), try to see if the OBi is showing the same error.

Title: Re: SIP registration problems - please help!
Post by: ichigo on March 16, 2012, 12:27:58 AM
Ah! Thanks for pointing out. The Airport Express is set up to do a PPPoE to the modem and that is how it gets the public IP address on the WAN side (i think?). Hmmm...tricky to connect the OBi directly in that case.
I have google voice set up on SP1 and it connects flawlessly. Does that rule out the SIP ALG problem or could it still be manifested for SP2?
Also, for Device Admin >Syslog> Level... what do I set it at? Should I leave it at the default 7?
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 16, 2012, 11:12:51 AM
Assuming that changing X_UserAgentPort didn't help:

A SIP ALG problem would be unlikely to impact either GV or OBiTalk, as they are very different protocols.  If you have one, trying another brand of router would be a useful quick test.  Or, if you have a second Ethernet NIC for your Mac, e.g. a USB-to-Ethernet dongle, you could set up PPPoE on the Mac, connected directly to the modem, sharing the Internet connection to the other Ethernet port, where you'd connect the OBi (if the NIC is not auto MDI/MDX, you'd need a crossover cable, hub or switch in the path.

If you just want to proceed with the Wireshark analysis, don't worry about Syslog Level.  It doesn't affect SIP Debug at all; it only controls what internal OBi events get logged.  The default setting (7) logs everything available, which can't hurt and might prove useful.

Yet a third approach would be to test the OBi with another SIP provider, e.g. a free Callcentric account.  If that also fails, it will be easier to debug, because many users here are familiar with it.  If Callcentric works ok, we can look at what's different between the two providers.
Title: Re: SIP registration problems - please help!
Post by: RevKev on March 16, 2012, 04:38:59 PM
I would try connecting the OBi directly to the AE and bypass the Time Capsule and see if that makes any difference.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 16, 2012, 07:34:47 PM
Yes, you're correct Stewart: changing X-UserAgentPort did not help.

I didn't want to go out in the rain to buy a USB-to-Ethernet dongle or another brand of router, and I was a bit overwhelmed by Wireshark - so I decided to try option 3. Callcentric registered without any hiccups at all and I was able to receive and make calls. I cross-checked the OBi's Call History page to make sure that the calls were indeed routed through SP2 (Callcentric). So now do you think we can leave the SIP ALG issue behind us?

I think I will now have to look at Wireshark again and get those logs for you to analyze :)

@RevKev: the AirportExpress only has a WAN port - so I cannot connect the OBi to it directly.
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 16, 2012, 08:20:23 PM
In case it's difficult to get the ASAHI Net service to work properly, could another provider be a good alternative?  ASAHI rates to Japan landlines and mobiles are quite high.  Are you using it primarly to call free 050 numbers?

Is your existing 050 number important to you?  If so, can it be ported to another provider?  If not, would a geographic, e.g. 03 number be acceptable?

Does ASAHI include call forwarding?  If so, are there any free forwarding destinations (SIP URI, iNum, etc.)?  If so, that would provide a workaround for incoming, until the problem can be fixed.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 16, 2012, 08:40:09 PM
Asahi is my ISP and they are the cheapest with English language support. I do call 050 numbers, but I need a local Japan number for people to call, and this seems to be a cheap option. My current 050 number is not terribly important for me. 03 numbers are traditional telephone numbers here as far as I know.

I don't think Asahi includes call forwarding, but I can wait a while till the problem is fixed.
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 16, 2012, 11:46:57 PM
At this point, I don't know whether this might be an ALG problem -- it's still possible that e.g. field length or header order might be making the difference.  With luck, the Wireshark traces will show what's happening.

If you are using ASAHI Net just for incoming and for calling free 050 numbers, the cost is only a few yen, so I hope we can make it work -- anything else would cost more, or have significant limitations.  For example, an Anveo Tokyo DID (Value plan) is $6.45/mo.  A free solution that would work only for specific contacts is Rebtel, set up to ring a free Callcentric (or other) iNum.  A caller who is not a contact could still reach you, but it would require two-stage dialing.  For example, if you call a SIPBroker access number such as 06-45604000, and at the prompt enter *4621777xxxxxxx (use the last 7 digits of your Callcentric number), your OBi phone should ring.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 17, 2012, 12:00:39 AM
Yes, the other options are either more complicated or costlier - usually both. So I would be relieved if this worked! I sent you a PM with a few more details. Let me know if you need anything else.
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 17, 2012, 12:09:27 PM
In the Airport Express, try forwarding UDP port 5061 to the OBi.  Because of a number of factors, it appears that a contact header with a bad port number is being generated.  I am hoping that with the forwarding in place, the AE won't translate the source port on the REGISTER requests.

If no luck, please post captures in the OBi ASAHI case, with at least 5 SIP packets (initial REGISTER attempt, 401 response, REGISTER with Authorization, ??? response and ??? next request).
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 17, 2012, 04:56:50 PM
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=3820
As 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 Authorization
SIP/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 request
REGISTER 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
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 17, 2012, 09:08:41 PM
It appears that there are a combination of three constraints (any two of which would not be a problem).

1. The OBi insists on processing the Via received parameter, even when rport is turned off.
2. The AE insists on translating the source port number, even with the port forwarded.
3. ASAHI refuses to accept an rport parameter.

At this point, I have few suggestions remaining.  If you haven't yet tried this, test with X_UserAgentPort set to 5060, with port 5060 forwarded to the OBi.  (To avoid a conflict, you may need to change X_UserAgentPort for SP1 to something else, even though your SP1 is not SIP.)

A second possibility is connecting the Mac directly to the modem, setting up PPPoE on the Mac.  Then, set up sharing to share the PPP connection via Wi-Fi and configure the Time Capsule to connect to the Mac.

Possibly, you can "launder" the connection through a free PBXes account, though I don't know whether you'll have an rport issue there. (I'll give you suggested settings for the trunk, if you want to try.)

There might be another free PBX that you could relay through, but I'm not familiar with any.  Perhaps another member can chime in here.

You could almost certainly fix the problem by running e.g. FreeSWITCH on your Mac, but that would be a lot of work.

Can you take the OBi over to another site (friend, neighbor, work) and see whether a different router helps?
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 19, 2012, 03:21:27 AM
Okay... that's quite messed up...

To go over your suggestions one by one: I had initially set up ASAHI as SP1, so the X_UserAgentPort = 5060 has already been tried. Nevertheless, I tried what ever you suggested, just in case SP2 magically opens up the connection... but no luck :(

I tried setting up the PPoE on the Mac, which was quite easy. But I had trouble getting the TC to connect to the network created by the Mac. My iPhone connected happily and used the internet connection, but TC refused - not sure what I did wrong.

I could try out the PBXes option, but I am not sure which settings I have to change... unless you "guide" me.

I will try using a FON router (I realized I had one, given to me by SoftBank when I got the iPhone) tonight and see if that helps.

Finally, you mentioned at the beginning that the rport parameter is ignored by the OBi... Is there a way to let the developers know...maybe they can fix that with an update?

Thank you for your patience with this so far!

============
Tested with the new router: modem>router>OBi (ethernet);
Mac connected via WiFi
Still getting the 401 error, when I checked on the Mac. Added port forwarding for 5060-5061, but it still gives the 401.
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 21, 2012, 03:05:59 AM
Sorry for the long delay in replying.

I tried having PBXes register to a local device.  Unfortunately, it sends rport, so that won't work for you.

There are still lots of missing pieces to this puzzle.  In a "classic" SIP request, the Via header tells the server the IP address and port to which the response should be sent.  Obviously, that won't work if the client is behind a NAT.  There are three ways of dealing with that problem.  One is for the server to reply to whatever IP/port from which the request came, which is Callcentric's approach and works fine on your system. A second method is a SIP ALG in the router, which substitutes the proper address and port in various headers.  Finally, the client device can act as if it is on a public IP, learning (by STUN or received/port parameters) the proper IP and port to send.

In the present failing situation, the OBi learns its public address, but not the correct public port number.  It then sends an incorrect Via header with the public IP but port 5061.  When you have no forwarding in place, the response gets discarded, resulting in the "Waiting for server response" status.  With forwarding, you get the response, but it's another 401.  I don't know whether that's because the server sees an inconsistency between the Via header and the actual source, or it's for some unrelated reason.  We could find out, if you have a way for you (or someone else) to test OBi with ASAHI on a public IP.

I don't know how we are getting a response to the initial REGISTER request, which has the private address in Via.  Also, X-Lite is presenting only the private address, and is working fine.  Either when Via shows a private address, the server responds to the source address/port, or the AE is doing some sort of ALG.  We could find out, by testing X-Lite through a router known to have no SIP ALG, or have one that can be disabled.

If the OBi does work with ASAHI, behind a NAT that doesn't translate the source port number, a different router would be the easiest solution.  Perhaps port forwarding on the FON router would help, or alternate firmware could be loaded in, e.g. DD-WRT.  Does the AE have latest firmware?  Can your modem be configured to do the PPPoE internally?  Any chance of getting the TC to associate with the Mac Wi-Fi?

Otherwise, perhaps Obihai could fix it to ignore the received tag when rport is off, or you could insert some kind of SIP PBX or proxy in the path, running on your Mac, in the cloud, or a commercial service.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 22, 2012, 09:14:49 AM
Hi Stewart! Good to see you back!

I did try forwarding the ports on the FON router, but still got a 401. Loading alternate firmware to the type of FON router I have is too much of a hassle, and I don't think I have the technical expertise for that:
http://sites.google.com/site/hottunalabs/home/fonera-simpl-hacking
I will try and get a different router from one of my friends – the only reason I have been holding it off is due to the UI for these routers (usually) being in Japanese – but I can try.

The AE firmware version is 7.6.1, which is the latest for my model. The NTT ADSL modem is just that – a modem – it needs a computer or router to configure the PPPoE – although considering its size, I would have expected it to have that functionality. The issue with getting the TC to associate with the Mac Wi-Fi is that the Mac Wi-Fi has a very simple setup, which does not allow the network to be extended (I think – you can correct me if I am wrong). For instance, the options that I have on the TC for setting up the wireless are: a) Create a wireless network, b) Participate in a WDS network and c) Extend a wireless network. Option a) is ruled out. For b), the Mac has to be set up as a WDS main, but I don't see any way of doing that and for c), the TC reports that "the selected network cannot be extended". :/

I don't think I am desperate enough to "insert some kind of SIP PBX or proxy in the path, running on the Mac, in the cloud, or a commercial service" :)
Will let you know how I get along with an alternate router (will take some time though) and also see if I can get OBihai to come up with a fix.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 24, 2012, 09:48:28 PM
I finally got around to testing the OBi with a router (NEC's Aterm WR8500N) that is "tested" to be compatible with IP phones from NTT West, Asahi, etc. The PPPoE was done by this router and I connected the OBi to it directly, using ethernet. Still kept getting the 401s. Here are the logs from this setup (as earlier, starting from the initial REGISTER request, reply to the REGISTER, etc.):


REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: a253a417@192.168.0.3
Content-Length: 0
CSeq: 14732 REGISTER
From: <sip:050XXXXXXXX@asahi-net.or.jp>;tag=SP130c9d33a77dbdd44
Max-Forwards: 70
To: <sip:050XXXXXXXX@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-622dcc19
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050XXXXXXXX@192.168.0.3:5060>;expires=60;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

========

SIP/2.0 401 Unauthorized
Call-ID: a253a417@192.168.0.3
l: 0
CSeq: 14732 REGISTER
From: <sip:050XXXXXXXX@asahi-net.or.jp>;tag=SP130c9d33a77dbdd44
To: <sip:050XXXXXXXX@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-622dcc19
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Sat, 24 Mar 2012 17:59:37 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1332608824", opaque="", stale=FALSE, algorithm=MD5

=============

REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: a253a417@192.168.0.3
Content-Length: 0
CSeq: 14733 REGISTER
From: <sip:050XXXXXXXX@asahi-net.or.jp>;tag=SP130c9d33a77dbdd44
Max-Forwards: 70
To: <sip:050XXXXXXXX@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-7c725f12
Authorization: DIGEST algorithm=MD5,nonce="1332608824",opaque="",realm="ocn.ne.jp",response="5aab2584f7ebc78b94337030683ec13b",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGX"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050XXXXXXXX@118.xx.xx.xx:5060>;expires=60;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

=====================

SIP/2.0 401 Unauthorized
Call-ID: a253a417@192.168.0.3
l: 0
CSeq: 14733 REGISTER
From: <sip:050XXXXXXXX@asahi-net.or.jp>;tag=SP130c9d33a77dbdd44
To: <sip:050XXXXXXXX@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-7c725f12
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Sat, 24 Mar 2012 17:59:38 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1332608824", opaque="", stale=FALSE, algorithm=MD5

=================

REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: a253a417@192.168.0.3
Content-Length: 0
CSeq: 14734 REGISTER
From: <sip:050XXXXXXXX@asahi-net.or.jp>;tag=SP130c9d33a77dbdd44
Max-Forwards: 70
To: <sip:050XXXXXXXX@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-49226648
Authorization: DIGEST algorithm=MD5,nonce="1332608824",opaque="",realm="ocn.ne.jp",response="5aab2584f7ebc78b94337030683ec13b",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGX"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050XXXXXXXX@118.xx.xx.xx:5060>;expires=60;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 24, 2012, 11:01:25 PM
Assuming that the stale=FALSE in the second 401 can be taken at face value, perhaps the OBi is for some reason not calculating the response= correctly.

Run this perl script to test.  Put it in a file and edit the values of $authid and $pass, and edit $nonce to match an Authorization header that you have captured.  Run it by typing
perl filename
in a terminal window, with the current path pointing to the folder where you put the file.  It should display a string that matches the corresponding response parameter.
#!/usr/bin/perl -w
use Digest::MD5 qw(md5_hex);

$authid = 'ABCDEFGX';
$pass = 'putyourpasswordhere';
$realm = 'ocn.ne.jp';
$method = 'REGISTER';
$uri = 'sip:asahi-net.or.jp:5060';
$nonce = '1332608824';

$a1 = md5_hex("$authid:$realm:$pass");
$a2 = md5_hex("$method:$uri");
print md5_hex("$a1:$nonce:$a2"), "\n";

Title: Re: SIP registration problems - please help!
Post by: ichigo on March 24, 2012, 11:29:46 PM
Sorry if I did not get you correctly, but I wasn't sure if I should use a different $nonce from the one that you already put in your script - 1332608824. If I keep that and put in the actual userid and password in the file, then running your perl script in Terminal gives me 5aab2584f7ebc78b94337030683ec13b and it matches what I sent in the earlier post. Is that what you were looking for?
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 25, 2012, 05:14:48 AM
I assume that X-Lite works correctly with the new router.

Your test was as I requested, so there must be some other reason why the REGISTER with Authorization is still being rejected.

1. I see expires=60 in the Contact header and don't know why the OBi would be sending that.  Did you change the default value of RegisterExpires in the OBi?  If so, see whether resetting it to the default (3600) helps.

2. Conceivably, ASAHI will only accept certain User-Agent values.  Try setting X_UserAgentName to
X-Lite 4 release 4.1 stamp 63215

If neither helps, I'll post a perl script that will force the Contact header to look like X-Lite's.
Title: Re: SIP registration problems - please help!
Post by: RonR on March 25, 2012, 06:22:11 AM
Quote from: Stewart on March 25, 2012, 05:14:48 AM
1. I see expires=60 in the Contact header and don't know why the OBi would be sending that.  Did you change the default value of RegisterExpires in the OBi?  If so, see whether resetting it to the default (3600) helps.

The OBi sends the value of RegistrationPeriod for expires= in the Contact header, not the value of RegisterExpires.  The default value of RegistrationPeriod in the OBi is 60.

I just confirmed this with WireShark.
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 25, 2012, 09:48:06 AM
Quote from: RonR on March 25, 2012, 06:22:11 AMThe OBi sends the value of RegistrationPeriod for expires= in the Contact header, not the value of RegisterExpires.  The default value of RegistrationPeriod in the OBi is 60.
Thanks for catching that.  The OP should try setting RegistrationPeriod to 3600.  If no luck, we'll try tweaking the Contact header next.
Title: Re: SIP registration problems - please help!
Post by: ichigo on March 26, 2012, 05:59:08 PM
X-Lite does manage to register with the new router.
I changed RegistrationPeriod to 3600.
RegisterExpires was already 3600.
I hadn't touched these settings earlier.

Results:
No change from previous outcome.

Logs:

A) Obi masquerading as X-Lite:

REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: e8349bcb@192.168.0.3
Content-Length: 0
CSeq: 4143 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP17e1d28d65c47b151
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-350c1561
User-Agent: X-Lite 4 release 4.1 stamp 63215
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

SIP/2.0 401 Unauthorized
Call-ID: e8349bcb@192.168.0.3
l: 0
CSeq: 4143 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP17e1d28d65c47b151
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-350c1561
User-Agent: X-Lite 4 release 4.1 stamp 63215
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Mon, 26 Mar 2012 16:11:10 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1332778071", opaque="", stale=FALSE, algorithm=MD5

REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: e8349bcb@192.168.0.3
Content-Length: 0
CSeq: 4144 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP17e1d28d65c47b151
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-4276ab87
Authorization: DIGEST algorithm=MD5,nonce="1332778071",opaque="",realm="ocn.ne.jp",response="862cbfd068e9d548a6af50d50f5c2bda",uri="sip:asahi-net.or.jp:5060",username="XXXXXXXX"
User-Agent: X-Lite 4 release 4.1 stamp 63215
Contact: <sip:050xxxxxxxx@118.xx.xx.xx:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

SIP/2.0 401 Unauthorized
Call-ID: e8349bcb@192.168.0.3
l: 0
CSeq: 4144 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP17e1d28d65c47b151
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-4276ab87
User-Agent: X-Lite 4 release 4.1 stamp 63215
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Mon, 26 Mar 2012 16:11:11 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1332778071", opaque="", stale=FALSE, algorithm=MD5

REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: e8349bcb@192.168.0.3
Content-Length: 0
CSeq: 4145 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP17e1d28d65c47b151
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-4a59f0aa
Authorization: DIGEST algorithm=MD5,nonce="1332778071",opaque="",realm="ocn.ne.jp",response="862cbfd068e9d548a6af50d50f5c2bda",uri="sip:asahi-net.or.jp:5060",username="XXXXXXXX"
User-Agent: X-Lite 4 release 4.1 stamp 63215
Contact: <sip:050xxxxxxxx@118.xx.xx.xx:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

*****************************
B) The real X-lite:

REGISTER sip:asahi-net.or.jp SIP/2.0
Via: SIP/2.0/UDP 192.168.0.4:5060;branch=z9hG4bK-d8754z-5f44145cc126604c-1---d8754z-
Max-Forwards: 70
Contact: <sip:050xxxxxxxx@192.168.0.4:5060;rinstance=98c1394d3a1d0472;transport=udp>
To: <sip:050xxxxxxxx@asahi-net.or.jp>
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=206f6044
Call-ID: ZmJkMTgxZjY2MzU1OGUxMDZjN2ZkMjk0ZmVjYWE1YzI.
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite 4 release 4.1 stamp 63215
Content-Length: 0

SIP/2.0 401 Unauthorized
v: SIP/2.0/UDP 192.168.0.4:5060;received=118.xx.xx.xx;branch=z9hG4bK-d8754z-5f44145cc126604c-1---d8754z-
To: <sip:050xxxxxxxx@asahi-net.or.jp>
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=206f6044
Call-ID: ZmJkMTgxZjY2MzU1OGUxMDZjN2ZkMjk0ZmVjYWE1YzI.
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite 4 release 4.1 stamp 63215
l: 0
Date: Mon, 26 Mar 2012 15:53:29 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1332774470", opaque="", stale=FALSE, algorithm=MD5

REGISTER sip:asahi-net.or.jp SIP/2.0
Via: SIP/2.0/UDP 192.168.0.4:5060;branch=z9hG4bK-d8754z-a5508568d1e8bc1d-1---d8754z-
Max-Forwards: 70
Contact: <sip:050xxxxxxxx@192.168.0.4:5060;rinstance=98c1394d3a1d0472;transport=udp>
To: <sip:050xxxxxxxx@asahi-net.or.jp>
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=206f6044
Call-ID: ZmJkMTgxZjY2MzU1OGUxMDZjN2ZkMjk0ZmVjYWE1YzI.
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite 4 release 4.1 stamp 63215
Authorization: Digest username="XXXXXXXX",realm="ocn.ne.jp",nonce="1332774470",uri="sip:asahi-net.or.jp",response="2de5d19ea8105380f6f8d6c05f01f424",algorithm=MD5
Content-Length: 0

SIP/2.0 200 OK
v: SIP/2.0/UDP 192.168.0.4:5060;received=118.xx.xx.xx;branch=z9hG4bK-d8754z-a5508568d1e8bc1d-1---d8754z-
m: <sip:050xxxxxxxx@192.168.0.4:5060>;expires=3600
To: <sip:050xxxxxxxx@asahi-net.or.jp>
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=206f6044
Call-ID: ZmJkMTgxZjY2MzU1OGUxMDZjN2ZkMjk0ZmVjYWE1YzI.
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite 4 release 4.1 stamp 63215
Content-Length: 0
Date: Mon, 26 Mar 2012 15:53:29 GMT

*****************

Over to you.
Title: Re: SIP registration problems - please help!
Post by: Stewart on March 28, 2012, 05:10:59 AM
Try this script:
#!/usr/bin/perl -w
use IO::Socket;

$obiip = '192.168.0.3';         # OBi IP
$obiport = 5060;                # X_UserAgentPort on OBi
$server = '210.227.109.205';    # ASAHI proxy
$sport = 5060;                  # server port

$lport = 5060;                  # port to listen on
$dgs = new IO::Socket::INET(LocalPort => $lport, Proto => 'udp') or die "Socket: $!\n";
while (1) {
    $rcv = $dgs->recv($ibuf, 2000, 0);
    next unless $rcv && length($rcv) >= 8; # ignore errors
    $raddr = inet_ntoa((sockaddr_in($rcv))[1]); # get source addr
    print "pkt from $raddr\n";
    if ($raddr eq $obiip) {     # packet from OBi
#        $ibuf =~ s/;\+sip\.instance=[\"\-<>:\w]+//; # remove sip.instance parameter
        $dpaddr = sockaddr_in($sport, inet_aton($server));
        $dgs->send($ibuf, 0, $dpaddr); # send to server
    }
    elsif ($raddr eq $server) { # packet from server
        $ibuf =~ s/received=[\d\.]+;//; # remove received= parameter
        $dpaddr = sockaddr_in($obiport, inet_aton($obiip));
        $dgs->send($ibuf, 0, $dpaddr); # send to OBi
    }
}
If needed, edit the value of $obiip to the private IP address of the OBi.  Start the script (it binds to port 5060 so make sure that X-Lite or other VoIP app is shut down).  If you needed to forward port 5060 to the OBi, forward it to the Mac instead.  On the OBi, set OutboundProxy to 192.168.0.4 (the private IP address of the Mac).

Wireshark should show each SIP request packet three times: OBi to script, script to server, and SIP Debug output.  Likewise for the response: server to script, script to OBi and SIP Debug output.

Initially, the script just strips the received= parameter from the Via response, which I hope will cause the OBi to keep the private address in the Contact header.  If that doesn't help, uncomment the statement to remove +sip.instance.  (When you edit the script, stop and restart its execution, then restart the OBi.)

I'm hoping that this will allow the OBi to register -- it will probably need more tweaks to actually make or receive calls.

If no luck, please shut down the script and retest X-Lite with Callcentric.  I'm curious whether your new router is preserving the source port number -- if it is, you should see rport=5060 in the incoming Via headers.  Some routers that don't normally preserve the source port number will do so when the port is forwarded.
Title: Re: SIP registration problems - please help!
Post by: Stewart on April 06, 2012, 02:46:34 AM
Did you ever get this working?  If so, please report what problem you found and how you fixed it.  If not, are you using asahinet by some other means?  Using a different VoIP service?
Title: Re: SIP registration problems - please help!
Post by: ichigo on April 08, 2012, 02:20:21 AM
Sorry for the delay in posting the update.

I tried out all your suggestions, but I simply couldn't get the OBi to register with ASAHI. I have attached the logs for you to have a look (there are 3 sections, one for each setup/configuration). I think we should let it be - unless you can think of a way to get the OBI to register directly without going via my Mac: I do not want to keep it switched on all the time, just so that the OBi is able to register!

I had sent a support request to OBi, but they weren't very helpful - almost seemed they didn't understand the problem. So I gave up :(

I think I will just use X-lite on the Mac for making/receiving calls via Asahinet and keep google voice on the OBi. Till OBi comes up with an update that might get this to work :(

###########ASAHI via script
**syslog
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15017 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-24606642
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces



**OBI to script
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15017 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-24606642
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**script to server
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15017 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-24606642
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**server to script
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15017 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-24606642
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:38 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**script to OBI
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15017 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-24606642
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:38 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5


**syslog
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15017 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-24606642
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:38 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15018 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-51b1fa50
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**OBI to script
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15018 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-51b1fa50
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**script to server
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15018 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-51b1fa50
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**server to script
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15018 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-51b1fa50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:40 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**script to OBI
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15018 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-51b1fa50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:40 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15018 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-51b1fa50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:40 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15019 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-275ef617
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**OBI to script
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15019 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-275ef617
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**script to server
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 20a63dda@192.168.0.3
Content-Length: 0
CSeq: 15019 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-275ef617
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**server to script
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15019 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-275ef617
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:40 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**script to OBI
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15019 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-275ef617
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:40 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
SIP/2.0 401 Unauthorized
Call-ID: 20a63dda@192.168.0.3
l: 0
CSeq: 15019 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-275ef617
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:46:40 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 4c582191@192.168.0.3
Content-Length: 0
CSeq: 38104 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-209e1db6
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**OBI to script
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 4c582191@192.168.0.3
Content-Length: 0
CSeq: 38104 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-209e1db6
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**script to server
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 4c582191@192.168.0.3
Content-Length: 0
CSeq: 38104 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP15685caf615c986df
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-209e1db6
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces


Title: Re: SIP registration problems - please help!
Post by: ichigo on April 08, 2012, 02:21:38 AM
The rest of the logs - it didn't allow me to post everything in one post.


#######ASAHI with the script uncommented (to remove +sip.instance)
**syslog
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20454 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-504eeb50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces



**OBI to script
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20454 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-504eeb50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**script to server
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20454 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-504eeb50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces


**server to script
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20454 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-504eeb50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:35 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**script to OBI
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20454 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-504eeb50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:35 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5



**syslog
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20454 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-504eeb50
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:35 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20455 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-194fa1b5
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**OBI to script
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20455 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-194fa1b5
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**script to server
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20455 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-194fa1b5
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces


**server to script
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20455 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-194fa1b5
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:37 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**script to OBI
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20455 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-194fa1b5
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:37 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20455 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-194fa1b5
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:37 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20456 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-753d8a6b
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**OBI to script
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20456 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-753d8a6b
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**script to server
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 3cde8ee1@192.168.0.3
Content-Length: 0
CSeq: 20456 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-753d8a6b
Authorization: DIGEST algorithm=MD5,nonce="1333635109",opaque="",realm="ocn.ne.jp",response="54e1ab3ca2aefb864606e2b3be7b9680",uri="sip:asahi-net.or.jp:5060",username="ABCDEFGH"
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces


**server to script
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20456 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;received=118.xx.xx.xx;branch=z9hG4bK-753d8a6b
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:37 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**script to OBI
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20456 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-753d8a6b
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:37 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
SIP/2.0 401 Unauthorized
Call-ID: 3cde8ee1@192.168.0.3
l: 0
CSeq: 20456 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
To: <sip:050xxxxxxxx@asahi-net.or.jp>
v: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-753d8a6b
User-Agent: OBIHAI/OBi100-1.3.0.2690
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces
Date: Thu, 05 Apr 2012 14:55:37 GMT
WWW-Authenticate: Digest realm="ocn.ne.jp", domain="sip:210.227.109.205", nonce="1333635109", opaque="", stale=FALSE, algorithm=MD5

**syslog
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 043ab5f8@192.168.0.3
Content-Length: 0
CSeq: 37498 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-7addc0e8
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**OBI to script
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 043ab5f8@192.168.0.3
Content-Length: 0
CSeq: 37498 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-7addc0e8
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600;+sip.instance="<urn:uuid:00000000-0000-0000-0000-9cadef1035b2>"
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces

**script to server
REGISTER sip:asahi-net.or.jp:5060 SIP/2.0
Call-ID: 043ab5f8@192.168.0.3
Content-Length: 0
CSeq: 37498 REGISTER
From: <sip:050xxxxxxxx@asahi-net.or.jp>;tag=SP142ba1c06728a71a5
Max-Forwards: 70
To: <sip:050xxxxxxxx@asahi-net.or.jp>
Via: SIP/2.0/UDP 192.168.0.3:5060;branch=z9hG4bK-7addc0e8
User-Agent: OBIHAI/OBi100-1.3.0.2690
Contact: <sip:050xxxxxxxx@192.168.0.3:5060>;expires=3600
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,REFER
Supported: replaces


############callcentric & X-lite
**mac to callcentric
REGISTER sip:callcentric.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.11:18304;branch=z9hG4bK-d8754z-6c02e15ef2f14723-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:17xxxxxxxxx@192.168.0.11:18304;rinstance=c589050c263e2343;transport=udp>
To: "17xxxxxxxxx"<sip:17xxxxxxxxx@callcentric.com>
From: "17xxxxxxxxx"<sip:17xxxxxxxxx@callcentric.com>;tag=1da5972c
Call-ID: ZmYwODgzM2ZjYjFhM2Q5NGY0MmYyNzA0MjJjNzdkNmQ.
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite 4 release 4.1 stamp 63215
Content-Length: 0

**callcentric to mac
SIP/2.0 407 Proxy Authentication Required
v: SIP/2.0/UDP 192.168.0.11:18304;branch=z9hG4bK-d8754z-6c02e15ef2f14723-1---d8754z-;rport=18304;received=118.xx.xx.xx
f: "17xxxxxxxxx" <sip:17xxxxxxxxx@callcentric.com>;tag=1da5972c
t: "17xxxxxxxxx" <sip:17xxxxxxxxx@callcentric.com>
i: ZmYwODgzM2ZjYjFhM2Q5NGY0MmYyNzA0MjJjNzdkNmQ.
CSeq: 1 REGISTER
Proxy-Authenticate: Digest realm="callcentric.com", domain="sip:callcentric.com", nonce="333bfa75900b48cd93bc4aa951eab21f", opaque="", stale=TRUE, algorithm=MD5
l: 0

**mac to callcentric
REGISTER sip:callcentric.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.11:18304;branch=z9hG4bK-d8754z-f90c3d6654fc6a32-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:17xxxxxxxxx@192.168.0.11:18304;rinstance=c589050c263e2343;transport=udp>
To: "17xxxxxxxxx"<sip:17xxxxxxxxx@callcentric.com>
From: "17xxxxxxxxx"<sip:17xxxxxxxxx@callcentric.com>;tag=1da5972c
Call-ID: ZmYwODgzM2ZjYjFhM2Q5NGY0MmYyNzA0MjJjNzdkNmQ.
CSeq: 2 REGISTER
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Proxy-Authorization: Digest username="17xxxxxxxxx",realm="callcentric.com",nonce="333bfa75900b48cd93bc4aa951eab21f",uri="sip:callcentric.com",response="181f084fb8d9dcaaf7d5071b602ae3b2",algorithm=MD5
User-Agent: X-Lite 4 release 4.1 stamp 63215
Content-Length: 0

**callcentric to mac
NOTIFY sip:17xxxxxxxxx@192.168.0.11:18304;rinstance=c589050c263e2343;transport=udp SIP/2.0
v: SIP/2.0/UDP 204.11.192.22:5080;branch=z9hG4bK-c81ea1d1e3aca691df72891d90251052
f: <sip:17xxxxxxxxx@callcentric.com:5062>
t: <sip:17xxxxxxxxx@callcentric.com>
i: 44394ea86e66f937c8a3650f0b310489-5a83b63c66455064c7cfb3b9daf88915@callcentric.com
CSeq: 1 NOTIFY
Max-Forwards: 15
m: <sip:09878dbf69756e8993fcb21f6d19f530@204.11.192.22:5080;transport=udp>
Event: message-summary
c: application/simple-message-summary
l: 40

Messages-Waiting: no
Voicemail: 0/0


**mac to callcentric
SIP/2.0 200 OK
Via: SIP/2.0/UDP 204.11.192.22:5080;branch=z9hG4bK-c81ea1d1e3aca691df72891d90251052
Contact: <sip:192.168.0.11:18304>
To: <sip:17xxxxxxxxx@callcentric.com>;tag=50cd5313
From: <sip:17xxxxxxxxx@callcentric.com:5062>
Call-ID: 44394ea86e66f937c8a3650f0b310489-5a83b63c66455064c7cfb3b9daf88915@callcentric.com
CSeq: 1 NOTIFY
User-Agent: X-Lite 4 release 4.1 stamp 63215
Content-Length: 0

**callcentric to mac
SIP/2.0 200 Ok
v: SIP/2.0/UDP 192.168.0.11:18304;branch=z9hG4bK-d8754z-f90c3d6654fc6a32-1---d8754z-;rport=18304;received=118.xx.xx.xx
f: "17xxxxxxxxx" <sip:17xxxxxxxxx@callcentric.com>;tag=1da5972c
t: "17xxxxxxxxx" <sip:17xxxxxxxxx@callcentric.com>
i: ZmYwODgzM2ZjYjFhM2Q5NGY0MmYyNzA0MjJjNzdkNmQ.
CSeq: 2 REGISTER
m: <sip:17xxxxxxxxx@192.168.0.11:18304;rinstance=c589050c263e2343;transport=udp>;expires=60
l: 0