Setting custom menu for conference bridge

I have set up a conference bridge between two baresip clients, and everything works fine.
Custom menu with AGI script is unfortunately not working, dtmf does not trigger any menu options:

  1. AGI script (executable bit is set)
#!/usr/bin/env python3
import sys
from asterisk.agi import *

agi = AGI()

option = agi.env['agi_arg_1']

if option == "1":
    agi.verbose("Toggle module enablement")
    enabled = int(agi.get_variable("APP_KNISPER_ENABLE"))
    agi.set_variable("APP_KNISPER_ENABLE", 1 if enabled == 0 else 0)
elif option == "2":
    agi.verbose("Set AGE to 60")
    agi.set_variable("APP_KNISPER_AGE", 60)
elif option == "3":
    agi.verbose("Set AGE to 70")
    agi.set_variable("APP_KNISPER_AGE", 70)
elif option == "4":
    agi.verbose("Set AGE to 80")
    agi.set_variable("APP_KNISPER_AGE", 80)
elif option == "5":
    agi.verbose("Enter custom AGE value")
    agi.appexec("Read", "APP_KNISPER_AGE,en/demo-enterkeywords,2")
  1. confbridge.conf menu entry
[knisper_menu]
type=menu
*1=exec_when_connected,AGI,knisper.agi,1
*2=exec_when_connected,AGI,knisper.agi,2
*3=exec_when_connected,AGI,knisper.agi,3
*4=exec_when_connected,AGI,knisper.agi,4
*5=exec_when_connected,AGI,knisper.agi,5
  1. extensions.conf entry
[confbridge]
exten => 100,1,Answer()
same => n,Set(CONFNO=1)
same => n,Set(CHANNEL(language)=en)
same => n,Dial(Local/${CONFNO}@join_conference)
same => n,Hangup()

[join_conference]
exten => _.,1,Answer()
same => n,ConfBridge(${EXTEN},default_bridge,default_user,knisper_menu)
same => n,Hangup()

Perhaps there is a different way of passing the menu to the conference ?

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