hello
wanna remove dash using dialplan to make call out, i was found this but no working, what wrong PLZ
[my-test]
exten => _+216XXXXXXXX.,1,Set(CALLERID(num)=1000)
same => n,Set(OUTNUM=${EXTEN})
same => n,Macro(dialout)
same => n,Dial(SIP/trunk_1/${OUTNUM})
same => n,Hangup()
[May 11 01:00:24] NOTICE[64033][C-00000047]: chan_sip.c:26828 handle_request_invite: Call from ‘780’ (10.152.1.3:57621) to extension ‘+216 510 30 07 45’ rejected because extension not found in context ‘my-test’.
On Saturday 11 May 2024 at 03:22:54, darakss via Asterisk Community wrote:
exten => _+216XXXXXXXX.,1,Set(CALLERID(num)=1000)
Call from ‘780’ (10.152.1.3:57621) to extension ‘+216 510 30 07 45’ rejected
because extension not found in context ‘my-test’.
Your probem is that the pattern “_+216XXXXXXXX.,” matches a plus sign, the
digits 2, 1, 6 then eight more DIGITS, followed by anything.
X means “any digit 0 to 9”.
This cannot match the number you dialled, which is plus, 2, 1, 6 followed by
space. (Nor can it match anything including a dash, as in your subject line).
If you want ${EXTEN} to match spaces you have to allow for that in the
pattern: “_+216[0-9 ].” for example.