[Freeswitch-users] Noob question about xml dialplan
Raúl Alexis Betancor Santana
rbetancor at gmail.com
Tue May 16 15:26:12 UTC 2017
Ok, I think the whole point is that I don't undestand how the dialplan
works.
I started from 0 ... now on the sofia.conf.xml I have this:
<configuration name="sofia.conf" description="sofia Endpoint">
<global_settings>
<param name="log-level" value="0"/>
<!-- <param name="auto-restart" value="false"/> -->
<param name="debug-presence" value="0"/>
</global_settings>
<profiles>
<profile name="fax">
<gateways>
<X-PRE-PROCESS cmd="include" data="../gateways/*.xml"/>
</gateways>
<domains>
<domain name="all" alias="false" parse="false"/>
</domains>
<settings>
<param name="debug" value="0"/>
<param name="shutdown-on-fail" value="true"/>
<param name="sip-trace" value="no"/>
<param name="sip-capture" value="yes"/>
<param name="capture-server"
value="udp:$${homer_ip}:$${homer_port};hep=3;capture_id=2001"/>
<param name="rfc2833-pt" value="101"/>
<!--<param name="enable-rfc-5626" value="true"/> -->
<param name="t38-trace" value="true"/>
<param name="dialplan" value="XML"/>
<param name="context" value="incoming"/>
<param name="dtmf-duration" value="2000"/>
<param name="codec-prefs" value="PCMU"/>
<param name="disable-hold" value="true"/>
<param name="rtp-timer-name" value="soft"/>
<param name="local-network-acl" value="localnet.auto"/>
<param name="manage-presence" value="false"/>
<param name="inbound-codec-negotiation" value="generous"/>
<param name="nonce-ttl" value="60"/>
<param name="auth-calls" value="false"/>
<param name="disable-register" value="true"/>
<param name="inbound-late-negotiation" value="false"/>
<param name="inbound-zrtp-passthru" value="false"/>
<param name="sip-port" value="5060"/>
<param name="rtp-ip" value="$${sofia_ip}"/>
<param name="sip-ip" value="$${sofia_ip}"/>
<param name="ext-rtp-ip" value="$${sofia_ip}"/>
<param name="ext-sip-ip" value="$${sofia_ip}"/>
<param name="rtp-timeout-sec" value="300"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
<param name="tls" value="false"/>
<param name="tls-only" value="false"/>
<param name="tls-bind-params" value="transport=tls"/>
<param name="tls-sip-port" value="5061"/>
<!-- Location of the agent.pem and cafile.pem ssl certificates
(needed for TLS server) -->
<param name="tls-cert-dir" value="$${base_dir}/conf/ssl"/>
<param name="tls-passphrase" value=""/>
<param name="tls-verify-date" value="true"/>
<!-- set to 'in' to only verify incoming connections, 'out' to
only verify outgoing connections, 'all' to verify all connections, also
'in_subjects', 'out_subjects' and 'all_subjects' for subject validation.
Multiple policies can be split with a '|' pipe -->
<param name="tls-verify-policy" value="none"/>
<param name="tls-verify-depth" value="2"/>
<!-- If the tls-verify-policy is set to subjects_all or
subjects_in this sets which subjects are allowed, multiple subjects can be
split with a '|' pipe -->
<param name="tls-verify-in-subjects" value=""/>
<!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may
not work with TLSv1 -->
<param name="tls-version" value="tlsv1"/>
</settings>
</profile>
</profiles>
</configuration>
Then on the t38_transconde.xml file I have this.
<include>
<context name="incoming">
<extension name="t38_transcode">
<condition field="destination_number"
expresion="^(\+1|1)?([2-9]\d\d[2-9]\d{6})$">
<action application="set" data="fax_enable_t38=true"/>
<action application="set" data="sip_execute_on_image=t38_gateway peer
nocng"/>
<action application="bridge"
data="sofia/external/$1$2@$${external_sip_proxy}"/>
</condition>
</extension>
</context>
</include>
I could see on the /var/log/freeswitch/freeswitch.xml.fsxml file that the
t38_transcode.xml file its included ... but still get the same error on on
the console, so something terrible wrong I'm missing here ... :-(
Also ... it's possible to directly send the calls sofia/$1$2@$${external} ?
... I mean, sending the call directly to a URI, with username/password and
so on ... instead of having to define a profile for it.
2017-05-16 16:13 GMT+01:00 David Villasmil <david.villasmil.work at gmail.com>:
> No, you may be sending it to the right ports, but the profile attached to
> that port must have the context set to the correct dialplan.
>
> I just did exactly what you're doing and i also got "No Route, Aborting"
>
> I've never seen this type of "dialplan" value, tbh
>
> <param name="dialplan" value="XML:/etc/freeswitch/dia
> lplans/t38_transcode.xml"/>
>
>
> Regards,
>
> David Villasmil
> email: david.villasmil.work at gmail.com
> phone: +34669448337 <+34%20669%2044%2083%2037>
>
> On Tue, May 16, 2017 at 3:30 PM, Raúl Alexis Betancor Santana <
> rbetancor at gmail.com> wrote:
>
>> Only one profile defined on the sofia.conf.xml and I'm sending the
>> traffict to the wright ports, if not I whould get the logs on the console,
>> as that are the only ports enabled.
>>
>> 2017-05-16 14:22 GMT+01:00 David Villasmil <david.villasmil.work at gmail.co
>> m>:
>>
>>> Take a look at your profile, it should be listening on the port you're
>>> sending to, and must have the context parameter set to your dialplan name.
>>> On Tue, May 16, 2017 at 3:15 PM Raúl Alexis Betancor Santana <
>>> rbetancor at gmail.com> wrote:
>>>
>>>>
>>>> Hi all, till now I'm been working with pre-made setup files for FS, and
>>>> now I'm trying to get a deep knowleadge of how the dialplan works.
>>>>
>>>> So I modifed my autoload_configs/sofia.conf.xml file and changed my
>>>> dialplan param to something like this:
>>>>
>>>> <param name="dialplan" value="XML:/etc/freeswitch/dia
>>>> lplans/t38_transcode.xml,inline:socket:127.0.0.1:8022 async full"/>
>>>>
>>>> The Idea is that it loads another .xml file especific task and also use
>>>> a dialplan throught a socket to a daemon that handle the rest.
>>>>
>>>> On my t38_transcode.xml file ... very simple:
>>>>
>>>> <extension name="t38_transcode">
>>>> <condition field="sip_h_X-T38-Transcode" expresion="^True"/>
>>>> <condition field="destination_number" expresion="^(\+1|1)?([2-9]\d\d
>>>> [2-9]\d{6})$">
>>>> <action application="set" data="fax_enable_t38=true"/>
>>>> <action application="set" data="t38_trace=true"/>
>>>> <action application="set" data="sip_execute_on_image=t38_gateway
>>>> peer nocng"/>
>>>> <action application="bridge" data="sofia/external/$1$2 at proxy.server.tld"/>
>>>>
>>>> </condition>
>>>> </extension>
>>>>
>>>> But If I fire a call to FS like [number]@[FS_IP] from a sip testing
>>>> client I get
>>>>
>>>> [INFO] switch_core_state_machine.c:311 No Route, Aborting
>>>>
>>>> What I'm doing wrong here?
>>>>
>>>> My target its just I want to ANY call that came in with a SIP header of
>>>> X-T39-Transcode=True (market by a sip proxy elsewhere on the net) just do a
>>>> T38->Ulaw transcoding saving the T38 trace, so I could inspect it later.
>>>> The rest of calls coming in ... as they don't have the sip-header
>>>> should end on other app.
>>>>
>>>> For doing the testing I disabled the socket_inline part of the dialplan
>>>> string, so it have only this:
>>>>
>>>> <param name="dialplan" value="XML:/etc/freeswitch/dia
>>>> lplans/t38_transcode.xml"/>
>>>>
>>>> Did I miss something? ... or maybe missundestood who the xml dialplan
>>>> works ?
>>>> ____________________________________________________________
>>>> _____________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://confluence.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/free
>>>> switch-users
>>>> http://www.freeswitch.org
>>>
>>>
>>> ____________________________________________________________
>>> _____________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
> ᐧ
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170516/c538e7d9/attachment-0001.html
More information about the FreeSWITCH-users
mailing list