Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename XIVO_PATH_ID to WAZO_PATH_ID #132

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions dialplan/asterisk/extensions_lib_agents.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Copyright 2006-2024 The Wazo Authors (see the AUTHORS file)
; Copyright 2006-2025 The Wazo Authors (see the AUTHORS file)
; SPDX-License-Identifier: GPL-2.0+

[agentstaticlogin]
Expand All @@ -9,9 +9,9 @@ same = n,Set(WAZO_CONTEXT=${IF(${EXISTS(${WAZO_CONTEXT})}?${WAZO_CONTEXT}:${W
same = n,Set(WAZO_CHANNEL_DIRECTION=to-wazo)
same = n,Gosub(xivo-pickup,0,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_get_options,${WAZO_TENANT_UUID},${ARG1})
same = n,GotoIf($[${XIVO_AGENTEXISTS} != 1]?error_no_such_agent,1)
same = n,GosubIf($["${XIVO_AGENTPASSWD}" != ""]?authenticate,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_login,${WAZO_TENANT_UUID},${XIVO_AGENTID},${WAZO_SRCNUM},${WAZO_CONTEXT})
same = n,GotoIf($[${WAZO_AGENTEXISTS} != 1]?error_no_such_agent,1)
same = n,GosubIf($["${WAZO_AGENTPASSWD}" != ""]?authenticate,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_login,${WAZO_TENANT_UUID},${WAZO_AGENTID},${WAZO_SRCNUM},${WAZO_CONTEXT})
same = n,Goto(status_${XIVO_AGENTSTATUS},1)
same = n,Hangup()

Expand All @@ -20,7 +20,7 @@ same = n,Playback(pbx-invalid)
same = n,Hangup()

exten = authenticate,1,NoOp()
same = n,Authenticate(${XIVO_AGENTPASSWD})
same = n,Authenticate(${WAZO_AGENTPASSWD})
same = n,Return()

exten = status_logged,1,NoOp()
Expand All @@ -42,9 +42,9 @@ same = n,Gosub(xivo-chk_feature_access,s,1)
same = n,Set(WAZO_CHANNEL_DIRECTION=to-wazo)
same = n,Gosub(xivo-pickup,0,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_get_options,${WAZO_TENANT_UUID},${ARG1})
same = n,GotoIf($[${XIVO_AGENTEXISTS} != 1]?error_no_such_agent,1)
same = n,GosubIf($["${XIVO_AGENTPASSWD}" != ""]?authenticate,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_logoff,${WAZO_TENANT_UUID},${XIVO_AGENTID})
same = n,GotoIf($[${WAZO_AGENTEXISTS} != 1]?error_no_such_agent,1)
same = n,GosubIf($["${WAZO_AGENTPASSWD}" != ""]?authenticate,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_logoff,${WAZO_TENANT_UUID},${WAZO_AGENTID})
same = n,Playback(vm-goodbye)
same = n,Hangup()

Expand All @@ -53,7 +53,7 @@ same = n,Playback(pbx-invalid)
same = n,Hangup()

exten = authenticate,1,NoOp()
same = n,Authenticate(${XIVO_AGENTPASSWD})
same = n,Authenticate(${WAZO_AGENTPASSWD})
same = n,Return()


Expand All @@ -62,19 +62,19 @@ exten = s,1,NoOp()
same = n,Gosub(xivo-chk_feature_access,s,1)
same = n,Gosub(xivo-pickup,0,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_get_options,${WAZO_TENANT_UUID},${ARG1})
same = n,GotoIf($[${XIVO_AGENTEXISTS} != 1]?error_no_such_agent,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_get_status,${WAZO_TENANT_UUID},${XIVO_AGENTID})
same = n,GotoIf($[${WAZO_AGENTEXISTS} != 1]?error_no_such_agent,1)
same = n,AGI(agi://${WAZO_AGID_IP}/agent_get_status,${WAZO_TENANT_UUID},${WAZO_AGENTID})
same = n,Goto(login_status_${XIVO_AGENT_LOGIN_STATUS},1)

exten = error_no_such_agent,1,NoOp()
same = n,Playback(pbx-invalid)
same = n,Hangup()

exten = login_status_logged_out,1,NoOp()
same = n,Gosub(agentstaticlogin,s,1(${XIVO_AGENTNUM}))
same = n,Gosub(agentstaticlogin,s,1(${WAZO_AGENTNUM}))

exten = login_status_logged_in,1,NoOp()
same = n,Gosub(agentstaticlogoff,s,1(${XIVO_AGENTNUM}))
same = n,Gosub(agentstaticlogoff,s,1(${WAZO_AGENTNUM}))


[agentcallback]
Expand Down
4 changes: 2 additions & 2 deletions dialplan/asterisk/extensions_lib_did.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Copyright 2006-2024 The Wazo Authors (see the AUTHORS file)
; Copyright 2006-2025 The Wazo Authors (see the AUTHORS file)
; SPDX-License-Identifier: GPL-2.0+

[did]
Expand All @@ -14,7 +14,7 @@ same = n,AGI(agi://${WAZO_AGID_IP}/callerid_forphones)
same = n,UserEvent(ReverseLookup,CHANNEL: ${CHANNEL}${IF($["${XIVO_REVERSE_LOOKUP}" != ""]?,)}${XIVO_REVERSE_LOOKUP})
same = n,Set(WAZO_SRCNUM=${CALLERID(num)})
same = n,AGI(agi://${WAZO_AGID_IP}/incoming_did_set_features)
same = n,UserEvent(Did,WAZO_SRCNUM: ${CALLERID(num)},XIVO_SRCNAME: ${CALLERID(name)},XIVO_EXTENPATTERN: ${XIVO_EXTENPATTERN},CHANNEL: ${CHANNEL},XIVO_SRCTON: ${XIVO_SRCTON},XIVO_SRCRDNIS: ${XIVO_SRCRDNIS})
same = n,UserEvent(Did,WAZO_SRCNUM: ${CALLERID(num)},XIVO_SRCNAME: ${CALLERID(name)},XIVO_EXTENPATTERN: ${XIVO_EXTENPATTERN},CHANNEL: ${CHANNEL},WAZO_SRCTON: ${WAZO_SRCTON},XIVO_SRCRDNIS: ${XIVO_SRCRDNIS})
same = n,CELGenUserEvent(XIVO_INCALL,${WAZO_TENANT_UUID})
same = n,AGI(agi://${WAZO_AGID_IP}/check_schedule)
same = n,GotoIf($["${WAZO_SCHEDULE_STATUS}" = "closed"]?CLOSED,1)
Expand Down
4 changes: 2 additions & 2 deletions dialplan/asterisk/extensions_lib_outcall.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Copyright 2006-2024 The Wazo Authors (see the AUTHORS file)
; Copyright 2006-2025 The Wazo Authors (see the AUTHORS file)
; SPDX-License-Identifier: GPL-2.0+

[outcall]
Expand Down Expand Up @@ -39,7 +39,7 @@ same = n,Gosub(wazo-global-subroutine,s,1)
same = n,CELGenUserEvent(XIVO_OUTCALL)
same = n,Set(CONNECTEDLINE(num,i)=${XIVO_BASE_EXTEN})
same = n,Gosub(wazo-schedule-pre-dial-hooks,s,1)
same = n,Dial(${INTERFACE}/${TRUNKEXTEN}${TRUNKSUFFIX},${XIVO_HANGUPRINGTIME},o(${XIVO_BASE_EXTEN})${WAZO_CALLOPTIONS})
same = n,Dial(${INTERFACE}/${TRUNKEXTEN}${TRUNKSUFFIX},${WAZO_HANGUPRINGTIME},o(${XIVO_BASE_EXTEN})${WAZO_CALLOPTIONS})
same = n,Goto(${DIALSTATUS},1)

exten = ANSWER,1,Hangup()
Expand Down
6 changes: 3 additions & 3 deletions dialplan/asterisk/extensions_lib_queue.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Copyright 2006-2024 The Wazo Authors (see the AUTHORS file)
; Copyright 2006-2025 The Wazo Authors (see the AUTHORS file)
; SPDX-License-Identifier: GPL-2.0+

; params:
Expand All @@ -15,10 +15,10 @@ same = n,Set(WAZO_DSTNUM=${IF(${EXISTS(${WAZO_DSTNUM})}?${WAZO_DSTNUM}:${XIVO
same = n,Set(WAZO_CONTEXT=${IF(${EXISTS(${WAZO_CONTEXT})}?${WAZO_CONTEXT}:${WAZO_BASE_CONTEXT})})
same = n,Set(WAZO_CHANNEL_DIRECTION=to-wazo)
same = n,Set(__WAZO_FWD_REFERER=${IF(${EXISTS(${WAZO_FWD_REFERER})}?${WAZO_FWD_REFERER}:queue:${ARG1})})
same = n,NoOp(PATH=${XIVO_PATH}/${XIVO_PATH_ID})
same = n,NoOp(PATH=${WAZO_PATH}/${WAZO_PATH_ID})
same = n,Gosub(originate-caller-id,s,1)
same = n,AGI(agi://${WAZO_AGID_IP}/incoming_queue_set_features)
same = n,NoOp(PATH=${XIVO_PATH}/${XIVO_PATH_ID})
same = n,NoOp(PATH=${WAZO_PATH}/${WAZO_PATH_ID})

; schedule
same = n,AGI(agi://${WAZO_AGID_IP}/check_schedule)
Expand Down