[asterisk-bugs] [JIRA] (ASTERISK-28394) sip_outbound_publish_client_add_publisher Failed assertion bad magic number
Rhys Hanrahan (JIRA)
noreply at issues.asterisk.org
Wed Apr 24 06:35:47 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rhys Hanrahan updated ASTERISK-28394:
-------------------------------------
Description:
I have set device state from the dialplan on Asterisk (e.g. used for a manual "night switch" BLF) and have that published to an external "event compositor" - Kamailio in this case.
I have configured Asterisk 14's new "publishing extension state feature" to publish device state changes outbound to Kamailio. When using this feature I am getting the following errors. I can trigger this error on demand every time I issue "dialplan reload" in Asterisk.
{code}
[Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher: FRACK!, Failed assertion invalid container v_table (0)
[Apr 24 21:18:38] -- Time to scan old dialplan and merge leftovers back into the new: 0.000281 sec
[Apr 24 21:18:38] -- Time to restore hints and swap in new dialplan: 0.000011 sec
[Apr 24 21:18:38] -- Time to delete the old dialplan: 0.000228 sec
[Apr 24 21:18:38] -- Total time merge_contexts_delete: 0.000520 sec
[Apr 24 21:18:38] -- pbx_config successfully loaded 48 contexts (enable debug for details).
[Apr 24 21:18:38] ERROR[16956]: Got 16 backtrace records
# 0: [0x558fc2e315e3] asterisk utils.c:2404 __ast_assert_failed()
# 1: [0x558fc2cad4b0] asterisk astobj2_container.c:252 internal_ao2_traverse()
# 2: [0x558fc2cada05] asterisk astobj2_container.c:414 __ao2_callback()
# 3: [0x558fc2cadabd] asterisk astobj2_container.c:437 __ao2_find()
# 4: [0x7f0212a187f9] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher()
# 5: [0x7f0212a188aa] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:578 ast_sip_publish_client_get_user_from_uri()
# 6: [0x7f021058fd18] res_pjsip_exten_state.so res_pjsip_exten_state.c:655 exten_state_publisher_cb()
# 7: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
# 8: [0x558fc2e24fc1] asterisk threadpool.c:1351 execute_tasks()
# 9: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
#10: [0x558fc2e229ec] asterisk threadpool.c:367 threadpool_execute()
#11: [0x558fc2e2478a] asterisk threadpool.c:1134 worker_active()
#12: [0x558fc2e244fa] asterisk threadpool.c:1054 worker_start()
#13: [0x558fc2e2e492] asterisk utils.c:1249 dummy_start()
#14: [0x7f028329a6db] libpthread.so.0 pthread_create.c:463 start_thread()
#15: [0x7f028248388f] libc.so.6 clone.S:97 clone()
[Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:1093 sip_outbound_publish_client_add_publisher: FRACK!, Failed assertion invalid container v_table (0)
[Apr 24 21:18:38] ERROR[16956]: Got 15 backtrace records
# 0: [0x558fc2e315e3] asterisk utils.c:2404 __ast_assert_failed()
# 1: [0x558fc2cad10f] asterisk astobj2_container.c:109 __ao2_link()
# 2: [0x7f0212a1a612] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:1093 sip_outbound_publish_client_add_publisher()
# 3: [0x7f0212a1881b] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:563 sip_outbound_publish_client_get_publisher()
# 4: [0x7f0212a188aa] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:578 ast_sip_publish_client_get_user_from_uri()
# 5: [0x7f021058fd18] res_pjsip_exten_state.so res_pjsip_exten_state.c:655 exten_state_publisher_cb()
# 6: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
# 7: [0x558fc2e24fc1] asterisk threadpool.c:1351 execute_tasks()
# 8: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
# 9: [0x558fc2e229ec] asterisk threadpool.c:367 threadpool_execute()
#10: [0x558fc2e2478a] asterisk threadpool.c:1134 worker_active()
#11: [0x558fc2e244fa] asterisk threadpool.c:1054 worker_start()
#12: [0x558fc2e2e492] asterisk utils.c:1249 dummy_start()
#13: [0x7f028329a6db] libpthread.so.0 pthread_create.c:463 start_thread()
#14: [0x7f028248388f] libc.so.6 clone.S:97 clone()
[Apr 24 21:18:38] WARNING[16956]: res_pjsip_exten_state.c:658 exten_state_publisher_cb: PUBLISH client 'pub_user' has no from_uri or server_uri defined.
[Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher: FRACK!, Failed assertion bad magic number 0x0 for object 0x7f0270236ba0 (0)
{code}
This repeats a number of times on each dialplan reload.
It is also worth noting that with this publishing configured the feature does NOT publish device state changes as soon as they are executed in the dialplan. I have to manually reload the dialplan and this seems to "alert" Asterisk to the fact that new data must be published.
So ironically, even though the dialplan reload triggers all these errors, it actually also triggers the updated state to be published.
I'm including relevant config below.
In pjsip.conf:
{code}
; SBC Nodes - SBC5-SYD-01
; -----------------------
[SBC5-SYD-01]
type = aor
contact = sip:12.34.56.53
qualify_frequency = 10
maximum_expiration = 600
minimum_expiration = 30
default_expiration = 3600
[SBC5-SYD-01]
type = identify
endpoint = SBC5-SYD-01
match = 12.34.56.53
[SBC5-SYD-01]
type = endpoint
context = from-sbc
dtmf_mode = rfc4733
rtp_timeout = 60
direct_media = no
inband_progress = yes
from_domain = 12.34.56.51
tos_audio = af41
tos_video = af41
cos_audio = 5
cos_video = 4
disallow = all
allow = g722
allow = alaw
allow = ulaw
sdp_session = Blah
tone_zone = au
aors = SBC5-SYD-01
t38_udptl = yes
t38_udptl_ec = fec
; Add NAT settings
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
[pub_user]
type=outbound-publish
server_uri=sip:12.34.56.53
from_uri=sip:12.34.56.51
event=dialog
multi_user=yes
@body=application/dialog-info+xml
@context=__internal$
{code}
In my dialplan:
{code}
[nexusone__internal]
; I have auto hints turned off while I am trying to get this to work.
; I prefixed the hint with the customer name "nexusone" as I am doing some header re-writing of the PUBLISH packets when they reach Kamailio.
exten => nexusone*6200,hint,Custom:*6200 at nexusone
exten => _*62XX,1,GoSub(subToggle,s,1(${EXTEN:3},${CUSTOMER}))
; This is my dialplan code to allow me to toggle *6200
; All of this code is already used in production right now. So it fundamentally works, it's just the publishing of state that is causing this bug.
; ARG1 - Toggle extension
; ARG2 - Toggle customer / context
[subToggle]
; Nightswitch Toggle On/Off
exten => s,1,Answer()
exten => s,n,Playback(beep)
exten => s,n,Set(ODBC_CALL_FORWARD_TOGGLE(${ARG1},${ARG2})=0)
exten => s,n,Set(TOGGLE=${ODBC_CALL_FORWARD_TOGGLE(${ARG1},${ARG2})})
exten => s,n,GotoIf($["${TOGGLE}" = "0" ]?off:on)
; Toggled off
exten => s,n(off),Set(DEVICE_STATE(Custom:*62${ARG1}@${ARG2})=NOT_INUSE)
exten => s,n,Hangup()
exten => s,n(on),Set(DEVICE_STATE(Custom:*62${ARG1}@${ARG2})=BUSY)
exten => s,n,Hangup()
{code}
was:
I have set device state from the dialplan on Asterisk (e.g. used for a manual "night switch" BLF) and have that published to an external "event compositor" - Kamailio in this case.
I have configured Asterisk 14's new "publishing extension state feature" to publish device state changes outbound to Kamailio. When using this feature I am getting the following errors. I can trigger this error on demand every time I issue "dialplan reload" in Asterisk.
[Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher: FRACK!, Failed assertion invalid container v_table (0)
[Apr 24 21:18:38] -- Time to scan old dialplan and merge leftovers back into the new: 0.000281 sec
[Apr 24 21:18:38] -- Time to restore hints and swap in new dialplan: 0.000011 sec
[Apr 24 21:18:38] -- Time to delete the old dialplan: 0.000228 sec
[Apr 24 21:18:38] -- Total time merge_contexts_delete: 0.000520 sec
[Apr 24 21:18:38] -- pbx_config successfully loaded 48 contexts (enable debug for details).
[Apr 24 21:18:38] ERROR[16956]: Got 16 backtrace records
# 0: [0x558fc2e315e3] asterisk utils.c:2404 __ast_assert_failed()
# 1: [0x558fc2cad4b0] asterisk astobj2_container.c:252 internal_ao2_traverse()
# 2: [0x558fc2cada05] asterisk astobj2_container.c:414 __ao2_callback()
# 3: [0x558fc2cadabd] asterisk astobj2_container.c:437 __ao2_find()
# 4: [0x7f0212a187f9] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher()
# 5: [0x7f0212a188aa] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:578 ast_sip_publish_client_get_user_from_uri()
# 6: [0x7f021058fd18] res_pjsip_exten_state.so res_pjsip_exten_state.c:655 exten_state_publisher_cb()
# 7: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
# 8: [0x558fc2e24fc1] asterisk threadpool.c:1351 execute_tasks()
# 9: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
#10: [0x558fc2e229ec] asterisk threadpool.c:367 threadpool_execute()
#11: [0x558fc2e2478a] asterisk threadpool.c:1134 worker_active()
#12: [0x558fc2e244fa] asterisk threadpool.c:1054 worker_start()
#13: [0x558fc2e2e492] asterisk utils.c:1249 dummy_start()
#14: [0x7f028329a6db] libpthread.so.0 pthread_create.c:463 start_thread()
#15: [0x7f028248388f] libc.so.6 clone.S:97 clone()
[Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:1093 sip_outbound_publish_client_add_publisher: FRACK!, Failed assertion invalid container v_table (0)
[Apr 24 21:18:38] ERROR[16956]: Got 15 backtrace records
# 0: [0x558fc2e315e3] asterisk utils.c:2404 __ast_assert_failed()
# 1: [0x558fc2cad10f] asterisk astobj2_container.c:109 __ao2_link()
# 2: [0x7f0212a1a612] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:1093 sip_outbound_publish_client_add_publisher()
# 3: [0x7f0212a1881b] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:563 sip_outbound_publish_client_get_publisher()
# 4: [0x7f0212a188aa] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:578 ast_sip_publish_client_get_user_from_uri()
# 5: [0x7f021058fd18] res_pjsip_exten_state.so res_pjsip_exten_state.c:655 exten_state_publisher_cb()
# 6: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
# 7: [0x558fc2e24fc1] asterisk threadpool.c:1351 execute_tasks()
# 8: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
# 9: [0x558fc2e229ec] asterisk threadpool.c:367 threadpool_execute()
#10: [0x558fc2e2478a] asterisk threadpool.c:1134 worker_active()
#11: [0x558fc2e244fa] asterisk threadpool.c:1054 worker_start()
#12: [0x558fc2e2e492] asterisk utils.c:1249 dummy_start()
#13: [0x7f028329a6db] libpthread.so.0 pthread_create.c:463 start_thread()
#14: [0x7f028248388f] libc.so.6 clone.S:97 clone()
[Apr 24 21:18:38] WARNING[16956]: res_pjsip_exten_state.c:658 exten_state_publisher_cb: PUBLISH client 'pub_user' has no from_uri or server_uri defined.
[Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher: FRACK!, Failed assertion bad magic number 0x0 for object 0x7f0270236ba0 (0)
This repeats a number of times on each dialplan reload.
It is also worth noting that with this publishing configured the feature does NOT publish device state changes as soon as they are executed in the dialplan. I have to manually reload the dialplan and this seems to "alert" Asterisk to the fact that new data must be published.
So ironically, even though the dialplan reload triggers all these errors, it actually also triggers the updated state to be published.
I'm including relevant config below.
In pjsip.conf:
; SBC Nodes - SBC5-SYD-01
; -----------------------
[SBC5-SYD-01]
type = aor
contact = sip:12.34.56.53
qualify_frequency = 10
maximum_expiration = 600
minimum_expiration = 30
default_expiration = 3600
[SBC5-SYD-01]
type = identify
endpoint = SBC5-SYD-01
match = 12.34.56.53
[SBC5-SYD-01]
type = endpoint
context = from-sbc
dtmf_mode = rfc4733
rtp_timeout = 60
direct_media = no
inband_progress = yes
from_domain = 12.34.56.51
tos_audio = af41
tos_video = af41
cos_audio = 5
cos_video = 4
disallow = all
allow = g722
allow = alaw
allow = ulaw
sdp_session = Blah
tone_zone = au
aors = SBC5-SYD-01
t38_udptl = yes
t38_udptl_ec = fec
; Add NAT settings
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
[pub_user]
type=outbound-publish
server_uri=sip:12.34.56.53
from_uri=sip:12.34.56.51
event=dialog
multi_user=yes
@body=application/dialog-info+xml
@context=__internal$
In my dialplan:
[nexusone__internal]
; I have auto hints turned off while I am trying to get this to work.
; I prefixed the hint with the customer name "nexusone" as I am doing some header re-writing of the PUBLISH packets when they reach Kamailio.
exten => nexusone*6200,hint,Custom:*6200 at nexusone
exten => _*62XX,1,GoSub(subToggle,s,1(${EXTEN:3},${CUSTOMER}))
; This is my dialplan code to allow me to toggle *6200
; All of this code is already used in production right now. So it fundamentally works, it's just the publishing of state that is causing this bug.
; ARG1 - Toggle extension
; ARG2 - Toggle customer / context
[subToggle]
; Nightswitch Toggle On/Off
exten => s,1,Answer()
exten => s,n,Playback(beep)
exten => s,n,Set(ODBC_CALL_FORWARD_TOGGLE(${ARG1},${ARG2})=0)
exten => s,n,Set(TOGGLE=${ODBC_CALL_FORWARD_TOGGLE(${ARG1},${ARG2})})
exten => s,n,GotoIf($["${TOGGLE}" = "0" ]?off:on)
; Toggled off
exten => s,n(off),Set(DEVICE_STATE(Custom:*62${ARG1}@${ARG2})=NOT_INUSE)
exten => s,n,Hangup()
exten => s,n(on),Set(DEVICE_STATE(Custom:*62${ARG1}@${ARG2})=BUSY)
exten => s,n,Hangup()
> sip_outbound_publish_client_add_publisher Failed assertion bad magic number
> ---------------------------------------------------------------------------
>
> Key: ASTERISK-28394
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28394
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: pjproject/pjsip
> Affects Versions: 16.2.1
> Environment: - Running Asterisk 16.2.1 compiled from source as the PBX. With PJSIP
> - Using Kamailio 5.2.2 as event compositor and handset SBC.
> - Both systems running on Ubuntu 18.04 LTS.
> - IP .53 is the Kamailio SBC
> - IP .51 is the asterisk PBX
> Reporter: Rhys Hanrahan
> Labels: pjsip
>
> I have set device state from the dialplan on Asterisk (e.g. used for a manual "night switch" BLF) and have that published to an external "event compositor" - Kamailio in this case.
> I have configured Asterisk 14's new "publishing extension state feature" to publish device state changes outbound to Kamailio. When using this feature I am getting the following errors. I can trigger this error on demand every time I issue "dialplan reload" in Asterisk.
> {code}
> [Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher: FRACK!, Failed assertion invalid container v_table (0)
> [Apr 24 21:18:38] -- Time to scan old dialplan and merge leftovers back into the new: 0.000281 sec
> [Apr 24 21:18:38] -- Time to restore hints and swap in new dialplan: 0.000011 sec
> [Apr 24 21:18:38] -- Time to delete the old dialplan: 0.000228 sec
> [Apr 24 21:18:38] -- Total time merge_contexts_delete: 0.000520 sec
> [Apr 24 21:18:38] -- pbx_config successfully loaded 48 contexts (enable debug for details).
> [Apr 24 21:18:38] ERROR[16956]: Got 16 backtrace records
> # 0: [0x558fc2e315e3] asterisk utils.c:2404 __ast_assert_failed()
> # 1: [0x558fc2cad4b0] asterisk astobj2_container.c:252 internal_ao2_traverse()
> # 2: [0x558fc2cada05] asterisk astobj2_container.c:414 __ao2_callback()
> # 3: [0x558fc2cadabd] asterisk astobj2_container.c:437 __ao2_find()
> # 4: [0x7f0212a187f9] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher()
> # 5: [0x7f0212a188aa] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:578 ast_sip_publish_client_get_user_from_uri()
> # 6: [0x7f021058fd18] res_pjsip_exten_state.so res_pjsip_exten_state.c:655 exten_state_publisher_cb()
> # 7: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
> # 8: [0x558fc2e24fc1] asterisk threadpool.c:1351 execute_tasks()
> # 9: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
> #10: [0x558fc2e229ec] asterisk threadpool.c:367 threadpool_execute()
> #11: [0x558fc2e2478a] asterisk threadpool.c:1134 worker_active()
> #12: [0x558fc2e244fa] asterisk threadpool.c:1054 worker_start()
> #13: [0x558fc2e2e492] asterisk utils.c:1249 dummy_start()
> #14: [0x7f028329a6db] libpthread.so.0 pthread_create.c:463 start_thread()
> #15: [0x7f028248388f] libc.so.6 clone.S:97 clone()
> [Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:1093 sip_outbound_publish_client_add_publisher: FRACK!, Failed assertion invalid container v_table (0)
> [Apr 24 21:18:38] ERROR[16956]: Got 15 backtrace records
> # 0: [0x558fc2e315e3] asterisk utils.c:2404 __ast_assert_failed()
> # 1: [0x558fc2cad10f] asterisk astobj2_container.c:109 __ao2_link()
> # 2: [0x7f0212a1a612] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:1093 sip_outbound_publish_client_add_publisher()
> # 3: [0x7f0212a1881b] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:563 sip_outbound_publish_client_get_publisher()
> # 4: [0x7f0212a188aa] res_pjsip_outbound_publish.so res_pjsip_outbound_publish.c:578 ast_sip_publish_client_get_user_from_uri()
> # 5: [0x7f021058fd18] res_pjsip_exten_state.so res_pjsip_exten_state.c:655 exten_state_publisher_cb()
> # 6: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
> # 7: [0x558fc2e24fc1] asterisk threadpool.c:1351 execute_tasks()
> # 8: [0x558fc2e1b100] asterisk taskprocessor.c:992 ast_taskprocessor_execute()
> # 9: [0x558fc2e229ec] asterisk threadpool.c:367 threadpool_execute()
> #10: [0x558fc2e2478a] asterisk threadpool.c:1134 worker_active()
> #11: [0x558fc2e244fa] asterisk threadpool.c:1054 worker_start()
> #12: [0x558fc2e2e492] asterisk utils.c:1249 dummy_start()
> #13: [0x7f028329a6db] libpthread.so.0 pthread_create.c:463 start_thread()
> #14: [0x7f028248388f] libc.so.6 clone.S:97 clone()
> [Apr 24 21:18:38] WARNING[16956]: res_pjsip_exten_state.c:658 exten_state_publisher_cb: PUBLISH client 'pub_user' has no from_uri or server_uri defined.
> [Apr 24 21:18:38] ERROR[16956]: res_pjsip_outbound_publish.c:561 sip_outbound_publish_client_get_publisher: FRACK!, Failed assertion bad magic number 0x0 for object 0x7f0270236ba0 (0)
> {code}
> This repeats a number of times on each dialplan reload.
> It is also worth noting that with this publishing configured the feature does NOT publish device state changes as soon as they are executed in the dialplan. I have to manually reload the dialplan and this seems to "alert" Asterisk to the fact that new data must be published.
> So ironically, even though the dialplan reload triggers all these errors, it actually also triggers the updated state to be published.
> I'm including relevant config below.
> In pjsip.conf:
> {code}
> ; SBC Nodes - SBC5-SYD-01
> ; -----------------------
> [SBC5-SYD-01]
> type = aor
> contact = sip:12.34.56.53
> qualify_frequency = 10
> maximum_expiration = 600
> minimum_expiration = 30
> default_expiration = 3600
> [SBC5-SYD-01]
> type = identify
> endpoint = SBC5-SYD-01
> match = 12.34.56.53
> [SBC5-SYD-01]
> type = endpoint
> context = from-sbc
> dtmf_mode = rfc4733
> rtp_timeout = 60
> direct_media = no
> inband_progress = yes
> from_domain = 12.34.56.51
> tos_audio = af41
> tos_video = af41
> cos_audio = 5
> cos_video = 4
> disallow = all
> allow = g722
> allow = alaw
> allow = ulaw
> sdp_session = Blah
> tone_zone = au
> aors = SBC5-SYD-01
> t38_udptl = yes
> t38_udptl_ec = fec
> ; Add NAT settings
> rtp_symmetric = yes
> force_rport = yes
> rewrite_contact = yes
> [pub_user]
> type=outbound-publish
> server_uri=sip:12.34.56.53
> from_uri=sip:12.34.56.51
> event=dialog
> multi_user=yes
> @body=application/dialog-info+xml
> @context=__internal$
> {code}
> In my dialplan:
> {code}
> [nexusone__internal]
> ; I have auto hints turned off while I am trying to get this to work.
> ; I prefixed the hint with the customer name "nexusone" as I am doing some header re-writing of the PUBLISH packets when they reach Kamailio.
> exten => nexusone*6200,hint,Custom:*6200 at nexusone
> exten => _*62XX,1,GoSub(subToggle,s,1(${EXTEN:3},${CUSTOMER}))
> ; This is my dialplan code to allow me to toggle *6200
> ; All of this code is already used in production right now. So it fundamentally works, it's just the publishing of state that is causing this bug.
> ; ARG1 - Toggle extension
> ; ARG2 - Toggle customer / context
> [subToggle]
> ; Nightswitch Toggle On/Off
> exten => s,1,Answer()
> exten => s,n,Playback(beep)
> exten => s,n,Set(ODBC_CALL_FORWARD_TOGGLE(${ARG1},${ARG2})=0)
> exten => s,n,Set(TOGGLE=${ODBC_CALL_FORWARD_TOGGLE(${ARG1},${ARG2})})
> exten => s,n,GotoIf($["${TOGGLE}" = "0" ]?off:on)
> ; Toggled off
> exten => s,n(off),Set(DEVICE_STATE(Custom:*62${ARG1}@${ARG2})=NOT_INUSE)
> exten => s,n,Hangup()
> exten => s,n(on),Set(DEVICE_STATE(Custom:*62${ARG1}@${ARG2})=BUSY)
> exten => s,n,Hangup()
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list