freeswitch icon indicating copy to clipboard operation
freeswitch copied to clipboard

Resubscription using previous nonce fails if Expires is longer than "nonce-ttl"

Open tomek-o opened this issue 3 years ago • 5 comments

Describe the bug Resubscription fails with default FS configuration is subscription Expires is longer than "nonce-ttl" seconds. If Expires in SUBSCRIBE matches FreeSWITCH "nonce-ttl" parameter (default: 60) subscriptions are working fine.

To Reproduce Use default FS "nonce-ttl" = 60. Configure tSIP softphone with account and with BLF button that has Expires = 120. Wait ~110 seconds until resubscription happens. Subscription would fail. In logs there would be multiple pairs of SUBSCRIBE + 401 (but without WWW-Authenticate) and later NOTIFY with Subscription-State: terminated;reason=noresource.

Expected behavior If for whatever reason FreeSWITCH is not accepting nonce it should reply with SIP/2.0 407 Proxy Authentication Required with Proxy-Authenticate (and new nonce) as it does for first SUBSCRIBE. Perhaps default "nonce-ttl" value is also little short.

Package version or git hash FS Version v1.10.7

tomek-o avatar Jan 31 '22 18:01 tomek-o