asterisk pbx realtime user with dynamic extensions

1.1k Views Asked by At

I have installed asterisk 16 on centos 8 with mysql and configured Realtime Sip with it what I am looking for is a way to have dialplan in my extensions so that anyone in that diaplan can call any extension without explicitly mentioning as mentioned below on the example

[mycontext]
exten => 1000,1,Dial(SIP/1000)
exten => 1001,1,Dial(SIP/1001)

DB Realtime sip users :

INSERT INTO RealTimeUsers (type,name,secret,context,host,defaultuser,firstname,lastname) VALUES('friend','1000','1234','mycontext','dynamic','1000','abc','xyz');

INSERT INTO RealTimeUsers (type,name,secret,context,host,defaultuser,firstname,lastname) VALUES('friend','1001','1234','mycontext','dynamic','1001','abc','xyz');

What I want is that I am able to dynamically create SIP users using the SIP Realtime and those users can call each other without explicitly defining each extension .

1

There are 1 best solutions below

0
On
[mycontext]
exten => _XXXX,1,Dial(SIP/${EXTEN},,)

https://www.voip-info.org/asterisk-config-extensionsconf/