Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an SIP endpoint, which I wrote, that receives sip invites, processes them, replies, and sets up the rtp session just fine when contacted directly.

i.e.

sip:user@[actual ip address of endpoint]

However, if I try and route through the registrar, it never replies. If it does reply, it responds with Bad Request. I have looked at the request and everything is fine, so it isn't malformed (at least when it is sent).

Yet, if the end point in question originates the call, everything works perfect.

I am testing with ekiga, just to take my code out of at least half of the equation.

Here is the request:

INVITE sip:1001@192.168.0.200 SIP/2.0
Date: Mon, 21 May 2012 15:42:26 GMT
CSeq: 1 INVITE
Via: SIP/2.0/UDP 192.168.0.22:5060;branch=z9hG4bK21b00fb7-1707-1910-92f3-0025b360b492;rport
User-Agent: Ekiga/3.2.7
From: "Jonathan" <sip:jonathan@192.168.0.200>;tag=c9ad0fb7-1707-1910-92f1-0025b360b492
Call-ID: c9ad0fb7-1707-1910-92f2-0025b360b492@HOWIE
To: <sip:1001@192.168.0.200>
Contact: <sip:jonathan@192.168.0.22>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING
Content-Type: application/sdp
Content-Length: 566
Max-Forwards: 70

v=0
o=- 1337614946 1 IN IP4 192.168.0.22
s=Opal SIP Session
c=IN IP4 192.168.0.22
t=0 0
m=audio 5084 RTP/AVP 0 8 101
a=sendrecv
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32,36
m=video 5086 RTP/AVP 109 108 34
b=AS:4096
b=TIAS:4096000
a=sendrecv
a=rtpmap:109 h264/90000
a=fmtp:109 packetization-mode=1;profile-level-id=42C01E
a=rtpmap:108 h263-1998/90000
a=fmtp:108 D=1;F=1;I=1;J=1;CIF=1;CIF4=1;QCIF=1;CUSTOM=320,240,1;CUSTOM=640,480,1
a=rtpmap:34 h263/90000
a=fmtp:34 F=1;CIF=1;CIF4=1;QCIF=1

The end point registers just fine as I can see it from the registrar as registered.

Also, the software for the endpoint is working, because I have it running on my desktop as well and everything works as I expect.

also, netstat -lvuwp shows that my application is listening on port 5060 as it should.

update I just noticed that the registrar is not translating the request the final part of the way. I see it receive the request in wireshark, say 192.168.0.22 -> 192.168.0.200 (the registrar's address) but I never see 192.168.0.200 -> 192.168.2.5 (the end point in question) as it does on the other endpoints.

Here is the attempted forward from the registrar to the endpoint

INVITE sip:1001@192.168.2.5;q=1, <sip SIP/2.0
Via: SIP/2.0/UDP 192.168.0.200:5060;branch=z9hG4bK-5bbc7711b807109;rport
Via: SIP/2.0/UDP 192.168.0.22:5060;branch=z9hG4bK5bb8b0c7-1707-1910-9366-0025b360b492;received=192.168.0.22;rport=5060
Date: Mon, 21 May 2012 16:28:56 GMT
CSeq: 1 INVITE
From: "Jonathan" <sip:jonathan@192.168.0.200>;tag=03b6b0c7-1707-1910-9364-0025b360b492
Call-ID: 03b6b0c7-1707-1910-9365-0025b360b492@HOWIE
To: <sip:1001@192.168.0.200>
Contact: <sip:jonathan@192.168.0.22>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING
Max-Forwards: 69
Record-Route: <sip:192.168.0.200;lr>
User-Agent: Ekiga/3.2.7
Content-Type: application/sdp
Content-Length: 566

v=0
o=- 1337617736 1 IN IP4 192.168.0.22
s=Opal SIP Session
c=IN IP4 192.168.0.22
t=0 0
m=audio 5066 RTP/AVP 0 8 101
a=sendrecv
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32,36
m=video 5068 RTP/AVP 109 108 34
b=AS:4096
b=TIAS:4096000
a=sendrecv
a=rtpmap:109 h264/90000
a=fmtp:109 packetization-mode=1;profile-level-id=42C01E
a=rtpmap:108 h263-1998/90000
a=fmtp:108 D=1;F=1;I=1;J=1;CIF=1;CIF4=1;QCIF=1;CUSTOM=320,240,1;CUSTOM=640,480,1
a=rtpmap:34 h263/90000
a=fmtp:34 F=1;CIF=1;CIF4=1;QCIF=1

anyone see the problem? My suspicion is that the problem is with the ;q1, <sip that doesn't look like it belongs.

update

I noticed this line

[Contact] = <sip:vs005@192.168.2.5:5060>;q=1, <sip:vs005@[fe80::230:18ff:feab:100e]:5060>;q=0.500

from the REGISTER for my endpoint the ;q=1, <sip text made me think that the sip server is having trouble parsing ipv6. So, I turned off ipv6 on the endpoint and voila! everything is fine.

share|improve this question
    
Are you (or can you) set up the registration to use a sip proxy vs just a domain setup? –  rnxrx May 21 '12 at 18:32
    
@rnxrx This is really a bit out of my skill set, but do you mean that instead of using just a registrar to do the routing from endpoint to registrar to endpoint, to use a proxy? I don't really know how, and I can't really find any good resources on this subject online. Do you know of any. –  Jonathan Henson May 21 '12 at 18:35
    
@rnxrx I am using tekSIP, I think it is both a registrar and a proxy. –  Jonathan Henson May 21 '12 at 18:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.