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