[Home]

Summary:ASTERISK-29170: Conflict hints with extenpatternmatchnew=true
Reporter:Ilya Demyanov (Turbid)Labels:
Date Opened:2020-11-19 04:08:12.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:PBX/pbx_ael PBX/pbx_config
Versions:18.0.1 18.1.0 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-25491 extenpatternmatchnew=yes breaks with hint and pattern match extension in the same context
Environment:Debian 10Attachments:( 0) asterisk.zip
Description:I have several extensions that can subscribe to each other:
{code}
pbx*CLI> dialplan show hints
[ Context 'hints' created by 'pbx_ael' ]
 '1166' =>         hint: PJSIP/1166                              [pbx_ael]
 '1177' =>         hint: PJSIP/1177                              [pbx_ael]
 '1188' =>         hint: PJSIP/1188                              [pbx_ael]
 '_11XX' =>        hint: PJSIP/${EXTEN}                          [pbx_ael]

-= 4 extensions (4 priorities) in 1 context. =-
pbx*CLI>
pbx*CLI> core show hints

   -= Registered Asterisk Dial Plan Hints =-
_11XX@hints         : PJSIP/${EXTEN}        State:Unavailable     Presence:                Watchers  0
1188@hints          : PJSIP/1188            State:Idle            Presence:not_set         Watchers  1
1177@hints          : PJSIP/1177            State:Idle            Presence:not_set         Watchers  1
1166@hints          : PJSIP/1166            State:Idle            Presence:not_set         Watchers  2
----------------
- 4 hints registered
pbx*CLI>
pbx*CLI> pjsip list subscriptions inbound
Endpoint/CLI                   Resource/Event                 Expiry Call-id
1177/<none>                    1166/dialog                       233 b11580-0-13c4-5fb66719-279864bd-5fb66719@10.126.96.10
1188/<none>                    1166/dialog                       470 0_3003538414@172.16.29.104
1166/<none>                    1188/presence                     455 29cdb64e318d428f8668c1f46d31171c
1166/<none>                    1177/presence                     455 bdcc83ef9ba34469a54b5bf36390fe9b

4 active subscriptions
{code}

Now I am turn on extenpatternmatchnew and  re-registering one of the subscribers and I get conflict errors

{code}
pbx*CLI> dialplan set extenpatternmatchnew true

   -- Switched to using the NEW pattern match algorithm for extension names in the dialplan.
[Nov 19 13:04:33]     -- Removed contact 'sip:1166@192.168.2.77:64422;ob' from AOR '1166' due to request
[Nov 19 13:04:33]   == Contact 1166/sip:1166@192.168.2.77:64422;ob has been deleted
[Nov 19 13:04:33]   == Endpoint 1166 is now Unreachable
[Nov 19 13:04:36]     -- Added contact 'sip:1166@192.168.2.77:64422;ob' to AOR '1166' with expiration of 300 seconds
[Nov 19 13:04:36]   == Endpoint 1166 is now Reachable
[Nov 19 13:04:36]     -- Contact 1166/sip:1166@192.168.2.77:64422;ob is now Reachable.  RTT: 2.271 msec
[2020-11-19 13:04:37] WARNING[2319]: pbx.c:7156 add_priority: Unable to register extension '1188' priority -1 in 'hints', already in use
[2020-11-19 13:04:37] WARNING[2319]: res_pjsip_exten_state.c:446 subscription_established: Unable to subscribe endpoint '1166' to extension '1188@phones-in'
[2020-11-19 13:04:37] WARNING[2320]: pbx.c:7156 add_priority: Unable to register extension '1177' priority -1 in 'hints', already in use
[2020-11-19 13:04:37] WARNING[2320]: res_pjsip_exten_state.c:446 subscription_established: Unable to subscribe endpoint '1166' to extension '1177@phones-in'
{code}

Other extensions also receive an error on their SUBSCRIBE:

{code}
[2020-11-19 13:10:49] WARNING[2237]: pbx.c:7156 add_priority: Unable to register extension '1166' priority -1 in 'hints', already in use
[2020-11-19 13:10:49] WARNING[2237]: res_pjsip_exten_state.c:446 subscription_established: Unable to subscribe endpoint '1177' to extension '1166@phones-in'
[2020-11-19 13:11:49] WARNING[2237]: pbx.c:7156 add_priority: Unable to register extension '1166' priority -1 in 'hints', already in use
[2020-11-19 13:11:49] WARNING[2237]: res_pjsip_exten_state.c:446 subscription_established: Unable to subscribe endpoint '1177' to extension '1166@phones-in'
[2020-11-19 13:12:49] WARNING[2237]: pbx.c:7156 add_priority: Unable to register extension '1166' priority -1 in 'hints', already in use
[2020-11-19 13:12:49] WARNING[2237]: res_pjsip_exten_state.c:446 subscription_established: Unable to subscribe endpoint '1177' to extension '1166@phones-in'
pbx*CLI>
{code}

Subscriber list starts to fill up with duplicate garbage:
{code}
pbx*CLI> pjsip list subscriptions inbound
Endpoint/CLI                   Resource/Event                 Expiry Call-id
1177/<none>                    1166/dialog                      1447 b11580-0-13c4-5fb66719-279864bd-5fb66719@10.126.96.10
1188/<none>                    1166/dialog                      1473 0_3003538414@172.16.29.104
1166/<none>                    1188/presence                      62 2e3e93db283f4fd7beaeebb25517cd2e
1166/<none>                    1177/presence                      62 84ea4f54098f48e9848ab83383d2aebe
1177/<none>                    1166/dialog                      1514 b11788-0-13c4-5fb66e60-71160f15-5fb66e60@10.126.96.10
1177/<none>                    1166/dialog                      1574 b11990-0-13c4-5fb66e9c-537e6a02-5fb66e9c@10.126.96.10
1177/<none>                    1166/dialog                      1634 b11b98-0-13c4-5fb66ed8-384dd0c7-5fb66ed8@10.126.96.10
1177/<none>                    1166/dialog                      1694 b11da0-0-13c4-5fb66f14-757f9aa4-5fb66f14@10.126.96.10
1177/<none>                    1166/dialog                      1755 b121b0-0-13c4-5fb66f51-26b434d9-5fb66f51@10.126.96.10
{code}
Comments:By: Asterisk Team (asteriskteam) 2020-11-19 04:08:13.400-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Ilya Demyanov (Turbid) 2020-11-19 04:43:43.410-0600

Looks like I found a similar bug: ASTERISK-25491

By: Sean Bright (seanbright) 2020-11-19 08:27:57.924-0600

Turn off {{extenpatternmatchnew}}

By: George Joseph (gjoseph) 2020-11-20 09:23:03.016-0600

If you attach dialplan snippets, from both extensions.conf and extensions.ael, and the pjsip configuration for the devices I can take a quick look.  Be aware though that extenpatternmatchnew is rarely used and has always been an "experimental" feature,  It's unlikely to receive attention from a core developer.


By: Ilya Demyanov (Turbid) 2020-11-23 05:43:53.835-0600

pjsip.conf, pjsip_wizard.conf and AEL-extensions in attach.

I set the option from the command line:
> dialplan set extenpatternmatchnew true

extensions.conf is not present, because I do not have the pbx_config.so module now, but it was the same with it - I checked.

By: Sean Bright (seanbright) 2020-11-23 07:45:10.334-0600

Why do you need to enable {{extenpatternmatchnew}}?

By: Ilya Demyanov (Turbid) 2020-11-23 07:55:43.691-0600

/configs/samples/extensions.conf.sample:

{quote}
; Please, if you try this out, and are forced to return to the
; old pattern matcher, please report your reasons in a bug report
; on https://issues.asterisk.org. We have made good progress in providing
; something compatible with the old matcher; help us finish the job!      
{quote}

By: Kevin Harwell (kharwell) 2020-11-30 12:49:19.543-0600

This appears to be the same as, or similar to ASTERISK-25491. I'll open it as related to that one, but to set expectations ... as [~gjoseph] mentioned:
{quote}
Be aware though that extenpatternmatchnew is rarely used and has always been an "experimental" feature, It's unlikely to receive attention from a core developer.
{quote}