Hi,
how to use special character in extensions.conf?
I‘ve tried exten => _*31#X. and _*31[#]X. but # is recognized as comment.
Thanks and regards.
Hi,
how to use special character in extensions.conf?
I‘ve tried exten => _*31#X. and _*31[#]X. but # is recognized as comment.
Thanks and regards.
Semicolon is comment. What is your evidence that # is treated the same?
I have no evidence, but in my editor it looks that way because the # and everything after it is grayed out. Di you know any solution to solve this?
Use a different editor, or use the current editor with a different language set for its syntax hinting, or simply ignore the syntax hinting.
The editor is not the problem. When I dial the number *31#, I get the message in the CLI that the extension with the context outgoing does not exist. However, if I use *31 in the dialplan, it works.
I think what you want is _*31[#]!
The X. that you have expects another digit if the # is present. The dot expects at least one more after that.
Unfourtunately not. I got the sound message „invalid feature code“
exten => _*31[#]!,1,NoOp()
Actually, it expects two more digits. X matches a decimal digit and . matches at least one further character.
The ! isn’t necessary to match *31#. Actually the _ isn’t necessary either, as the OP is trying to match a literal string, so doesn’t need the pattern matching capabilities.
Also, I’m pretty sure that there is no way that Asterisk will produce a voice announcement for a dialplan error, and, although this isn’t using the Asterisk feature code handling, I don’t think it does so for problems with feature codes - I think they simply get passed through, if they don’t match. Of course the dialplan might do so, as it does in FreePBX, but there is no default dialplan.
Rather than attempts to diagnose the problem and red herrings, about editors, I think we need the Asterisk full log enabling, and verbosity setting to at least three, and the log, together the corresponding parts of the dial plan, posting here.
I think some details of the network may be needed. I have a suspicion that there is another switch (possibly part of the PSTN, or a cellular network, in the path, and that is producing the announcement. Note if Asterisk is producing the announcement, there will be some logging level that shows it doing so.
Thank you. This works now:
[outgoing]
exten => _*31#X.,1,NoOp(Starting outgoing call)
same => n,Progress()
same => n,Set(CALLERID(num-pres)=prohib)
same => n,Dial(PJSIP/${EXTEN:4}@mytrunk)
The problem was I used PJSIP/${EXTEN:3} instead of PJSIP/${EXTEN:4} so I got the message “Invalid feature code”