You've cut out a fair amount of data, but I think I see at least one issue:<div><br></div><div><meta charset="utf-8"><condition field="${variable_sip_gateway}" expression="sofia/gateway/sip69250"></div>
<div><br></div><div>Do you have a channel variable that is named "variable_sip_gateway"? More likely you have a channel variable named "sip_gateway". Try rewriting the above line like this:</div><div><br>
</div><div><meta charset="utf-8"><condition field="${sip_gateway}" expression="sip69250$"></div><div><br></div><div>The only thing I'm not sure about is whether or not "sip_gateway" is populated at the time the dialplan is parsed. Without seeing the info dump I can't offer any other suggestions.</div>
<div><br></div><div>-MC<br><br><div class="gmail_quote">On Wed, Mar 2, 2011 at 12:46 PM, Andreas Tuerpe <span dir="ltr"><<a href="mailto:andreas@tuerpe-net.de">andreas@tuerpe-net.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hallo Michael, Johannes and Meftah<br>
<br>
here is...<br>
-------------------------------<br>
--- start trace log extract ---<br>
<br>
INVITE sip:gw+sip69250@188.246.xxx.xxx:5080;transport=udp SIP/2.0<br>
Via: SIP/2.0/UDP 82.139.xxx.x:5060;branch=z9hG4bK2fa2cd41;rport<br>
From: "+491758301234" <sip:+491758301234@82.139.xxx.x>;tag=as20cd750d<br>
To: <sip:gw+sip69250@188.246.xxx.xxx:5080;transport=udp><br>
Contact: <sip:+491758301234@82.139.xxx.x><br>
Call-ID: 2637b63a2411697f7af5f089732a68eb@82.139.xxx.x<br>
CSeq: 102 INVITE<br>
User-Agent: PTY SIPPort<br>
<br>
...<br>
<br>
# the only advice to the inbound channel<br>
# -> 'sip69250' is the 2. gateway name<br>
[INFO] mod_dialplan_xml.c:252 Processing +491758301234->sip69250 in<br>
context public<br>
<br>
<br>
Dialplan: sofia/external/+491758301234@82.139.xxx.x parsing<br>
[public->unloop] continue=false<br>
...<br>
# 'public_extensions' is the 1. extension name in public context<br>
Dialplan: sofia/external/+<a href="mailto:491758302577@82.139.223.1">491758302577@82.139.223.1</a> parsing<br>
[public->public_extensions] continue=false<br>
# my test of condition assignment with ${variable_sip_gateway} fails<br>
Dialplan: ... ... Regex (FAIL) [public_extensions]<br>
${variable_sip_gateway}() =~ /sofia/gateway/sip69250/ break=on-false<br>
...<br>
# '4932229982781' is the 2. extension name in public context<br>
Dialplan: sofia/external/+491758301234@82.139.xxx.x parsing<br>
[public->4932229982781] continue=false<br>
# empty condition assignment run's without any errors<br>
Dialplan: sofia/external/+491758301234@82.139.xxx.x Regex (PASS)<br>
[4932229982781] () =~ // break=on-false<br>
Dialplan: sofia/external/+491758301234@82.139.xxx.x Action transfer(1001<br>
XML default)<br>
...<br>
#all others run's without any errors<br>
...<br>
---- end trace log extract ----<br>
-------------------------------<br>
<br>
<br>
# code of first extension name<br>
<extension name="public_extensions"><br>
<condition field="${variable_sip_gateway}"<br>
expression="sofia/gateway/sip69250"><br>
<action application="transfer" data="1004 XML default"/><br>
</condition><br>
</extension><br>
<br>
# code of second extension name<br>
<extension name="4932229982781"><br>
<condition field="" expression=""><br>
<action application="transfer" data="1001 XML default"/><br>
</condition><br>
</extension><br>
<br>
<br>
I'm unsure with syntax of condition variable esp. expression="?"<br>
<br>
Thanks<br>
Andreas<br>
<br>
<br>
<br>
Am 02.03.2011 00:07, schrieb Michael Collins:<br>
> The FS on pfSense is pretty old, but if all you are working on is a<br>
> simple routing issue your best bet is to add the "info" app in the<br>
> public context. Somewhere near the top of public.xml just add this:<br>
><br>
> <extension name="quick info dump" continue="true"><br>
> <condition><br>
> <action application="info"/><br>
> </condition><br>
> </extension><br>
><br>
> Save that, press F6 (or do reloadxml) and then make a test inbound call.<br>
> Watch the console - you'll see a TON of information. Look through the<br>
> pieces of data that are displayed. You should be able to find something<br>
> to key off of. Once you've done that then go read up on creating your<br>
> dialplan here:<br>
><br>
> <a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Condition" target="_blank">http://wiki.freeswitch.org/wiki/Dialplan_XML#Condition</a><br>
><br>
> In fact, that whole page is important in understanding the XML dialplan.<br>
> I would read it more than once.<br>
><br>
> -MC<br>
><br>
> On Tue, Mar 1, 2011 at 11:16 AM, Andreas Tuerpe <<a href="mailto:andreas@tuerpe-net.de">andreas@tuerpe-net.de</a><br>
> <mailto:<a href="mailto:andreas@tuerpe-net.de">andreas@tuerpe-net.de</a>>> wrote:<br>
><br>
> Hallo FreeSWITCH Users,<br>
><br>
> I use FS V.0.9.6 on pfSense<br>
> see on -> [<a href="http://doc.pfsense.org/index.php/FreeSWITCH" target="_blank">http://doc.pfsense.org/index.php/FreeSWITCH</a>]<br>
><br>
> Symptom:<br>
> German ISP "Portunity" forward inbound calls without any<br>
> destination_number.<br>
><br>
><br>
> ISP solution tip:<br>
> FS to register over a second sip account to the provider twice.<br>
> Any account has a separate number.<br>
> Based on the channel over which the call come in, I have to decide which<br>
> number is called.<br>
><br>
> So I need help, which condition assignment must use - howto ???<br>
> - which fields can I use?<br>
> - which syntax I have to use?<br>
><br>
><br>
> <!-- here my intention ... ???<br>
><br>
> <extension name="test_did"><br>
> <condition field="channel over which the call come in"<br>
> expression="sip-account-1"><br>
> <action application="set" data="called_number=111111"/><br>
> <action application="transfer" data="1001 XML default"/><br>
> <condition field="channel over which the call come in"<br>
> expression="sip-account-2"><br>
> <action application="set" data="called_number=222222"/><br>
> <action application="transfer" data="1002 XML default"/><br>
> </condition><br>
> </extension><br>
><br>
> ??? --><br>
><br>
> thanks in advance<br>
> tuerpean<br>
><br>
><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <mailto:<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>
> _______________________________________________<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>
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>
</blockquote></div><br></div>