"," character at the end breaks the call recordings

hello, if dial number with character comma at the end, call recording doesnt saves. Call records enabled on the routes in state “Yes”, but if enable call recording on extensions its saves records

how to fix that ?

or how to cut comma at the end of dialed number in dialplan ?

Current PBX Version: 16.0.40
Current Asterisk Version: 16.30.0
Current System Version: 12.7.8-2302-1.sng7

Why does the number contain a comma? That is what is probably breaking things.

this is an accidental click, because the comma is next to the enter button

cant catch the comma in nuber by this
exten => _X.\,,1,NoOp(Found an extension with comma)
its works on all calls

“.” must be the last character in a pattern; it can’t be used as an internal wild card.

anyone suggest something ?

Dont allow a comma to be submitted? Clean up the submission before it is sent to the dialplan…

my question was just that

or how to cut comma at the end of dialed number in dialplan ?

why did you just repeat it ?

So how are they entering the numbers to be dialed? You said it was because the comma key is next to the enter key. Where is this happening? How does it end up in the dialplan to make a call?

So how are they entering the numbers to be dialed?

777777777777,

Where is this happening?

softphone, MicroSIP

How does it end up in the dialplan to make a call?

only comma at the end will dial as normal, not at the beginning, not somewhere between

with comma:

Executing [s@sub-record-check:11] ExecIf("PJSIP/100-0003eb45", "0?Set(ARG3=dontcare)") in new stack

this difference from normal flow

Just to be clear on this, what kind of keyboards are they using? Neither QWERTY, Colemack or Dvorak layouts have the comma key anywhere near the Enter/Return key. Depending on the layout it’s a backslash or apostrophe or a dash (in their respective order). Now on a Dvorak layout the comma is under the 2 and 3 digit keys at the top. However, no one is hitting the comma key by accident when hitting the enter key on any of the 3 standard keyboard layouts.

Correct because in Asterisk the comma is a delimiter for the process logic of things. In regards to dial pattern matching it’s not going to work as you can’t escape it in the match and what starts to happen is you have the ${EXTEN} variable now ending with a comma which means it cuts things short when being used in the standard dialplan. So now when it’s being used it can push options/settings back or make it jump to wrong priorities.

Bottom line here is this is a user issue, as in your users are being careless when how they dial numbers in MicroSIP. If this was a desk phone it would be equivalent to them constantly misdialing numbers. The real solution is to fix the users from being careless and sloppy when dialing numbers. What you’re looking to do is a band-aid that doesn’t fix the core problem or stop them from doing the same thing but the next time it can be “I’m getting a semicolon at the end of numbers, how can I fix that?”.

Address the issue at its core instead of hacking around the problem.

it’s doesn’t matter what kind of keyboard is using, you dont care about local manufacturer and their keyboard layout

there is a constant condition, it is invariable, no need to advice how to change conditions, my question is how to cut comma from dialplan, that it

Im understanding about that comma is breaking the dialplan, that’s why i created this thread

next time when will be “I’m getting a semicolon at the end of numbers, how can I fix that?” I will add semicolon as I want to add comma and your help about that question will no be needed

if you have any variants how to do this by dialplan, I will be grateful to you, if not, dont ask or post anything that are not related to the topic of the question

thank you

You can probably use FILTER()

1 Like

They can also do simple manipulation to fix it to. Manipulation does the job simply.

probably it will help, but how to add wildcard _X. to dialplan without overwriting system dialplan ?
exten => _X.,1,ExecIf($["${EXTEN:-1}"=","]?Set(EXTEN=${EXTEN:0:-1})

You can’t insert extra priorities into the dialplan, other than editing the actual dialplan code. You can override a particular line, but only by using a more specific match.

Moreover, EXTEN isn’t really a variable, it is really a read only function giving the current position in the dialplan. To change it you have to use the side effect of Goto, not Set, and would have to explicitly include the priority. The following is untested and may have of by one errors:

exten => _X.,1,GotoIf($["${EXTEN:-1}"=","]?${EXTEN},${PRIORITY})

Note this executes the same line twice, but the second time round, the condition will fail. The intent is avoid having to do arithmetic on PRIORITY.

As a general principle though, I’d suggest FILTER was cleaner, as it can take out all problem characters. Again, a GoTo would be needed.

(If the priority really is known to be 1 at that point, you can use a numeric priority.)

@david55 thank your for advice,

indeed in different softphones are different internal dial filters (MicroSIP forward comma only at the end of number but filter dot, slash and some others symbols, 3CXPhone forward dots, commas and others symbols), func FILTER covers thats all

this is now working, hope it won’t break dialplan, from-internal-additional is the next included context after from-internal-custom

exten => _X.,1,Goto(from-internal-additional,${FILTER(+\- 0-9a-zA-Z,${EXTEN})},1)

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.