Hi all,
I'm running ser on a port diffrent from 5060, and I found some confusing behaviour when dealing with presence. I've set the port in the ser.cfg file to 5059.
When sending a PUBLISH message, it seems that I have to specify the port number in the message start-line, i.e. the message starts with PUBLISH sip:conny@192.168.123.2:5059 SIP/2.0, and then ser answers with 200 ok. If I skip the port number, I get a 408, Request Timeout. Is there some configuration I'm missing that would fix this? Or is this the correct behaviour? Actually I don't think that there should be a port number in the PUBLISH, as this is mixing my (client) Request-URI with the server port number. But I'm not sure, because so far I've tested my client only on the same machine than the server, and this is sometimes a bit confusing....
Same thing seems to be with REGISTER, and SUBSCRIBE, i.e. sending SUBSCRIBE sip:user@192.168.123.2:5059 SIP/2.0 works for some reason.
When I get a NOTIFY from ser, there is a minor issue with the pidf document, the tuple start tag looks like <tuple id="9r28r49">ser">
When sending a subscribe with a header Expires: 0, ser seemingly doesn't send a NOTIFY. This makes sense, as this is used to indicate that the client wants to un-subscribe. On the other hand RFC 3856 says:
The subscriber can terminate the subscription by sending a SUBSCRIBE, within the dialog, with an Expires header field (which indicates duration of the subscription) value of zero. This causes an immediate termination of the subscription. A NOTIFY request is then generated by the presence agent with the most recent state.
Is there somewhere a public server running ser/pa that I could use for testing my command-line PUA?
Regards, Conny
Conny Holzhey wrote:
Hi all,
I'm running ser on a port diffrent from 5060, and I found some confusing behaviour when dealing with presence. I've set the port in the ser.cfg file to 5059.
When sending a PUBLISH message, it seems that I have to specify the port number in the message start-line, i.e. the message starts with PUBLISH sip:conny@192.168.123.2:5059 SIP/2.0, and then ser answers with 200 ok. If I skip the port number, I get a 408, Request Timeout. Is there some configuration I'm missing that would fix this? Or is this the correct behaviour? Actually I don't think that there should be a port number in the PUBLISH, as this is mixing my (client) Request-URI with the server port number. But I'm not sure, because so far I've tested my client only on the same machine than the server, and this is sometimes a bit confusing....
Same thing seems to be with REGISTER, and SUBSCRIBE, i.e. sending SUBSCRIBE sip:user@192.168.123.2:5059 SIP/2.0 works for some reason.
Well, at least they are all consistent. Please take a look at the Via headers to see if there port is being specified there. My understanding is that the response should go to the URI in the first Via. Is that not the behavior you are seeing?
When I get a NOTIFY from ser, there is a minor issue with the pidf document, the tuple start tag looks like <tuple id="9r28r49">ser">
I'll take a look at this, but please send me an sample of the complete PUBLISH and NOTIFY messages.
When sending a subscribe with a header Expires: 0, ser seemingly doesn't send a NOTIFY. This makes sense, as this is used to indicate that the client wants to un-subscribe. On the other hand RFC 3856 says:
The subscriber can terminate the subscription by sending a SUBSCRIBE, within the dialog, with an Expires header field (which indicates duration of the subscription) value of zero. This causes an immediate termination of the subscription. A NOTIFY request is then generated by the presence agent with the most recent state.
I think I know why this is going wrong. I'll add it to my list of things to do on the PA. I've just been working on some issues with it.
Is there somewhere a public server running ser/pa that I could use for testing my command-line PUA?
I will set up a test account for you on one that I'm running.
Jamey
Hi Jamey
Jamey Hicks wrote:
Conny Holzhey wrote:
Hi all,
I'm running ser on a port diffrent from 5060, and I found some confusing behaviour when dealing with presence. I've set the port in the ser.cfg file to 5059.
When sending a PUBLISH message, it seems that I have to specify the port number in the message start-line, i.e. the message starts with PUBLISH sip:conny@192.168.123.2:5059 SIP/2.0, and then ser answers with 200 ok. If I skip the port number, I get a 408, Request Timeout. Is there some configuration I'm missing that would fix this? Or is this the correct behaviour? Actually I don't think that there should be a port number in the PUBLISH, as this is mixing my (client) Request-URI with the server port number. But I'm not sure, because so far I've tested my client only on the same machine than the server, and this is sometimes a bit confusing....
Same thing seems to be with REGISTER, and SUBSCRIBE, i.e. sending SUBSCRIBE sip:user@192.168.123.2:5059 SIP/2.0 works for some reason.
Well, at least they are all consistent. Please take a look at the Via headers to see if there port is being specified there. My understanding is that the response should go to the URI in the first Via. Is that not the behavior you are seeing?
Yes, that's ok, ser sends the response correctly to the client. The problem is that the pa doesn't feel responsible for the PUBLISH, and I think I'm getting something terribly wrong here .... So may I try to explain again
The server is configured to listen on port 5059. The client sends a "PUBLISH sip:conny@192.168.123.2 SIP/2.0", and in the debug output of the server, I see the following:
11(3526) grep_sock_info - checking if host==us: 13==9 && [192.168.123.2] == [127.0.0.1] 11(3526) grep_sock_info - checking if port 5059 matches port 5060 11(3526) grep_sock_info - checking if host==us: 13==13 && [192.168.123.2] == [192.168.123.2] 11(3526) grep_sock_info - checking if port 5059 matches port 5060 11(3526) grep_sock_info - checking if host==us: 13==9 && [192.168.123.2] == [127.0.0.1] 11(3526) grep_sock_info - checking if port 5059 matches port 5060 11(3526) grep_sock_info - checking if host==us: 13==13 && [192.168.123.2] == [192.168.123.2] 11(3526) grep_sock_info - checking if port 5059 matches port 5060 11(3526) check_self: host != me
and then later the client receives a 408.
So obivously the port doesn't match. Then I tried to be clever and did a bit reverse-engineering and found out that the port is taken from the request-URI, and when I change my message to "PUBLISH sip:conny@192.168.123.2:5059 SIP/2.0" it works perfectly and I get a ok. But adding that port is quite likely the wrong way. Is there anything else to consider when running ser on a different port?
When I get a NOTIFY from ser, there is a minor issue with the pidf document, the tuple start tag looks like <tuple id="9r28r49">ser">
I'll take a look at this, but please send me an sample of the complete PUBLISH and NOTIFY messages.
Here are the complete messages ------- client -> ser ------------------- SUBSCRIBE sip:user@192.168.123.2:5059 SIP/2.0 Via: SIP/2.0/TCP garbo;branch=z9hG4bK34711108142204@garbo To: sip:user@192.168.123.2:5059 From: sip:conny@192.168.123.2;tag=1108142204 Call-ID: 0.234398746471019@garbo CSeq: 2 SUBSCRIBE Max-Forwards: 70 User-Agent: pua.pl 1.0.0 Event: presence Accept: application/pidf+xml Contact: sip:conny@192.168.123.2 Expires: 60 Content-Length: 0
------- ser -> client ---------------------- NOTIFY sip:conny@192.168.123.2 SIP/2.0 Via: SIP/2.0/UDP 192.168.123.2:5059;branch=z9hG4bKc2d7.f09c7145.0 To: sip:conny@192.168.123.2;tag=1108142204 From: sip:user@192.168.123.2:5059;tag=a6f1fa7237095ed7e0e9310f6f58d8bc-9fbd CSeq: 1 NOTIFY Call-ID: 0.234398746471019@garbo Content-Length: 243 User-Agent: Sip EXpress router(0.9.0 (i386/linux)) Event: presence Content-Type: application/pidf+xml Subscription-State: active;expires=58
<?xml version="1.0"?> <!DOCTYPE presence PUBLIC "//IETF//DTD RFCxxxx PIDF 1.0//EN" "pidf.dtd"> <presence entity="sip:user@192.168.123.2"> <tuple id="9r28r49">ser"> <status> <basic>closed</basic> </status> </tuple> </presence>
Is there somewhere a public server running ser/pa that I could use for testing my command-line PUA?
I will set up a test account for you on one that I'm running.
That would be brilliant - thank you!
Regards, Conny -- I'm looking for a job! Specially in telecommunication software development, testing, design, management ... preferably contract, in germany or somewhere nice. Anyone able to help, please contact me via http://holzhey.de, thanks.