[Freeswitch-users] Fetching gateways via mod_curl_xml

Kamil Nigmatullin kamil.nigmatullin at gmail.com
Thu Aug 21 21:54:09 MSD 2014


now I return this but it doesn't work either.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="configuration">
<configuration name="sofia.conf" description="Core Configuration">
<profile name="external">
<gateways>
<gateway name="supernode">
<param name="username" value="supernode"/>
<param name="realm" value="188.138.xx.xx:5060"/>
<param name="password" value="xxxx"/>
<param name="register" value="false"/>
<param name="proxy" value="188.138.xx.xx:5060"/>
<param name="caller-id-in-from" value="true"/>
<param name="dtmf-type" value="inband"/>
<param name="rtp-timeout-sec" value="30"/>
<param name="from-domain" value="188.138.xx.xx:5060"/>
<param name="NDLB-sendrecv-in-session" value="true"/>
<param name="vad" value="none"/>
<param name="rtp-ip" value="188.138.xx.xx"/>
<param name="sip-ip" value="188.138.xx.xx"/>
<param name="extension-in-contact" value="true"/>
<param name="rtp-autoflush-during-bridge" value="true"/>
<param name="user-agent-string" value="SBC"/>
<param name="NDLB-sendrecv-in-session" value="true"/>
<param name="inbound-late-negotiation" value="false"/>
</gateway>
</gateways>
<domains>
<domain name="all" alias="false" parse="true"/>
</domains>
<settings>
<param name="debug" value="0"/>
<param name="sip-trace" value="no"/>
<param name="sip-capture" value="no"/>
<param name="rfc2833-pt" value="101"/>
<param name="sip-port" value="$${external_sip_port}"/>
<param name="dialplan" value="XML"/>
<param name="context" value="public"/>
<param name="dtmf-duration" value="2000"/>
<param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
<param name="outbound-codec-prefs" value="$${outbound_codec_prefs}"/>
<param name="hold-music" value="$${hold_music}"/>
<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="inbound-late-negotiation" value="true"/>
<param name="inbound-zrtp-passthru" value="true"/>
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="auto-nat"/>
<param name="ext-sip-ip" value="auto-nat"/>
<param name="rtp-timeout-sec" value="300"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
<param name="tls" value="$${external_ssl_enable}"/>
<param name="tls-only" value="false"/>
<param name="tls-bind-params" value="transport=tls"/>
<param name="tls-sip-port" value="$${external_tls_port}"/>
<param name="tls-passphrase" value=""/>
<param name="tls-verify-date" value="true"/>
<param name="tls-verify-policy" value="none"/>
<param name="tls-verify-depth" value="2"/>
<param name="tls-verify-in-subjects" value=""/>
<param name="tls-version" value="$${sip_tls_version}"/>
</settings>
</profile>
</configuration>
</section>
</document>



2014-08-21 23:16 GMT+06:00 Kamil Nigmatullin <kamil.nigmatullin at gmail.com>:

> Thanks Bernard and Brian.
> Bernard, I actually do not register this gateway anywhere but FS requires
> to put some password in sip profile. Anyway thanks.
>
> Brian, you mean that I must return not only gateway but everything that is
> in sip_profiles directory? So if I understand correctly,
> instead of X-PRE-PROCESS I have to put all gateways each in <gateway>
> section?
>  <!-- This profile is only for outbound registrations to providers -->
>   <gateways>
>     <X-PRE-PROCESS cmd="include" data="external/*.xml"/>
>   </gateways>
>
> Thanks again for your support
>
>
> 2014-08-21 21:05 GMT+06:00 Brian West <brian at freeswitch.org>:
>
> You have to return the ENTIRE sofia config with gateways and such for this
>> to work.
>>
>>
>> On Thu, Aug 21, 2014 at 8:03 AM, Bernhard Wendel <
>> bernhard at sessionbird.com> wrote:
>>
>>>  Hi Kamil,
>>>
>>> you are telling FreeSWITCH to add a gateway, but not registering it.
>>> I've highlighted the 2 occasions in the quote.
>>> Try it again, but this time set the register-param to *true*.
>>>
>>> Regards,
>>> Bernhard
>>>
>>>
>>> Am 21.08.2014 00:38, schrieb Kamil Nigmatullin:
>>>
>>>  Could anyone please help. I want to fetch gateways(sip_profiles) with
>>> mod_curl_xml. This is what I respond via http
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>>> <document type="freeswitch/xml">
>>> <section name="configuration">
>>>   <configuration name="sofia.conf" description="Core Configuration">
>>>     <profile name="external">
>>>       <gateways>
>>>         <gateway name="supernode1">
>>>            <param name="username" value="supernode"/>
>>>            <param name="realm" value="188.138.xx.xx:5060"/>
>>>            <param name="password" value="xxxx"/>
>>> *           <param name="register" value="false"/>*
>>>            <param name="proxy" value="188.138.xx.xx:5060"/>
>>>            <param name="caller-id-in-from" value="true"/>
>>>            <param name="dtmf-type" value="inband"/>
>>>            <param name="rtp-timeout-sec" value="30"/>
>>>            <param name="from-domain" value="188.138.xx.xx:5060"/>
>>> *           <param name="register" value="false"/>*
>>>            <param name="NDLB-sendrecv-in-session" value="true"/>
>>>            <param name="vad" value="none"/>
>>>            <param name="rtp-ip" value="188.138.xx.xx"/>
>>>            <param name="sip-ip" value="188.138.xx.xx"/>
>>>            <param name="extension-in-contact" value="true"/>
>>>            <param name="rtp-autoflush-during-bridge" value="true"/>
>>>            <param name="user-agent-string" value="SBC"/>
>>>            <param name="NDLB-sendrecv-in-session" value="true"/>
>>>            <param name="inbound-late-negotiation" value="false"/>
>>>         </gateway>
>>>      </gateways>
>>>    </profile>
>>> </configuration>
>>> </section>
>>> </document>
>>>
>>>  I see that FS requests and read this XML(each line ended by \r\n)
>>> without reporting any errors, but gateway does not appears at sofia status.
>>> Is there anything wrong in that XML Block?
>>>
>>>  Thanks in advance.
>>>
>>> --
>>> Kamil Nigmatullin
>>>
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services: consulting at freeswitch.orghttp://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.com
>>>
>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>>>
>>> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://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
>>>
>>
>>
>>
>> --
>>
>> *Brian West*
>> brian at freeswitch.org
>>
>>
>> *Twitter: @FreeSWITCH , @briankwest*
>> http://www.freeswitchbook.com
>> http://www.freeswitchcookbook.com
>>
>> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
>> *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
>>
>> _________________________________________________________________________
>> 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
>>
>
>
>
> --
> Kamil Nigmatullin
> Manager
> Tel: 77272323748
> mob: 7 777 2517003
> ICQ: 31008382
> Skype: Kamil Nigmatullin
>



-- 
Kamil Nigmatullin
Manager
Tel: 77272323748
mob: 7 777 2517003
ICQ: 31008382
Skype: Kamil Nigmatullin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140821/8cb0d4ff/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list