call-direction extension not working (?)

Status
Not open for further replies.

czbg

Member
Sep 27, 2018
33
1
8
When call hits call-direction extension, it's always empty and thus set as "local". I've tried to find out the reason but I'm not sure I got this right. I found out that FS sets the variable "direction", so I inserted another extension before "call-direction":

Code:
<extension name="call-direction-main" continue="true" uuid="1356c4c2-76fc-4985-a04e-16870968291b">
    <condition field="" expression="">
        <action application="set" data="call_direction=${direction}" inline="true"/>
    </condition>
</extension>

inline=true is probably not needed. Am I missing something here? What else should set the call_direction variable?
 

JamesBorne

Active Member
Jan 24, 2019
294
56
28
Australia
I'm not sure what you're trying to accomplish here.
FusionPBX already has a 'call-direction' dialplan. Mine looks like:

Code:
<extension name="call-direction" continue="true" uuid="9ec9dd34-7ab3-4dbc-bdec-d1a35d02e8f5">
    <condition field="${call_direction}" expression="^(inbound|outbound|local)$" break="never">
        <anti-action application="export" data="call_direction=local"/>
    </condition>
</extension>
 

czbg

Member
Sep 27, 2018
33
1
8
yes, but it's never set. it's always empty and thus set as "local" by the call-direction extension. I don't know what should set call-direction variable? I used info application and I saw that there was "direction" variable set, so I just set call-direction to direction, so now, when call hits call-direction extension, it is set. Hope I made myself clear?
 
Status
Not open for further replies.