I looked in mod_openzap.c and I didn't see any references to channel variables. However, you have context and dialplan options. I suggest that you create a dialplan context just for your FXS port(s). Try this. Create conf/dialplan/fxs-ports.xml:
<include>
<context name="fxs-ports">
<extension name="outbound">
<condition field="destination_number" expression="^(.*)$">
<action application="set" data="toll_allow=local,domestic,international"/>
<action application="transfer" data="$1 XML default"/>
</condition>
</extension>
</context>
</include>
Then in your openzap.conf.xml change the context for the analog span(s) with the FXS ports:
<param name="context" value="default"/>
Restart FS after making these changes and then give it a shot. You should see the call from the analog phone going into context "fxs-ports" and then get transferred over to the default context where it will act like your SIP phones because we manually set the ${toll_allow} chan var.
-MC
Michael Collins wrote:Hi, Michael,
> Variables set in the directory/default/xxxx.xml files apply to users
> who make authenticated calls through FS. Generally those will be SIP
> phones.
>
> Let's back up a step. What problem are you trying to solve, i.e., why
> is it that you need to set the toll_allow variable? What endpoint is
> making an openzap call?
>
> -MC
I have multiple sip phone that are working fine. When I dial a 10 digit
number they connect with my sip provider and place the call. The
openzap configured phone gets dial tone and can call other extensions,
however when I dial a 10 digit number it gives me a busy. In the log I
see it appears to be failing on the toll_allow test:
Dialplan: OpenZAP/1:1/7707190068 parsing [default->local_call]
continue=false
Dialplan: OpenZAP/1:1/7707190068 Regex (FAIL) [local_call]
${toll_allow}() =~ /local/ break=on-false
Dialplan: OpenZAP/1:1/7707190068 parsing [default->domestic_call]
continue=false
Dialplan: OpenZAP/1:1/7707190068 Regex (FAIL) [domestic_call]
${toll_allow}() =~ /domestic/ break=on-false
Dialplan: OpenZAP/1:1/7707190068 parsing
[default->international.example.com] continue=false
Dialplan: OpenZAP/1:1/7707190068 Regex (FAIL)
[international.example.com] ${toll_allow}() =~ /international/
break=on-false
This is the area when it should be placing the call, I belive. When
placing a call from a sip phone I see:
Dialplan: sofia/internal/1003@192.168.2.51 parsing [default->local_call]
continue=false
Dialplan: sofia/internal/1003@192.168.2.51 Regex (PASS) [local_call]
${toll_allow}(domestic,international,local) =~ /local/ break=on-false
Dialplan: sofia/internal/1003@192.168.2.51 Regex (PASS) [local_call]
destination_number(7707190068) =~ /^(\d{10})$/ break=on-false
Dialplan: sofia/internal/1003@192.168.2.51 Action
set(effective_caller_id_number=${outbound_caller_id_number})
Dialplan: sofia/internal/1003@192.168.2.51 Action
set(effective_caller_id_name=${outbound_caller_id_name})
Dialplan: sofia/internal/1003@192.168.2.51 Action
set(continue_on_fail=true)
Dialplan: sofia/internal/1003@192.168.2.51 Action
bridge(sofia/gateway/${default_gateway}/7707190068)
I simply want this extension to be able to dial out. The configuration
is 99% default.
Thanks,
Jim.
> <mailto:jim@k4gvo.com>> wrote:> <mailto:FreeSWITCH-users@lists.freeswitch.org>
>
> I obviously need to set a <variable name="toll_allow"
> value="domestic,international,local"/> somewhere but I can't
> figure out
> what file to put it in. The examples all show it in the
> directory/default/xxxx.xml files but those appear to be sip only. In
> any event creating files in that directory for my extension did
> nothing
> to help the problem.
>
> The only places I have the extension mentioned is in the openzap.conf
> file and dialplan/default/00_incoming-1.xml. Adding a <variables ...
> element to the latter does nothing.
>
> How do I set that variable? Or where?
>
> Thanks,
> Jim.
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> ------------------------------------------------------------------------
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org