[OpenSER-Users] "pua_usrloc": don't replace "offline" status with "online" when REGISTER

Iñaki Baz Castillo ibc at aliax.net
Mon Feb 11 02:40:23 CET 2008


Hi, this issue has been already discused, but not wure if it's supposed to 
work now as expected:

OpenSer svn trunk version. When an UAC send PUBLISH with status "offline" it's 
correctly notified to a X-Lite (it appears as "offline"). But later when 
the "uac" sends a REGISTER forrefreshing purposes, "pua-usrloc" generates a 
NOTIFY that make the user again "online" in X-Lite.

This is the trace:



"uac" sends a PUBLISH "offline":

-----------------------------------------------------------------------------------------------------------------
PUBLISH sip:uac at domain.org SIP/2.0
Via: SIP/2.0/UDP 85.58.0.144:64947;rport;branch=z9hG4bKsowasblj
Max-Forwards: 70
To: "I  ako" <sip:uac at domain.org>
From: "I  ako" <sip:uac at domain.org>;tag=ukotb
Call-ID: wxahiexypsywlfd at 85.58.0.144
CSeq: 454 PUBLISH
Content-Type: application/pidf+xml
Event: presence
Expires: 3600
SIP-If-Match: a.1202691876.19145.8.2
User-Agent: Twinkle/1.1
Content-Length: 197

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" 
entity="sip:uac at domain.org"><tuple 
id="igxiox"><status><basic>closed</basic></status></tuple></presence>



SIP/2.0 200 OK
Via: SIP/2.0/UDP 85.58.0.144:64947;rport=64947;branch=z9hG4bKsowasblj
To: "I  ako" <sip:uac at domain.org>;tag=c90c2e85033c1e1931e01d1f8303e2be.93c0
From: "I  ako" <sip:uac at domain.org>;tag=ukotb
Call-ID: wxahiexypsywlfd at 85.58.0.144
CSeq: 454 PUBLISH
Expires: 2390
SIP-ETag: a.1202691876.19144.13.3
Server: OpenSER (1.4.0dev4-tls (i386/linux))
Content-Length: 0
-----------------------------------------------------------------------------------------------------------------

Note that it has created a tuple with id="igxiox" containing "offline" status.



"presence" module sends a NOTIFY to X-Lite 

-----------------------------------------------------------------------------------------------------------------
NOTIFY sip:xlite at 85.58.0.144:64705;transport=TCP SIP/2.0
Via: SIP/2.0/TCP OPENSER;branch=z9hG4bK0ba1.96adda2.0
To: sip:xlite at domain.org;tag=841ea920
From: sip:uac at domain.org;tag=10.19158.1202692716.19
CSeq: 4 NOTIFY
Call-ID: NmU4Y2EwMTY1ODQzOTE0MDJhODUzM2JkYTM1NTBmMzQ.
Content-Length: 323
User-Agent: OpenSER (1.4.0dev4-tls (i386/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:OPENSER>
Subscription-State: active;expires=2371
Content-Type: application/pidf+xml

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" 
entity="sip:uac at domain.org"><tuple 
id="igxiox"><status><basic>closed</basic></status></tuple>
  <tuple xmlns="urn:ietf:params:xml:ns:pidf" id="0x81b3aa8">
    <status>
      <basic>open</basic>
    </status>
  </tuple>
</presence>


SIP/2.0 200 OK
Via: SIP/2.0/TCP OPENSER;branch=z9hG4bK0ba1.96adda2.0
Contact: <sip:xlite at 10.0.2.15:59680;transport=TCP>
To: <sip:xlite at domain.org>;tag=841ea920
From: <sip:uac at domain.org>;tag=10.19158.1202692716.19
Call-ID: NmU4Y2EwMTY1ODQzOTE0MDJhODUzM2JkYTM1NTBmMzQ.
CSeq: 4 NOTIFY
User-Agent: X-Lite release 1011s stamp 41150
Content-Length: 0
-----------------------------------------------------------------------------------------------------------------

Note: I'd like to know why there apper two tupples, one "online" and other 
one "offline". After the test I empiet activce_watcher and watchers table and 
restarted openser. No other UAC's registered as "uac" user. ¿?





Some time after, "uac" sends a REGISTER. After it, "pua_usrloc" generates this 
PUBLISH:

-----------------------------------------------------------------------------------------------------------------
PUBLISH sip:uac at domain.org SIP/2.0
Via: SIP/2.0/UDP OPENSER;branch=z9hG4bKcfa7.6a5c90f.0
To: sip:uac at domain.org
From: sip:uac at domain.org;tag=8e8dc05fff8d3172da4bb428a9d4a223-793a
CSeq: 10 PUBLISH
Call-ID: 7bfbdf3d-19145 at OPENSER
Content-Length: 341
User-Agent: OpenSER (1.4.0dev4-tls (i386/linux))
Max-Forwards: 70
Event: presence
Expires: 1201
Content-Type: application/pidf+xml

<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" 
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" 
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" 
xmlns:c="urn:ietf:params:xml:ns:pidf:cipid" entity="uac at domain.org">
  <tuple id="0x81b36d8">
    <status>
      <basic>open</basic>
    </status>
  </tuple>
</presence>
-----------------------------------------------------------------------------------------------------------------




"presence" module generates the the NOTIFY:

-----------------------------------------------------------------------------------------------------------------
NOTIFY sip:xlite at 85.58.0.144:64705;transport=TCP SIP/2.0
Via: SIP/2.0/TCP OPENSER;branch=z9hG4bK1ba1.9366d7e6.0
To: sip:xlite at domain.org;tag=841ea920
From: sip:uac at domain.org;tag=10.19158.1202692716.19
CSeq: 5 NOTIFY
Call-ID: NmU4Y2EwMTY1ODQzOTE0MDJhODUzM2JkYTM1NTBmMzQ.
Content-Length: 568
User-Agent: OpenSER (1.4.0dev4-tls (i386/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:OPENSER>
Subscription-State: active;expires=2364
Content-Type: application/pidf+xml

<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" 
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" 
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" 
xmlns:c="urn:ietf:params:xml:ns:pidf:cipid" entity="uac at domain.org">
  <tuple id="0x81b36d8">
    <status>
      <basic>open</basic>
    </status>
  </tuple>
<tuple xmlns="urn:ietf:params:xml:ns:pidf" 
id="igxiox"><status><basic>closed</basic></status></tuple>
  <tuple xmlns="urn:ietf:params:xml:ns:pidf" id="0x81b3aa8">
    <status>
      <basic>open</basic>
    </status>
  </tuple>
</presence>
-----------------------------------------------------------------------------------------------------------------

Basically, the tupple with id="igxiox" (the one with "offline" status) is not 
the first one so X-Lite sees "uac" again online.


Is there anything I'm doing wrong? "uac" (Twinkle) issue? X-Lite issue?
Or is it just impossible thist to work properly since "pua_usrloc" behaviour?


Thanks for any explanation.


-- 
Iñaki Baz Castillo




More information about the Users mailing list