Comments inline.
On 04-05 17:14, Luis Vazquez wrote:
I'm trying to register and call a SIP phone from behind NAT. I get it to register correctly (with the Contact field fixed) but when I try to call it, the lookup("location") fails and I get a
The ngrep SIP log for the register sequence is: U 200.59.203.75:61503 -> 200.59.203.76:5060 REGISTER sip:200.59.203.76 SIP/2.0..Via: SIP/2.0/UDP 192.168.10.188:5062;branch=z9hG4bK975f3a4817e63645 ..From: "Grandstream 1" sip:gstream1@200.59.203.76;tag=f001e96a008a26a5..To: <sip:gstream1@200.59.203 .76>..Contact: sip:gstream1@192.168.10.188:5062..Call-ID: 0776eb9b4143e102@192.168.10.188..CSeq: 102 REGISTER..Expires: 3600..User-Agent: Grandstream BT100 1.0.4.55..Max-Forwards: 70..Allow: INVITE,ACK,CA NCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE..Content-Length: 0.... # U 200.59.203.76:5060 -> 200.59.203.75:61503 SIP/2.0 200 OK..Via: SIP/2.0/UDP 192.168.10.188:5062;branch=z9hG4bK975f3a4817e63645;rport=61503;receive d=200.59.203.75..From: "Grandstream 1" sip:gstream1@200.59.203.76;tag=f001e96a008a26a5..To: <sip:gstr eam1@200.59.203.76>;tag=b27e1a1d33761e85846fc98f5f3a7e58.ce3d..Call-ID: 0776eb9b4143e102@192.168.10.188 ..CSeq: 102 REGISTER..Contact: <sip:gstream1@200.59.203.75:61503<>;q=0;expires=3600..Server: Sip EXpres s router (0.8.13-dev-28 (i386/linux))..Content-Length: 0....
Everything seems Ok, but here begins the problems.
The contact is malformed -- this bug has already been fixed by Bogdan.
If I go to the command line and type: # serctl ul show gstream1 I get: 404 Username gstream1@ipcontact.com.uy in table location not found
But if I type: # serctl ul show Among many other lines I get: ..... ...Record(0x402f46e0)... domain: 'location' aor : 'gstream1@200.59.203.76'
domain : 'location' aor : 'gstream1@200.59.203.76' Contact: 'sip:gstream1@200.59.203.75:61503' Expires: 3083 q : 0 Call-ID: '0776eb9b4143e102@192.168.10.188' CSeq : 102 replic : 0 State : CS_SYNC Flags : 1 next : (nil) prev : (nil) ~~~/Contact~~~~ .../Record... ............. It seems to my like ser is not matching the domain part properly.
Yes, unstable branch is work in progress, 200.59.203.76 means a different domain to ser than ipcontact.com.uy. This is not correct and causes troubles sometimes. A quick solution is to use hostname in the domain part.
On the other side, the record in the mysql location table is:
username | domain | contact | expires | q | .... gstream1@200.59.203.76 | | sip:gstream1@200.59.203.75:61503 | 2004-05-04 17:20:32 | -1082130.38|...
As you see 'domain' field is empty. Could be this the problem?
That's because use_domain parameters are set to 0, set it to 1.
Anyway If I register from Kphone (user luis) running in the same machine as SER, 'domain' is empty again luis@ipcontact.com.uy | |sip:luis@200.59.203.76:5062;transport=udp|2004-05-04 16:57:46|1148846.12|... and # serctl url show luis fails too, however I'am able to call this user "luis@ipcontact.com.uy" but not "gstream1@ipcontact.com.uy". The problem here seems to be gstream1 is registered using the ser server's IP number and not the domain "ipcontact.com.uy", but shouldn't be this handled automagicaly by SER.
Yes, it should, it's work in progress.
Jan.