Small optimization with intercept. (#2892)
In cluster installation first node search channel uuid and send it inside special SIP header. So other node can just use it and do not call Lua script again.
This commit is contained in:
parent
cc85d17a13
commit
76b60325ae
|
|
@ -1,6 +1,12 @@
|
|||
<context name="{v_context}">
|
||||
<extension name="group-intercept" number="*8" continue="false" app_uuid="15332e83-12f5-44d3-8472-633736eb4b9b">
|
||||
<condition field="destination_number" expression="^\*8$">
|
||||
<condition field="destination_number" expression="^\*8$"/>
|
||||
<!-- if it is call from another node then needed UUID already in sip header -->
|
||||
<!-- So we can just do intercept without calling Lua script again on current node -->
|
||||
<condition field="${sip_h_X-intercept_uuid}" expression="^(.+)$" break="on-true">
|
||||
<action application="intercept" data="$1"/>
|
||||
</condition>
|
||||
<condition>
|
||||
<action application="answer"/>
|
||||
<action application="lua" data="intercept_group.lua"/>
|
||||
</condition>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
<context name="{v_context}">
|
||||
<extension name="intercept-ext" number="**[ext]" continue="false" app_uuid="2b7b2f82-edfe-4339-8cc5-7d0cf36e1e68">
|
||||
<condition field="destination_number" expression="^\*\*(\d+)$">
|
||||
<condition field="destination_number" expression="^\*\*(\d+)$" break="on-true">
|
||||
<action application="answer"/>
|
||||
<action application="lua" data="intercept.lua $1"/>
|
||||
</condition>
|
||||
<condition field="destination_number" expression="^\*\*$"/>
|
||||
<condition field="${sip_h_X-intercept_uuid}" expression="^(.+)$" break="on-true">
|
||||
<action application="intercept" data="$1"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</context>
|
||||
Loading…
Reference in New Issue