Struggling with Confbridge marked/kick/admin


i have this below in my dialplan:

exten => 666,1,NoOp()
 same => n,Progress()
 same => n,Originate(PJSIP/6001,exten,default,777,1,,aC(ulaw,alaw,h264)c(6000)n(Doorbell)) 
 same => n,Originate(PJSIP/6002,exten,default,777,1,,aC(ulaw,alaw,h264)c(6000)n(Doorbell)) 
 same => n,Originate(PJSIP/6003,exten,default,777,1,,aC(ulaw,alaw,h264)c(6000)n(Doorbell)) 
 same => n,Originate(Local/doorbell@default,exten,default,888,1,,aC(ulaw,alaw,h264)c(6000)n(Doorbell))
 same => n,ConfBridge(1,myconferenceroom,default_user) 
exten => 777,1,NoOp()
 same => n,Set(CHANNEL(hangup_handler_push)=finish_confbridge,s,1(args));
 same => n,ConfBridge(1,myconferenceroom,admin_user)

exten => 888,1,NoOp()
 same => n,Set(CHANNEL(hangup_handler_push)=finish_confbridge,s,1(args));
 same => n,ConfBridge(1,myconferenceroom,default_user)
exten => doorbell,1,Answer()
 same => n,RTSP-SIP(rtsp://admin:Password01@,0,Hikvision,5060)

exten => s,1,System(/usr/sbin/asterisk -rx "confbridge kick 1 all")

In my confbridge i have:




What i want, if i call 666 => Local/doorbell_rtsp@from-internal-custom => schould be called, as default_user = OK
What i want, if i call 666 => 6001 => should be called as admin_user = OK

What i also want
Video_mode = first_marked => i always need video from the Local/doorbell_rtsp@from-internal-custom in the conf, not other users => OK

But whats not working, and what i also want, 6001 is the admin user, if 6001 leaves the Confbridge, the conference should be stopped and quited…
If i setup marked=no in the default_user properties, if 6001 leaves, the conference is stopped, but then i dont see the video…
I cant find an option to always set video to the rtsp user? i only have options like follow_talker, last_marked, first_marked in the confbridge properties? Those options are working, but marked users are not kicked out the conference , so the confbridge never quits

There is no option to set the video to a specific user. I don’t think the currently available combination of settings will fit your specific use case such that ConfBridge can do it itself. You’d likely need to manage things externally, through AMI, or potentially using the ConfKick dialplan application. Using a hangup handler attached to the admin you could kick all participants when they hang up. I haven’t tested it though.

ok, indeed, video mode only works with marked users, and those indeed cant be kicked out…

ok, will have a look at the confkick application, i wasnt aware of that one
so indeed when 6001 is doing an hangup => confkick all users…

thnx for info

hmm, do you have somewhere an example code i can use for the ConfKick ? searching on this forum doesnt provide any examples :slight_smile:

It’s documented on the wiki[1].

[1] Asterisk 19 Application_ConfKick - Asterisk Project - Asterisk Project Wiki

Asterisk is new to me, especially writing dialplans…
Was usefull if I had some kind of example code…
Because I first need to check if users 6001 hangup, then I initiate a conflict? I need that extra stuff before 6001 enters the confbridge? Just after the originate?

Dialplans are a fundamental aspect of Asterisk, it’s important to have a grasp of them. I’m not going to write your dialplan for you to do this. Someone else may provide such a thing.

For this you would need to determine if it’s 6001 calling, and then attach a hangup handler[1], before joining the ConfBridge. In the hangup handler you would then use the ConfKick dialplan application I mentioned. The wiki page for hangup handlers includes some examples, you can probably use that as a base.

[1] Hangup Handlers - Asterisk Project - Asterisk Project Wiki

Thnx , I’ll have a look


1 other question, as you can see I’m doing an originate to call / invite other people to the conference…

Because that doorvell_rtsp user is also joined the conference, we can see the video of that user…,

The doorbell user is auto joined the conference, with the answer app. Is it possible to use that video to send to the othe users in an early media stage (183) before picking up? Maybe with some script?

Or if not possible, is it possible to a add custom header in the originate? Maybe the Call-Info to send a static image?

I have no information regarding a custom header or call-info header, or any of that. There’s also been threads already about video and 183 - if I had anything to add to them, I would have commented on them.

ok, np

thnx for feedback

hey @jcolp , thnx, i was able to end the confbridge when a user leaves, with command below:

exten => s,1,System(/usr/sbin/asterisk -rx "confbridge kick 1 all")

updated first post…

But i’m still struggling with the video, as you can see, when “666” is being called, i’m inviting 3 users as example (6001, 6002, 6003), those are softphones…
I’m also inviting an doorbell, thats just an virtual extension, an RTSP stream, that one is autojoined…
I need to join that doorbell users an an “marked” user , otheriwise i’m not able to setup the video setting on it, because i only want that video in the confbridge…

So when 6001 , 6002 , or 6003 joins, and is doing an hangup, the conference is quited, so thats good
But when 6001, 6002, 6003 is not joining, the conference is already being started, because it autojoins…

I cant use below setting, because i need to mark the user anyway, if i set marked=no , then i dont cant specify video

;wait_marked=yes   ; Sets if the user must wait for a marked user to enter before
                   ; joining the conference. Off by default.

Now, another approach…is there mayba a way to do below command, ONLY when 6001 or 6002 or 6003 is joined? maybe some check if there are 2 or more participants in the confbridge, then invite the doorbell… so i can set the video mode as ‘last_marked’
I think that will fix my issue

same => n,Originate(Local/doorbell@default,exten,default,888,1,,aC(ulaw,alaw,h264)c(6000)n(Doorbell))

exten => s,1,System(/usr/sbin/asterisk -rx “confbridge kick 1 all”)

This is not necessary. You should avoid using System to execute CLI commands unless it’s actually necessary.

You can instead do exten => s,1,ConfKick(1,all)

You can use CONFBRIDGE_INFO to get the number of parties in a bridge. Look at the documentation for it.

ok, i’ll have a look at confbridge_info … so you propose to make some while loop to check the parties? then if more the => 1 continue the dialplan ?

btw, is there also an equivalent for:

exten => n,1,System(/usr/sbin/asterisk -rx "hangup request all")

ok, i’ll have a look at confbridge_info … so you propose to make some while loop to check the parties? then if more the => 1 continue the dialplan ?

That sounds like an if branch, not a loop to me.
You can execute whatever logic you need to based on # of parties.

exten => n,1,System(/usr/sbin/asterisk -rx “hangup request all”)

No, but I can’t think why you would ever do this on a production system. You can hangup specific channels using the SoftHangup application.

perfect, i’ll have a look

thnx for suggestions

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.