如何在confbridge应用程序中检测会议中的多个密钥。现在我只能检测到一个关键数字。如何检测2位数或3位数,例如45或454。 请帮帮我。
由于
答案 0 :(得分:1)
您可以检测到4,记录检测,检测下一个数字(5),再次记录。
根据需要多次这样做。
答案 1 :(得分:1)
是的,完全可以使用基于多个DTMF键按下的DTMF菜单。
示例:
[general]
[user_profile]
type = user
admin = no
pin = 1111
marked = yes
startmuted = no
announce_user_count = yes
announce_user_count_all = 1
announce_join_leave = yes
[user_menu]
type = menu
1 = toggle_mute
201 = leave_conference
[default_bridge]
type = bridge
[default_user]
type = user
在此日志片段中,您可以看到用户按'201'离开会议:
[Feb 21 22:28:16] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile@confbridge:1] NoOp("SIP/ast2_g722-00000001", "") in new stack
[Feb 21 22:28:16] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile@confbridge:2] ConfBridge("SIP/ast2_g722-00000001", "1,,user_profile,user_menu") in new stack
[Feb 21 22:28:26] VERBOSE[18929][C-00000001] file.c: -- <SIP/ast2_g722-00000001> Playing 'conf-onlyone.gsm' (language 'en')
[Feb 21 22:28:47] VERBOSE[18929][C-00000001] file.c: -- <SIP/ast2_g722-00000001> Playing 'confbridge-join.gsm' (language 'en')
[Feb 21 22:28:48] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'confbridge-join.gsm' (language 'en')
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '2' received on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin passthrough '2' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '2' received on SIP/ast2_g722-00000001, duration 100 ms
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end accepted with begin '2' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '2' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '0' received on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin ignored '0' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '0' received on SIP/ast2_g722-00000001, duration 100 ms
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '0' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '1' received on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin ignored '1' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '1' received on SIP/ast2_g722-00000001, duration 100 ms
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '1' on SIP/ast2_g722-00000001
[Feb 21 22:28:55] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'conf-hasleft.gsm' (language 'en')
[Feb 21 22:28:57] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'confbridge-leave.gsm' (language 'en')
[Feb 21 22:28:58] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile@confbridge:3] Hangup("SIP/ast2_g722-00000001", "") in new stack