Join ring group by dialing a number and exit by dialing another number

Status
Not open for further replies.

Nedo

Member
Jun 22, 2020
59
3
8
40
Hi, a friend asked me if there is a solution to this:
He has a voip doorbell system to which we don't have access, a guest press the doorbell button, the doorbell extension is 120, I saw that he calls a 5010 number, so I created a 5010 ring group and add some extensions, everything works correctly, a guest rings the doorbell, the extensions in ring group are called correctly.
He asked me if it was possible from an extension to join the ring group 5010 by pressing a key sequence, for example *123 and exit with another sequence, for example *456
I tried to create this dialplan but there is a syntax error using the group command that I can't resolve, and cannot find much info on internet:
```
<extension name="Join_5010" continue="false" uuid="0f2b1661-9d34-4085-8a73-7d4d040b9fcf">
<condition field="destination_number" expression="^\*123$">
<action application="answer" data=""/>
<action application="set" data="ring_group_id=5010"/>
<action application="log" data="INFO Variabile caller_id_number: ${caller_id_number}"/> "This variable work, i see the correct extension calling this sequence in log"
<action application="export" data="group_enabled=true"/>
<action application="group" data="insert/5010/sofia/internal/${caller_id_number}@xxx.xxx.cloud"/>
<action application="hangup" data=""/>
</condition>
</extension>
```
The error is:

2023-10-05 16:08:00.615588 89.50% [DEBUG] switch_channel.c:1315 EXPORT (export_vars) [group_enabled]=[true]
EXECUTE [depth=0] sofia/internal/405@xxx.xxx.cloud group(insert/5010/sofia/internal/405@xxx.xxx.cloud)
2023-10-05 16:08:00.615588 89.50% [WARNING] mod_db.c:622 USAGE: group [insert|delete]/<realm>/<key>/<val>
EXECUTE [depth=0] sofia/internal/405@xxx.xxx.cloud hangup()

Can you help me please?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
I remember this facility was a feature on the old Samsung PBXs. I have not played with ring groups on Fusion for quite some time so I don't have an answer for you, but it may be worth looking at /usr/share/freeswitch/scripts/app/ring_groups/resources/scripts/ring_member.lua
This lua script appears to allow adding and removing of ring group destinations.
 

Nedo

Member
Jun 22, 2020
59
3
8
40
I remember this facility was a feature on the old Samsung PBXs. I have not played with ring groups on Fusion for quite some time so I don't have an answer for you, but it may be worth looking at /usr/share/freeswitch/scripts/app/ring_groups/resources/scripts/ring_member.lua
This lua script appears to allow adding and removing of ring group destinations.
Exactly, in fact before the migration to VoIP it actually had a Samsung PBX, I was successful in replicating everything except this function. Thanks for the tip, it's already a step forward.
 
  • Like
Reactions: Adrian Fretwell

Nedo

Member
Jun 22, 2020
59
3
8
40
I think more variable is needed for this:

2023-10-09 15:51:10.275660 96.67% [ERR] switch_cpp.cpp:1465 [database] can not bind parameter: undefined parameter: ring_group_uuid
2023-10-09 15:51:10.275660 96.67% [ERR] mod_lua.cpp:202 /usr/share/freeswitch/scripts/app/ring_groups/index.lua:245: attempt to concatenate global 'domain_name' (a nil value)
2023-10-09 15:51:10.275660 96.67% [DEBUG] switch_cpp.cpp:1209 sofia/internal/405@xxx.xxx.cloud destroy/unlink session from object
I have added a dialplan entry, dst number \*123
It call app lua and run this script, but i think something is missing, where i can find ring_group_uuid?
 
Status
Not open for further replies.