[Serusers] pa and some things I've noticed, using ser 0.9.0

Conny Holzhey yivi at holzhey.de
Fri Feb 11 20:24:37 CET 2005


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 at 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 at 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 at 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 at 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 at 192.168.123.2:5059 SIP/2.0
Via: SIP/2.0/TCP garbo;branch=z9hG4bK34711108142204 at garbo
To: <sip:user at 192.168.123.2:5059>
From: <sip:conny at 192.168.123.2>;tag=1108142204
Call-ID: 0.234398746471019 at garbo
CSeq: 2 SUBSCRIBE
Max-Forwards: 70
User-Agent: pua.pl 1.0.0
Event: presence
Accept: application/pidf+xml
Contact:  <sip:conny at 192.168.123.2>
Expires: 60
Content-Length: 0

------- ser -> client  ----------------------
NOTIFY sip:conny at 192.168.123.2 SIP/2.0
Via: SIP/2.0/UDP 192.168.123.2:5059;branch=z9hG4bKc2d7.f09c7145.0
To: <sip:conny at 192.168.123.2>;tag=1108142204
From: 
<sip:user at 192.168.123.2:5059>;tag=a6f1fa7237095ed7e0e9310f6f58d8bc-9fbd
CSeq: 1 NOTIFY
Call-ID: 0.234398746471019 at 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 at 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.




More information about the sr-users mailing list