[asterisk-bugs] [JIRA] (ASTERISK-27685) PJSIP outbound-publish, ETag and Event: dialog

Cyrille Demaret (JIRA) noreply at issues.asterisk.org
Mon Mar 12 05:40:13 CDT 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=242514#comment-242514 ] 

Cyrille Demaret commented on ASTERISK-27685:
--------------------------------------------

I hope that's what you need.

asterisk1*CLI> devstate change Custom:switch1 NOT_INUSE
Changing switch1 to NOT_INUSE
asterisk1*CLI> devstate change Custom:switch1 INUSE    
Changing switch1 to INUSE
asterisk1*CLI> devstate change Custom:switch1 NOT_INUSE
Changing switch1 to NOT_INUSE

Asterisk logs:

[Mar 12 11:30:17] DEBUG[15411][C-0000000f] res_rtp_asterisk.c: Got RTCP report of 84 bytes from 123.123.123.123:28359
[Mar 12 11:30:17] DEBUG[17734] res_pjsip/pjsip_resolver.c: Performing SIP DNS resolution of target '192.168.102.10'
[Mar 12 11:30:17] DEBUG[17734] res_pjsip/pjsip_resolver.c: Transport type for target '192.168.102.10' is 'UDP'
[Mar 12 11:30:17] DEBUG[17734] res_pjsip/pjsip_resolver.c: Target '192.168.102.10' is an IP address, skipping resolution
[Mar 12 11:30:17] DEBUG[8886] res_pjsip/pjsip_distributor.c: No dialog serializer for Response msg 412/PUBLISH/cseq=41981 (rdata0x56242db600a8).  Using request transaction as basis.
[Mar 12 11:30:17] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found transaction tsx0x7f2d8c00bfc8 for Response msg 412/PUBLISH/cseq=41981 (rdata0x56242db600a8).
[Mar 12 11:30:17] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found serializer pjsip/outpub/pub-user-00000059 on transaction tsx0x7f2d8c00bfc8
[Mar 12 11:30:17] DEBUG[17734] res_pjsip/pjsip_resolver.c: Performing SIP DNS resolution of target '192.168.102.10'
[Mar 12 11:30:17] DEBUG[17734] res_pjsip/pjsip_resolver.c: Transport type for target '192.168.102.10' is 'UDP'
[Mar 12 11:30:17] DEBUG[17734] res_pjsip/pjsip_resolver.c: Target '192.168.102.10' is an IP address, skipping resolution
[Mar 12 11:30:17] DEBUG[8886] res_pjsip/pjsip_distributor.c: No dialog serializer for Response msg 200/PUBLISH/cseq=50785 (rdata0x56242db600a8).  Using request transaction as basis.
[Mar 12 11:30:17] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found transaction tsx0x7f2d8c00f528 for Response msg 200/PUBLISH/cseq=50785 (rdata0x56242db600a8).
[Mar 12 11:30:17] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found serializer pjsip/outpub/pub-user-00000059 on transaction tsx0x7f2d8c00f528
[Mar 12 11:30:23] DEBUG[15411][C-0000000f] res_rtp_asterisk.c: Got RTCP report of 84 bytes from 123.123.123.123:28359
[Mar 12 11:30:26] DEBUG[8905] res_pjsip_registrar_expire.c: Expiring 0 contacts
[Mar 12 11:30:28] DEBUG[15411][C-0000000f] res_rtp_asterisk.c: Got RTCP report of 84 bytes from 123.123.123.123:28359
[Mar 12 11:30:31] DEBUG[17734] res_pjsip/pjsip_resolver.c: Performing SIP DNS resolution of target '192.168.102.10'
[Mar 12 11:30:31] DEBUG[17734] res_pjsip/pjsip_resolver.c: Transport type for target '192.168.102.10' is 'UDP'
[Mar 12 11:30:31] DEBUG[17734] res_pjsip/pjsip_resolver.c: Target '192.168.102.10' is an IP address, skipping resolution
[Mar 12 11:30:31] DEBUG[8886] res_pjsip/pjsip_distributor.c: No dialog serializer for Response msg 200/PUBLISH/cseq=50786 (rdata0x56242db600a8).  Using request transaction as basis.
[Mar 12 11:30:31] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found transaction tsx0x7f2d8c00f528 for Response msg 200/PUBLISH/cseq=50786 (rdata0x56242db600a8).
[Mar 12 11:30:31] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found serializer pjsip/outpub/pub-user-00000059 on transaction tsx0x7f2d8c00f528
[Mar 12 11:30:34] DEBUG[15411][C-0000000f] res_rtp_asterisk.c: Got RTCP report of 84 bytes from 123.123.123.123:28359
[Mar 12 11:30:36] DEBUG[17738] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 12 11:30:36] DEBUG[17737] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 12 11:30:36] DEBUG[17736] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 12 11:30:36] DEBUG[8884] threadpool.c: Destroying worker thread 6727
[Mar 12 11:30:36] DEBUG[8884] threadpool.c: Destroying worker thread 6726
[Mar 12 11:30:36] DEBUG[8884] threadpool.c: Destroying worker thread 6725
[Mar 12 11:30:39] DEBUG[15411][C-0000000f] res_rtp_asterisk.c: Got RTCP report of 84 bytes from 123.123.123.123:28359
[Mar 12 11:30:40] DEBUG[17734] res_pjsip/pjsip_resolver.c: Performing SIP DNS resolution of target '192.168.102.10'
[Mar 12 11:30:40] DEBUG[17734] res_pjsip/pjsip_resolver.c: Transport type for target '192.168.102.10' is 'UDP'
[Mar 12 11:30:40] DEBUG[17734] res_pjsip/pjsip_resolver.c: Target '192.168.102.10' is an IP address, skipping resolution
[Mar 12 11:30:40] DEBUG[8886] res_pjsip/pjsip_distributor.c: No dialog serializer for Response msg 412/PUBLISH/cseq=50787 (rdata0x56242db600a8).  Using request transaction as basis.
[Mar 12 11:30:40] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found transaction tsx0x7f2d8c00f528 for Response msg 412/PUBLISH/cseq=50787 (rdata0x56242db600a8).
[Mar 12 11:30:40] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found serializer pjsip/outpub/pub-user-00000059 on transaction tsx0x7f2d8c00f528
[Mar 12 11:30:40] DEBUG[17734] res_pjsip/pjsip_resolver.c: Performing SIP DNS resolution of target '192.168.102.10'
[Mar 12 11:30:40] DEBUG[17734] res_pjsip/pjsip_resolver.c: Transport type for target '192.168.102.10' is 'UDP'
[Mar 12 11:30:40] DEBUG[17734] res_pjsip/pjsip_resolver.c: Target '192.168.102.10' is an IP address, skipping resolution
[Mar 12 11:30:40] DEBUG[8886] res_pjsip/pjsip_distributor.c: No dialog serializer for Response msg 200/PUBLISH/cseq=7559 (rdata0x56242db600a8).  Using request transaction as basis.
[Mar 12 11:30:40] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found transaction tsx0x7f2d8c00bfc8 for Response msg 200/PUBLISH/cseq=7559 (rdata0x56242db600a8).
[Mar 12 11:30:40] DEBUG[8886] res_pjsip/pjsip_distributor.c: Found serializer pjsip/outpub/pub-user-00000059 on transaction tsx0x7f2d8c00bfc8

SIP dialog:

2018/03/12 11:30:17.739282 192.168.102.20:5060 -> 192.168.102.10:5060
PUBLISH sip:state-switch1 at 192.168.102.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.102.20:5060;rport;branch=z9hG4bKPj5d6b4f39-6715-4888-939f-76b885fe68c8
From: <sip:state-switch1 at 192.168.102.20>;tag=4e634b3e-ea15-4f5c-b571-d661a3be8d3d
To: <sip:state-switch1 at 192.168.102.20>
Call-ID: dd90e84a-2de5-418e-ba8f-0d6ac2f26c1a
CSeq: 50785 PUBLISH
Event: dialog
Expires: 180
Max-Forwards: 70
User-Agent: Asterisk PBX 15.2.2
Content-Type: application/dialog-info+xml
Content-Length:   247

<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="28" state="full" entity="sip:state-switch1 at 192.168.102.20">
 <dialog id="state-switch1">
  <state>terminated</state>
 </dialog>
</dialog-info>

2018/03/12 11:30:17.742997 192.168.102.10:5060 -> 192.168.102.20:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.102.20:5060;rport=5060;branch=z9hG4bKPj5d6b4f39-6715-4888-939f-76b885fe68c8;received=192.168.102.20
From: <sip:state-switch1 at mydomain.com>;tag=4e634b3e-ea15-4f5c-b571-d661a3be8d3d
To: <sip:state-switch1 at 192.168.102.20>;tag=b596189c6de9c38f624fd84638f43be6-fccc
Call-ID: dd90e84a-2de5-418e-ba8f-0d6ac2f26c1a
CSeq: 50785 PUBLISH
Expires: 170
SIP-ETag: a.1519772408.5797.865.0
Content-Length: 0

2018/03/12 11:30:31.340436 192.168.102.20:5060 -> 192.168.102.10:5060
PUBLISH sip:state-switch1 at 192.168.102.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.102.20:5060;rport;branch=z9hG4bKPj1efb7b4b-01a6-4e27-9154-1d1cec7ea09f
From: <sip:state-switch1 at 192.168.102.20>;tag=ba1a3050-2368-45cd-bdf2-e834450c8c80
To: <sip:state-switch1 at 192.168.102.20>
Call-ID: dd90e84a-2de5-418e-ba8f-0d6ac2f26c1a
CSeq: 50786 PUBLISH
Event: dialog
SIP-If-Match: a.1519772408.5797.865.0
Expires: 180
Max-Forwards: 70
User-Agent: Asterisk PBX 15.2.2
Content-Type: application/dialog-info+xml
Content-Length:   246

<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="29" state="full" entity="sip:state-switch1 at 192.168.102.20">
 <dialog id="state-switch1">
  <state>confirmed</state>
 </dialog>
</dialog-info>

2018/03/12 11:30:31.343494 192.168.102.10:5060 -> 192.168.102.20:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.102.20:5060;rport=5060;branch=z9hG4bKPj1efb7b4b-01a6-4e27-9154-1d1cec7ea09f;received=192.168.102.20
From: <sip:state-switch1 at mydomain.com>;tag=ba1a3050-2368-45cd-bdf2-e834450c8c80
To: <sip:state-switch1 at 192.168.102.20>;tag=b596189c6de9c38f624fd84638f43be6-8077
Call-ID: dd90e84a-2de5-418e-ba8f-0d6ac2f26c1a
CSeq: 50786 PUBLISH
Expires: 170
SIP-ETag: a.1519772408.5794.871.1
Content-Length: 0

2018/03/12 11:30:40.648149 192.168.102.20:5060 -> 192.168.102.10:5060
PUBLISH sip:state-switch1 at 192.168.102.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.102.20:5060;rport;branch=z9hG4bKPj43468bc3-2b8c-4cfe-8b2e-c42ebb4711a0
From: <sip:state-switch1 at 192.168.102.20>;tag=f1883656-ea96-41a9-920e-43dad991b890
To: <sip:state-switch1 at 192.168.102.20>
Call-ID: dd90e84a-2de5-418e-ba8f-0d6ac2f26c1a
CSeq: 50787 PUBLISH
Event: dialog
SIP-If-Match: a.1519772408.5794.871.1
Expires: 180
Max-Forwards: 70
User-Agent: Asterisk PBX 15.2.2
Content-Type: application/dialog-info+xml
Content-Length:   247

<?xml version="1.0" encoding="UTF-8"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="30" state="full" entity="sip:state-switch1 at 192.168.102.20">
 <dialog id="state-switch1">
  <state>terminated</state>
 </dialog>
</dialog-info>

> PJSIP outbound-publish, ETag and Event: dialog
> ----------------------------------------------
>
>                 Key: ASTERISK-27685
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27685
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: pjproject/pjsip
>    Affects Versions: 15.2.1
>            Reporter: Cyrille Demaret
>              Labels: pjsip
>
> Asterisk is sending a PUBLISH with a "early" state with a SIP-If-Match for an already terminated dialog. According to the RFC 4235, this shouldn't happens.
> Asterisk send :
> PUBLISH sip:201 at 192.168.100.37 SIP/2.0
> Via: SIP/2.0/UDP 192.168.100.37:5080;rport;branch=z9hG4bKPj1794e605-4e31-4b85-a5c8-6e2d6b04896c
> From: <sip:201 at mydomain.com>;tag=5d7d5883-8dbe-4039-a58a-e6a7f97211a9
> To: <sip:201 at mydomain.com>
> Call-ID: 23b4c0df-ccf6-4325-912a-7396a0d169a4
> CSeq: 39221 PUBLISH
> Event: dialog
> Expires: 180
> Max-Forwards: 70
> User-Agent: Asterisk PBX 15.2.1
> Content-Type: application/dialog-info+xml
> Content-Length:   247
> <?xml version="1.0" encoding="UTF-8"?>
> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="15" state="full" entity="sip:201 at mydomain.com">
>  <dialog id="201" direction="recipient">
>   <state>early</state>
>  </dialog>
> </dialog-info>
> The presence server replies :
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 192.168.100.37:5080;rport=5080;branch=z9hG4bKPj1794e605-4e31-4b85-a5c8-6e2d6b04896c;received=192.168.100.37
> From: <sip:201 at mydomain.com>;tag=5d7d5883-8dbe-4039-a58a-e6a7f97211a9
> To: <sip:201 at mydomain.com>;tag=b596189c6de9c38f624fd84638f43be6-dec6
> Call-ID: 23b4c0df-ccf6-4325-912a-7396a0d169a4
> CSeq: 39221 PUBLISH
> Expires: 170
> SIP-ETag: a.1518814633.30600.10.0
> Server: kamailio (5.0.5 (x86_64/linux))
> Content-Length: 0
> When the call is done, Asterisk send another PUBLISH telling that the call is terminated :
> PUBLISH sip:201 at 192.168.100.37 SIP/2.0
> Via: SIP/2.0/UDP 192.168.100.37:5080;rport;branch=z9hG4bKPj537dc03b-eb54-4e99-b221-beb7352be34f
> From: <sip:201 at mydomain.com>;tag=71c848f9-a9e7-4e63-a990-bc604fdcada5
> To: <sip:201 at mydomain.com>
> Call-ID: 23b4c0df-ccf6-4325-912a-7396a0d169a4
> CSeq: 39222 PUBLISH
> Event: dialog
> SIP-If-Match: a.1518814633.30600.10.0
> Expires: 180
> Max-Forwards: 70
> User-Agent: Asterisk PBX 15.2.1
> Content-Type: application/dialog-info+xml
> Content-Length:   230
> <?xml version="1.0" encoding="UTF-8"?>
> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="17" state="full" entity="sip:201 at mydomain.com">
>  <dialog id="201">
>   <state>terminated</state>
>  </dialog>
> </dialog-info>
> The presence server replies :
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 192.168.100.37:5080;rport=5080;branch=z9hG4bKPj537dc03b-eb54-4e99-b221-beb7352be34f;received=192.168.100.37
> From: <sip:201 at mydomain.com>;tag=71c848f9-a9e7-4e63-a990-bc604fdcada5
> To: <sip:201 at mydomain.com>;tag=b596189c6de9c38f624fd84638f43be6-9a38
> Call-ID: 23b4c0df-ccf6-4325-912a-7396a0d169a4
> CSeq: 39222 PUBLISH
> Expires: 170
> SIP-ETag: a.1518814633.30590.9.1
> Server: kamailio (5.0.5 (x86_64/linux))
> Content-Length: 0
> If a new call is made before the expiration, Asterisk reuse the same ETag:
> PUBLISH sip:201 at 192.168.100.37 SIP/2.0
> Via: SIP/2.0/UDP 192.168.100.37:5080;rport;branch=z9hG4bKPj95f84975-2ec7-4487-a038-e93098b8373d
> From: <sip:201 at mydomain.com>;tag=58c0292a-56d1-4dde-9824-3fa9f2153863
> To: <sip:201 at mydomain.com>
> Call-ID: 23b4c0df-ccf6-4325-912a-7396a0d169a4
> CSeq: 39223 PUBLISH
> Event: dialog
> SIP-If-Match: a.1518814633.30590.9.1
> Expires: 180
> Max-Forwards: 70
> User-Agent: Asterisk PBX 15.2.1
> Content-Type: application/dialog-info+xml
> Content-Length:   247
> <?xml version="1.0" encoding="UTF-8"?>
> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="19" state="full" entity="sip:201 at mydomain.com">
>  <dialog id="201" direction="recipient">
>   <state>early</state>
>  </dialog>
> </dialog-info>



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list