how to wait that un-publish is complete?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i noticed that when account is deleted, pjsip waits until
un-registration is complete, i.e., until 200 ok is received to REGISTER
with Expires: 0, but it DOES NOT wait until un-publish is complete,
i.e., until 200 ok is received ro PUBLISH with Expires: 0.

i then started to look if there exists an AccountCallback
on_publish_state, similar to on_reg_state, but didn't find any.  if such
a callback would be available, i could wait until state of un-publish
changes to 200 ok.

given that on_publist_state does not exist, how can i implement
cracefull deletion of account that also takes care of un-publish?

-- juha

 17:58:55.920   pjsua_core.c  TX 446 bytes Request msg REGISTER/cseq=12914 (tdta0x83d9008) to UDP 192.98.101.10:5060:
REGISTER sip:test.fi SIP/2.0
Via: SIP/2.0/UDP 87.95.64.235:5020;rport;branch=z9hG4bKPj746ee4a6-dc21-49be-9904-75bb91948b9b
Route: <sip:sip.test.fi;lr>
Max-Forwards: 70
From: <sip:test@xxxxxxx>;tag=3d84ede1-47fb-4e4b-bc19-9a93fe8bd303
To: <sip:test at test.fi>
Call-ID: 1bbcd471-64cc-4f3b-bb35-cd4636257b3f
CSeq: 12914 REGISTER
User-Agent: pjsip python
Contact: <sip:test at 192.98.101.10:5020;transport=UDP>
Expires: 0
Content-Length:  0


--end msg--
 17:58:55.920    pjsua_acc.c  Unregistration sent
 17:58:55.920   pjsua_core.c  TX 450 bytes Request msg PUBLISH/cseq=25370 (tdta0x83dbfc0) to UDP 192.98.101.10:5060:
PUBLISH sip:test at test.fi SIP/2.0
Via: SIP/2.0/UDP 87.95.64.235:5020;rport;branch=z9hG4bKPj2b32bde6-8cb6-488e-b4be-4edb7318c3f8
Route: <sip:sip.test.fi;lr>
Max-Forwards: 70
From: <sip:test@xxxxxxx>;tag=f64bc215-cacd-4b75-a1c4-3009dc97aa9c
To: <sip:test at test.fi>
Call-ID: 2d3d5cd6-d7cb-4ad2-ba5b-d2b06b5b01a0
CSeq: 25370 PUBLISH
Event: presence
SIP-If-Match: a.1239630604.15691.7.0
Expires: 0
User-Agent: pjsip python
Content-Length:  0


--end msg--
 17:58:55.921    pjsua_acc.c  Account id 0 deleted
 17:58:55.921   pjsua_core.c  RX 534 bytes Response msg 401/REGISTER/cseq=12914 (rdata0x83c7c3c) from UDP 192.98.101.10:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 87.95.64.235:5020;rport=5020;branch=z9hG4bKPj746ee4a6-dc21-49be-9904-75bb91948b9b;received=192.98.101.10
From: <sip:test@xxxxxxx>;tag=3d84ede1-47fb-4e4b-bc19-9a93fe8bd303
To: <sip:test at test.fi>;tag=f4da76a2b06776614336233acf69fc96.f1ca
Call-ID: 1bbcd471-64cc-4f3b-bb35-cd4636257b3f
CSeq: 12914 REGISTER
WWW-Authenticate: Digest realm="test.fi", nonce="49e3534d0000002ebbf810c633090764eb5783f1f93d47db", qop="auth"
Server: OpenXg Kamailio (1.5.0-tls (i386/linux))
Content-Length: 0


--end msg--
 17:58:55.921   pjsua_core.c  TX 694 bytes Request msg REGISTER/cseq=12915 (tdta0x83d9008) to UDP 192.98.101.10:5060:
REGISTER sip:test.fi SIP/2.0
Via: SIP/2.0/UDP 87.95.64.235:5020;rport;branch=z9hG4bKPja334e2d9-3970-403d-8be2-5d9e8f101b20
Route: <sip:sip.test.fi;lr>
Max-Forwards: 70
From: <sip:test@xxxxxxx>;tag=3d84ede1-47fb-4e4b-bc19-9a93fe8bd303
To: <sip:test at test.fi>
Call-ID: 1bbcd471-64cc-4f3b-bb35-cd4636257b3f
CSeq: 12915 REGISTER
User-Agent: pjsip python
Contact: <sip:test at 192.98.101.10:5020;transport=UDP>
Expires: 0
Authorization: Digest username="test", realm="test.fi", nonce="49e3534d0000002ebbf810c633090764eb5783f1f93d47db", uri="sip:test.fi", response="4f829def5cb8fa253e2f3d4a6bb74632", cnonce="23fc4b34-23e9-4baf-952d-03015eca1f31", qop=auth, nc=00000001
Content-Length:  0


--end msg--
 17:58:55.921   pjsua_core.c  RX 552 bytes Response msg 407/PUBLISH/cseq=25370 (rdata0x83c7c3c) from UDP 192.98.101.10:5060:
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 87.95.64.235:5020;rport=5020;branch=z9hG4bKPj2b32bde6-8cb6-488e-b4be-4edb7318c3f8;received=192.98.101.10
From: <sip:test@xxxxxxx>;tag=f64bc215-cacd-4b75-a1c4-3009dc97aa9c
To: <sip:test at test.fi>;tag=f4da76a2b06776614336233acf69fc96.6d90
Call-ID: 2d3d5cd6-d7cb-4ad2-ba5b-d2b06b5b01a0
CSeq: 25370 PUBLISH
Proxy-Authenticate: Digest realm="test.fi", nonce="49e3534d0000002f905375333f6bd89b8f9687939927cda1", qop="auth"
Server: OpenXg Kamailio (1.5.0-tls (i386/linux))
Content-Length: 0


--end msg--
 17:58:56.197       pa_dev.c  PortAudio sound library shutting down..
 17:58:56.198   pjsua_core.c  Shutting down...
 17:58:56.198   pjsua_core.c  RX 604 bytes Response msg 200/REGISTER/cseq=12915 (rdata0x83c7c3c) from UDP 192.98.101.10:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 87.95.64.235:5020;rport=5020;branch=z9hG4bKPja334e2d9-3970-403d-8be2-5d9e8f101b20;received=192.98.101.10
From: <sip:test@xxxxxxx>;tag=3d84ede1-47fb-4e4b-bc19-9a93fe8bd303
To: <sip:test at test.fi>;tag=f4da76a2b06776614336233acf69fc96.fa45
Call-ID: 1bbcd471-64cc-4f3b-bb35-cd4636257b3f
CSeq: 12915 REGISTER
Contact: <sip:jh at 192.98.102.10:5555;transport=tcp>;q=0.699;expires=3055332561, <sip:jh at foo.bar>;q=0.599;expires=3055332561, <sip:jh at 192.98.101.10:5555;transport=tcp>;q=0.4;expires=3055332561
Server: OpenXg Kamailio (1.5.0-tls (i386/linux))
Content-Length: 0


--end msg--
 17:58:57.203   pjsua_core.c  Destroying...
...



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux