Set Confbridge variables Using AGI


#1

Hi,
I am trying to do

exten=>1,n,Set(CONFBRIDGE(user,template)=default_user) in

AGI through (pyst2)

agi.set_variable("CONFBRIDGE(user,template)","default_user")

but not seems to work , any help!!!


#2

I was reading the souce code, I’m not sure , but I think that method wont allows you to set the variable using an Asterisk funcion as parameter , anyway you can ask
to the developer and see https://pyst2.readthedocs.io/en/latest/_modules/asterisk/agi.html#AGI.set_variable


#3

Well i thought about this work around
since i had created confbridge template and try to set the variables dynamically through AGIscript but it not takes the effect so, can anybody tell me where i am falling wrong.

confbridge.conf

[default_user]
type=user
pin =
wait_marked=
end_marked=
music_on_hold_when_empty=
announce_join_leave=
announce_user_count_all=yes

[default_bridge]
type=bridge
max_members=4  

[admin_user]
type=user
pin =
marked =
admin =
music_on_hold_when_empty=

extensions.conf
[my]
exten =>105,1,Noop("####### my context ######")
         same => n,AGI(/home/ashish/bridgeApp.agi)------->(Here through AGIscript we are originate the call to [conferenceAdmin] context.


[conferenceAdmin]
exten => _X. ,1,Noop("########## conference #######)
        same => n,Set(CONFBRIDGE(user,template)=admin_user)
        same => n,Set(CONFBRIDGE(user,admin)=yes)
        same => n,Set(CONFBRIDGE(user,marked)=no)
        same => n,Set(CONFBRIDGE(user,wait_marked)=no)
        same => n,Set(CONFBRIDGE(user,end_marked)=no)
        same => n,Set(CONFBRIDGE(user,music_on_hold_when_empty)=yes)

        ;------------bridge conf--------

        same => n,Set(CONFBRIDGE(bridge,template)=default_bridge)
        same => n,Set(CONFBRIDGE(bridge,max_members)=4)
        same => n,Dial(PJSIP/101,,gU(confKids^101))


[confKids]
exten => s,1,Noop("####### confkids #####")

        same => n,Set(CONFBRIDGE(user,template)=yes)
        same => n,Set(CONFBRIDGE(user,admin)=yes)
        same => n,Set(CONFBRIDGE(user,marked)=no)
        same => n,Set(CONFBRIDGE(user,wait_marked)=yes)
        same => n,Set(CONFBRIDGE(user,end_marked)=yes)
        same => n,Set(CONFBRIDGE(user,music_on_hold_when_empty)=yes)
        same => n,ConfBridge(1)
        same => n,ConfBridge(1,default_bridge,default_user)


[conference]
exten => _X.,1,Noop("########## conference #######)
         same => n, Dial(PJSIP/103,,gU(conferencejoin))

[conferencejoin]
exten => s,1,Noop("####### conference join ########")
        same => n,ConfBridge(1,default_bridge,default_user)