I am trying to set up asterisk, andI have a user id pattern is like this format user/ebbasasd-5631-4fbd-8702-a7123ca1234
However, I am not able to make it works in extension.config
I tried:
exten => user/_.,1,Dial({PJSIP_DIAL_CONTACTS({EXTEN})})
exten => _user/.,1,Dial({PJSIP_DIAL_CONTACTS({EXTEN})})
Both of them are not working. What did I do wrong? Thanks
It gives me following error:
[2019-10-15 19:19:28] NOTICE[30343]: res_pjsip_session.c:2963 new_invite: Call from ‘user/ebbasasd-5631-4fbd-8702-a7123ca1234’ (UDP:123.12.123.123:8888) to extension ‘user/12341234c43e-1234-1234-12347a171234’ rejected because extension not found in context ‘testing’.
Thank, I will remove / to try it out. How about ‘-’ symbol, will it work?
Update:
I removed / , but it does not seems to work
[2019-10-15 21:15:32] NOTICE[31087]: res_pjsip_session.c:2963 new_invite: Call from ‘user12341234c43e-1234-1234-12347a171234’ (UDP:123.123.123.123:8888) to extension ‘ebbasasd-5631-4fbd-8702-a7123ca1234’ rejected because extension not found in context ‘testing’.
The extension presented to the match starts with “ebbas”, not with “user”. it is the caller ID that starts with user, so you would want a pattern like "_ebba./_user. ", adjusting it based on information about the exact possible values.
Hyphens are ignored in both the extension and the pattern when doing pattern matching.