[asterisk-bugs] [JIRA] (ASTERISK-26918) Failed Subscriptions with Expiry=0 Added and not Removed

Peter Sokolov (JIRA) noreply at issues.asterisk.org
Tue Apr 4 09:01:58 CDT 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Sokolov updated ASTERISK-26918:
-------------------------------------

    Description: 
When there is a hint defined in the dialplan without the endpoint, like for example:
exten => 20,hint,

There are two problems:
1.
When the phone tries to subscribe using the following procedure, asterisk returns 500 Unhandled by dialog usages, however the subscription 313439313239363331303239333235-s29drryc0xcm is still added to the list with Expiry=0 and remains there forever:
{noformat}
SUBSCRIBE sip:[2a00:x:x:x::3]:5060 SIP/2.0
v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;branch=z9hG4bK-xq7t9dpznq15;rport
f: <sip:14 at mydom.com>;tag=z6o87pp1q1
t: <sip:20 at mydom.com>;tag=8f19e7a5-7a1c-4ce0-895d-19cfa68434ab;user=phone
i: 313439313239363331303239333235-s29drryc0xcm
CSeq: 63 SUBSCRIBE
Max-Forwards: 70
User-Agent: snomD315/8.9.3.46
m: <sip:14@[2a03:x:x:x:x:x:x:2033]:38047;line=9hfshly5>;reg-id=1
Event: dialog
Accept: application/dialog-info+xml
Authorization: Digest username="14",realm="mydom.com",nonce="1491296310/2488784f3804a67ae5a0ef5cf7c2cb98",uri="sip:20 at mydom.com",qop=auth,nc=00000004,cnonce="532c5a80",response="9cf105591e91cd13137587b287eab098",opaque="29538d6c2567dee4",algorithm=MD5
Expires: 600
l: 0

SIP/2.0 500 Unhandled by dialog usages
v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;rport=38047;received=2a03:x:x:x:x:x:x:2033;branch=z9hG4bK-xq7t9dpznq15
i: 313439313239363331303239333235-s29drryc0xcm
f: <sip:14 at mydom.com>;tag=z6o87pp1q1
t: <sip:20 at mydom.com>;tag=8f19e7a5-7a1c-4ce0-895d-19cfa68434ab;user=phone
CSeq: 63 SUBSCRIBE
Server: asterisk
l: 0
{noformat}

2.
When the phone then tries to subscribe using the alternative procedure, asterisk returns 200 OK and the subscription succeeds. It is added to the list with its correct Expiry, hovever remains there forever even when expiration time is reached:
{noformat}
SUBSCRIBE sip:20 at mydom.com SIP/2.0
v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;branch=z9hG4bK-5wcx0sygsfyq;rport
f: <sip:14 at mydom.com>;tag=cjddyojr6y
t: <sip:20 at mydom.com>;user=phone
i: 313439313239363732333435353736-l9luhb32s4wh
CSeq: 65 SUBSCRIBE
Max-Forwards: 70
User-Agent: snomD315/8.9.3.46
m: <sip:14@[2a03:x:x:x:x:x:x:2033]:38047;line=9hfshly5>;reg-id=1
Event: dialog
Accept: application/dialog-info+xml
Authorization: Digest username="14",realm="mydom.com",nonce="1491296723/d5fd7a6aa9318a82a01deb959883dd4d",uri="sip:20 at mydom.com",qop=auth,nc=00000001,cnonce="3ea0d05e",response="f37da1f9b16d2434ea4ed48d896e6232",opaque="4334bf9753276797",algorithm=MD5
Expires: 600
l: 0

SIP/2.0 200 OK
v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;rport=38047;received=2a03:x:x:x:x:x:x:2033;branch=z9hG4bK-5wcx0sygsfyq
i: 313439313239363732333435353736-l9luhb32s4wh
f: <sip:14 at mydom.com>;tag=cjddyojr6y
t: <sip:20 at mydom.com>;tag=aa52a882-ebaf-412a-86c5-eaa59906448b;user=phone
CSeq: 65 SUBSCRIBE
Expires: 600
m: <sip:[2a00:x:x:x::3]:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
k: 100rel, timer, replaces, norefersub
Server: asterisk
l: 0
{noformat}

I am seeing the list of subscriptions growing all the time by about 500 entries each 24 hours.
The workaround I could find is to remove these hints from the dialplan. However then the subscription requests fail and the clients start to retry those subscriptions every few seconds increasing asterisk traffic and load.

ASTERISK-26696 has resolved some issues with the subscriptions, however not the two mentioned above which are present in 14.3.0, 14.4.0-rc2.

  was:
When there is a hint defined in the dialplan without the endpoint, like for example:
exten => 20,hint,

There are two problems:
1.
When the phone tries to subscribe using the following procedure, asterisk returns 500 Unhandled by dialog usages, however the subscription 313439313239363331303239333235-s29drryc0xcm is still added to the list with Expiry=0 and remains there forever:
SUBSCRIBE sip:[2a00:x:x:x::3]:5060 SIP/2.0
v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;branch=z9hG4bK-xq7t9dpznq15;rport
f: <sip:14 at mydom.com>;tag=z6o87pp1q1
t: <sip:20 at mydom.com>;tag=8f19e7a5-7a1c-4ce0-895d-19cfa68434ab;user=phone
i: 313439313239363331303239333235-s29drryc0xcm
CSeq: 63 SUBSCRIBE
Max-Forwards: 70
User-Agent: snomD315/8.9.3.46
m: <sip:14@[2a03:x:x:x:x:x:x:2033]:38047;line=9hfshly5>;reg-id=1
Event: dialog
Accept: application/dialog-info+xml
Authorization: Digest username="14",realm="mydom.com",nonce="1491296310/2488784f3804a67ae5a0ef5cf7c2cb98",uri="sip:20 at mydom.com",qop=auth,nc=00000004,cnonce="532c5a80",response="9cf105591e91cd13137587b287eab098",opaque="29538d6c2567dee4",algorithm=MD5
Expires: 600
l: 0

Received from Udp:[2a00:x:x:x::3]:5060 on Udp:[2a03:x:x:x:x:x:x:2033]:38047 at Apr 4 11:05:08.714 (428 bytes):

SIP/2.0 500 Unhandled by dialog usages
v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;rport=38047;received=2a03:x:x:x:x:x:x:2033;branch=z9hG4bK-xq7t9dpznq15
i: 313439313239363331303239333235-s29drryc0xcm
f: <sip:14 at mydom.com>;tag=z6o87pp1q1
t: <sip:20 at mydom.com>;tag=8f19e7a5-7a1c-4ce0-895d-19cfa68434ab;user=phone
CSeq: 63 SUBSCRIBE
Server: asterisk
l: 0

2.
When the phone then tries to subscribe using the alternative procedure, asterisk returns 200 OK and the subscription succeeds. It is added to the list with its correct Expiry, hovever remains there forever even when expiration time is reached:
Sent to Udp:[2a00:x:x:x::3]:5060 from Udp:[2a03:x:x:x:x:x:x:2033]:38047 at Apr 4 11:05:23.792 (767 bytes):

SUBSCRIBE sip:20 at mydom.com SIP/2.0
v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;branch=z9hG4bK-5wcx0sygsfyq;rport
f: <sip:14 at mydom.com>;tag=cjddyojr6y
t: <sip:20 at mydom.com>;user=phone
i: 313439313239363732333435353736-l9luhb32s4wh
CSeq: 65 SUBSCRIBE
Max-Forwards: 70
User-Agent: snomD315/8.9.3.46
m: <sip:14@[2a03:x:x:x:x:x:x:2033]:38047;line=9hfshly5>;reg-id=1
Event: dialog
Accept: application/dialog-info+xml
Authorization: Digest username="14",realm="mydom.com",nonce="1491296723/d5fd7a6aa9318a82a01deb959883dd4d",uri="sip:20 at mydom.com",qop=auth,nc=00000001,cnonce="3ea0d05e",response="f37da1f9b16d2434ea4ed48d896e6232",opaque="4334bf9753276797",algorithm=MD5
Expires: 600
l: 0

Received from Udp:[2a00:x:x:x::3]:5060 on Udp:[2a03:x:x:x:x:x:x:2033]:38047 at Apr 4 11:05:23.960 (607 bytes):

SIP/2.0 200 OK
v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;rport=38047;received=2a03:x:x:x:x:x:x:2033;branch=z9hG4bK-5wcx0sygsfyq
i: 313439313239363732333435353736-l9luhb32s4wh
f: <sip:14 at mydom.com>;tag=cjddyojr6y
t: <sip:20 at mydom.com>;tag=aa52a882-ebaf-412a-86c5-eaa59906448b;user=phone
CSeq: 65 SUBSCRIBE
Expires: 600
m: <sip:[2a00:x:x:x::3]:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
k: 100rel, timer, replaces, norefersub
Server: asterisk
l: 0

I am seeing the list of subscriptions growing all the time by about 500 entries each 24 hours.
The workaround I could find is to remove these hints from the dialplan. However then the subscription requests fail and the clients start to retry those subscriptions every few seconds increasing asterisk traffic and load.

ASTERISK-26696 has resolved some issues with the subscriptions, however not the two mentioned above which are present in 14.3.0, 14.4.0-rc2.


> Failed Subscriptions with Expiry=0 Added and not Removed
> --------------------------------------------------------
>
>                 Key: ASTERISK-26918
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26918
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 14.3.0
>            Reporter: Peter Sokolov
>            Severity: Minor
>
> When there is a hint defined in the dialplan without the endpoint, like for example:
> exten => 20,hint,
> There are two problems:
> 1.
> When the phone tries to subscribe using the following procedure, asterisk returns 500 Unhandled by dialog usages, however the subscription 313439313239363331303239333235-s29drryc0xcm is still added to the list with Expiry=0 and remains there forever:
> {noformat}
> SUBSCRIBE sip:[2a00:x:x:x::3]:5060 SIP/2.0
> v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;branch=z9hG4bK-xq7t9dpznq15;rport
> f: <sip:14 at mydom.com>;tag=z6o87pp1q1
> t: <sip:20 at mydom.com>;tag=8f19e7a5-7a1c-4ce0-895d-19cfa68434ab;user=phone
> i: 313439313239363331303239333235-s29drryc0xcm
> CSeq: 63 SUBSCRIBE
> Max-Forwards: 70
> User-Agent: snomD315/8.9.3.46
> m: <sip:14@[2a03:x:x:x:x:x:x:2033]:38047;line=9hfshly5>;reg-id=1
> Event: dialog
> Accept: application/dialog-info+xml
> Authorization: Digest username="14",realm="mydom.com",nonce="1491296310/2488784f3804a67ae5a0ef5cf7c2cb98",uri="sip:20 at mydom.com",qop=auth,nc=00000004,cnonce="532c5a80",response="9cf105591e91cd13137587b287eab098",opaque="29538d6c2567dee4",algorithm=MD5
> Expires: 600
> l: 0
> SIP/2.0 500 Unhandled by dialog usages
> v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;rport=38047;received=2a03:x:x:x:x:x:x:2033;branch=z9hG4bK-xq7t9dpznq15
> i: 313439313239363331303239333235-s29drryc0xcm
> f: <sip:14 at mydom.com>;tag=z6o87pp1q1
> t: <sip:20 at mydom.com>;tag=8f19e7a5-7a1c-4ce0-895d-19cfa68434ab;user=phone
> CSeq: 63 SUBSCRIBE
> Server: asterisk
> l: 0
> {noformat}
> 2.
> When the phone then tries to subscribe using the alternative procedure, asterisk returns 200 OK and the subscription succeeds. It is added to the list with its correct Expiry, hovever remains there forever even when expiration time is reached:
> {noformat}
> SUBSCRIBE sip:20 at mydom.com SIP/2.0
> v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;branch=z9hG4bK-5wcx0sygsfyq;rport
> f: <sip:14 at mydom.com>;tag=cjddyojr6y
> t: <sip:20 at mydom.com>;user=phone
> i: 313439313239363732333435353736-l9luhb32s4wh
> CSeq: 65 SUBSCRIBE
> Max-Forwards: 70
> User-Agent: snomD315/8.9.3.46
> m: <sip:14@[2a03:x:x:x:x:x:x:2033]:38047;line=9hfshly5>;reg-id=1
> Event: dialog
> Accept: application/dialog-info+xml
> Authorization: Digest username="14",realm="mydom.com",nonce="1491296723/d5fd7a6aa9318a82a01deb959883dd4d",uri="sip:20 at mydom.com",qop=auth,nc=00000001,cnonce="3ea0d05e",response="f37da1f9b16d2434ea4ed48d896e6232",opaque="4334bf9753276797",algorithm=MD5
> Expires: 600
> l: 0
> SIP/2.0 200 OK
> v: SIP/2.0/UDP [2a03:x:x:x:x:x:x:2033]:38047;rport=38047;received=2a03:x:x:x:x:x:x:2033;branch=z9hG4bK-5wcx0sygsfyq
> i: 313439313239363732333435353736-l9luhb32s4wh
> f: <sip:14 at mydom.com>;tag=cjddyojr6y
> t: <sip:20 at mydom.com>;tag=aa52a882-ebaf-412a-86c5-eaa59906448b;user=phone
> CSeq: 65 SUBSCRIBE
> Expires: 600
> m: <sip:[2a00:x:x:x::3]:5060>
> Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
> k: 100rel, timer, replaces, norefersub
> Server: asterisk
> l: 0
> {noformat}
> I am seeing the list of subscriptions growing all the time by about 500 entries each 24 hours.
> The workaround I could find is to remove these hints from the dialplan. However then the subscription requests fail and the clients start to retry those subscriptions every few seconds increasing asterisk traffic and load.
> ASTERISK-26696 has resolved some issues with the subscriptions, however not the two mentioned above which are present in 14.3.0, 14.4.0-rc2.



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



More information about the asterisk-bugs mailing list