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:<br>
<br><span style="font-family: courier new,monospace;"><include></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <context name="fxs-ports"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <extension name="outbound"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <condition field="destination_number" expression="^(.*)$"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <action application="set" data="toll_allow=local,domestic,international"/></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <action application="transfer" data="$1 XML default"/></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </condition></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </extension></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </context></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></include></span><br style="font-family: courier new,monospace;">
<br>Then in your openzap.conf.xml change the context for the analog span(s) with the FXS ports:<br><span style="font-family: courier new,monospace;"><param name="context" value="default"/></span><br style="font-family: courier new,monospace;">
<br>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.<br>
<br>-MC<br><br><div class="gmail_quote">On Sun, Apr 4, 2010 at 4:48 AM, Jim <span dir="ltr"><<a href="mailto:jim@k4gvo.com">jim@k4gvo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Michael Collins wrote:<br>
> Variables set in the directory/default/xxxx.xml files apply to users<br>
> who make authenticated calls through FS. Generally those will be SIP<br>
> phones.<br>
><br>
> Let's back up a step. What problem are you trying to solve, i.e., why<br>
> is it that you need to set the toll_allow variable? What endpoint is<br>
> making an openzap call?<br>
><br>
> -MC<br>
</div>Hi, Michael,<br>
<br>
I have multiple sip phone that are working fine. When I dial a 10 digit<br>
number they connect with my sip provider and place the call. The<br>
openzap configured phone gets dial tone and can call other extensions,<br>
however when I dial a 10 digit number it gives me a busy. In the log I<br>
see it appears to be failing on the toll_allow test:<br>
<br>
Dialplan: OpenZAP/1:1/7707190068 parsing [default->local_call]<br>
continue=false<br>
Dialplan: OpenZAP/1:1/7707190068 Regex (FAIL) [local_call]<br>
${toll_allow}() =~ /local/ break=on-false<br>
Dialplan: OpenZAP/1:1/7707190068 parsing [default->domestic_call]<br>
continue=false<br>
Dialplan: OpenZAP/1:1/7707190068 Regex (FAIL) [domestic_call]<br>
${toll_allow}() =~ /domestic/ break=on-false<br>
Dialplan: OpenZAP/1:1/7707190068 parsing<br>
[default-><a href="http://international.example.com" target="_blank">international.example.com</a>] continue=false<br>
Dialplan: OpenZAP/1:1/7707190068 Regex (FAIL)<br>
[<a href="http://international.example.com" target="_blank">international.example.com</a>] ${toll_allow}() =~ /international/<br>
break=on-false<br>
<br>
This is the area when it should be placing the call, I belive. When<br>
placing a call from a sip phone I see:<br>
<br>
Dialplan: sofia/internal/<a href="mailto:1003@192.168.2.51">1003@192.168.2.51</a> parsing [default->local_call]<br>
continue=false<br>
Dialplan: sofia/internal/<a href="mailto:1003@192.168.2.51">1003@192.168.2.51</a> Regex (PASS) [local_call]<br>
${toll_allow}(domestic,international,local) =~ /local/ break=on-false<br>
Dialplan: sofia/internal/<a href="mailto:1003@192.168.2.51">1003@192.168.2.51</a> Regex (PASS) [local_call]<br>
destination_number(7707190068) =~ /^(\d{10})$/ break=on-false<br>
Dialplan: sofia/internal/<a href="mailto:1003@192.168.2.51">1003@192.168.2.51</a> Action<br>
set(effective_caller_id_number=${outbound_caller_id_number})<br>
Dialplan: sofia/internal/<a href="mailto:1003@192.168.2.51">1003@192.168.2.51</a> Action<br>
set(effective_caller_id_name=${outbound_caller_id_name})<br>
Dialplan: sofia/internal/<a href="mailto:1003@192.168.2.51">1003@192.168.2.51</a> Action<br>
set(continue_on_fail=true)<br>
Dialplan: sofia/internal/<a href="mailto:1003@192.168.2.51">1003@192.168.2.51</a> Action<br>
bridge(sofia/gateway/${default_gateway}/7707190068)<br>
<br>
I simply want this extension to be able to dial out. The configuration<br>
is 99% default.<br>
<br>
Thanks,<br>
Jim.<br>
<div class="im">><br>
> On Sat, Apr 3, 2010 at 12:17 PM, Jim <<a href="mailto:jim@k4gvo.com">jim@k4gvo.com</a><br>
</div><div class="im">> <mailto:<a href="mailto:jim@k4gvo.com">jim@k4gvo.com</a>>> wrote:<br>
><br>
> I obviously need to set a <variable name="toll_allow"<br>
> value="domestic,international,local"/> somewhere but I can't<br>
> figure out<br>
> what file to put it in. The examples all show it in the<br>
> directory/default/xxxx.xml files but those appear to be sip only. In<br>
> any event creating files in that directory for my extension did<br>
> nothing<br>
> to help the problem.<br>
><br>
> The only places I have the extension mentioned is in the openzap.conf<br>
> file and dialplan/default/00_incoming-1.xml. Adding a <variables ...<br>
> element to the latter does nothing.<br>
><br>
> How do I set that variable? Or where?<br>
><br>
> Thanks,<br>
> Jim.<br>
><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
</div>> <mailto:<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>><br>
<div class="im">> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
</div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>