[asterisk-bugs] [JIRA] (ASTERISK-30069) res_pjsip: Asterisk keeps qualifying after contact expiry

Yury Kirsanov (JIRA) noreply at issues.asterisk.org
Mon May 30 19:14:49 CDT 2022


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

Yury Kirsanov commented on ASTERISK-30069:
------------------------------------------

Thanks, Joshua, I'll give that a go and see if it stops qualifying. I was using 'database deltree' to remove contacts because we had max_contacts=2 and after each reload of SIP proxy in front of  Asterisk it was creating a new contact on Asterisk and after 2 restarts Asterisk was starting to respond with 403 Forbidden. I've figured out the only way to stop that was to remove contacts from AstDB because even 'core restart now' won't help in this case as Asterisk would load all the contacts from DB upon restart. Is there any way to flush all the currently registered contacts from Asterisk without such complex manipulations? We need this because we're setting up a mid registrar SIP proxy that would modify Expiry time to large values like 3600 or even 86400 seconds so Asterisk's load would be reduced in terms of servicing REGISTER attempts. Thanks!

> res_pjsip: Asterisk keeps qualifying after contact expiry
> ---------------------------------------------------------
>
>                 Key: ASTERISK-30069
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30069
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip
>    Affects Versions: 18.7.0, 18.12.0
>         Environment: Ubuntu 20.04.4LTS
>            Reporter: Yury Kirsanov
>            Assignee: Yury Kirsanov
>         Attachments: asterisk.log, sip.pcap
>
>
> We have Asterisk server that acts as a registrar and a SIP device that connects to Asterisk via a SIP proxy that adds Path header to stay in between Asterisk and SIP device.
> After successful registration if SIP device has disconnected without sending Unregister SIP packet with Expiry=0 Asterisk would keep qualifying that device forever.
> 'pjsips show contacts' show that contact is removed as well as 'database show'. Also logs show that contact has been removed due to expiry but still SIP proxy receives SIP OPTIONS packets from Asterisk.
> Here's output of 'pjsip set logger host <sip_proxy>':
> [May 18 03:57:10] <--- Transmitting SIP request (519 bytes) to UDP:X.X.X.X:5060 --->
> [May 18 03:57:10] OPTIONS sip:XXXXXX at X.X.X.X:62024 SIP/2.0
> [May 18 03:57:10] Via: SIP/2.0/UDP X.X.X.X:5060;rport;branch=z9hG4bKPj73d001de-73b5-445c-895e-2d492e876c25
> [May 18 03:57:10] From: <sip:XXXXXX at X.X.X.X>;tag=43bd3567-53ed-46b5-8ddf-b2c5bddb4042
> [May 18 03:57:10] To: <sip:XXXXXX at X.X.X.X>
> [May 18 03:57:10] Contact: <sip:XXXXXX at X.X.X.X:5060>
> [May 18 03:57:10] Call-ID: b1a62aed-8b66-40b4-8d1d-6b1f6718318c
> [May 18 03:57:10] CSeq: 27361 OPTIONS
> [May 18 03:57:10] Supported: path
> [May 18 03:57:10] Route: <sip:X.X.X.X;lr;received=sip:X.X.X.X:62024%3btransport%3dwss>
> [May 18 03:57:10] Max-Forwards: 70
> [May 18 03:57:10] User-Agent: Agent
> [May 18 03:57:10] Content-Length:  0
> The only way to stop this is to restart Asterisk.



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



More information about the asterisk-bugs mailing list