FusionPBX Public Context - Routing local extensions registered from Internet on port 5080 - freeswitch

I am basically trying to call a local extension in a single domain - simbauc.com
Out of the box it works but that's only because endpoints will be on the LAN so they register on port 5060 and use the default context. But when any of my endpoints register from the outside they use port 5080 and that automatically puts them in public context.
What I need to be able to do is call local extensions for my endpoints that register from the Internet on port 5080. I can get this to work in regular FreeSWITCH but not in FusionPBX.
I get a no route error even after creating a dial plan in Dial Plan Manager.
Below is a sample of what i have configured:
<extension name="SIMBAUC.COM_Local_Extension">
<condition field="destination_number" expression="^(10[01][0-9])$">
<action application="log" data="CRIT SIMBAUC.COM Someone Dialed $1"/>
<action application="export" data="dialed_extension=$1"/>
<action application="bridge" data="user/${dialed_extension}#simbauc.com"/>
<action application="answer"/>
<action application="sleep" data="1000"/>
<action application="bridge" data="loopback/app=voicemail:default
${simbauc.com${dialed_extension}"/>
</condition>
</extension>

The external profile is anonymous and doesn't actually handle registrations by default. You would either register to 5060 or you could copy the internal profile call it something like internal-5070 change the port to 5070 and set the dial_string in default settings to enabled. Hit reload on the default settings page and then run Advanced -> Upgrade -> App Defaults.

Related

ClickHouse Question For DB::Exception URL “XXX” is not allowed in config.xml

I use the remote function to import data from remote servers in another clickhouse cluster, when I use the sql like :
INSERT INTO dataplugin.ods_stb_info_all_local
SELECT evtTime,evtCode,pVer,sdkVer,sdkSortId,stbID,manufacturer,model,cpName,macAddress,wifiMacAddress,romVer,apkVer,accessMethod,provinceCode,cityCode,now() as writeTime
FROM remote('xxx.xxx.xxx.xxx:19000','dataplugin','ods_stb_info_all','default','');
the error happens like this:
Code: 491. DB::Exception: Received from localhost:9000. DB::Exception: URL "xxx.xx.xxx.xxx:19000" is not allowed in config.xml.
I really can not understand what happened, I wish for someone's helps
It needs to define remote_url_allow_hosts-section in config.xml:
<yandex>
<!-- The list of hosts allowed to use in URL-related storage engines and table functions.
If this section is not present in configuration, all hosts are allowed.
-->
<remote_url_allow_hosts>
<!-- Host should be specified exactly as in URL. The name is checked before DNS resolution.
Example: "yandex.ru", "yandex.ru." and "www.yandex.ru" are different hosts.
If port is explicitly specified in URL, the host:port is checked as a whole.
If host specified here without port, any port with this host allowed.
"yandex.ru" -> "yandex.ru:443", "yandex.ru:80" etc. is allowed, but "yandex.ru:80" -> only "yandex.ru:80" is allowed.
If the host is specified as IP address, it is checked as specified in URL. Example: "[2a02:6b8:a::a]".
If there are redirects and support for redirects is enabled, every redirect (the Location field) is checked.
-->
<!-- Regular expression can be specified. RE2 engine is used for regexps.
Regexps are not aligned: don't forget to add ^ and $. Also don't forget to escape dot (.) metacharacter
(forgetting to do so is a common source of error).
-->
</remote_url_allow_hosts>
</yandex>
Example from test test_allowed_url_from_config:
<remote_url_allow_hosts>
<host>host:80</host>
<host_regexp>^[a-z]*\.ru$</host_regexp>
</remote_url_allow_hosts>
Steps:
open config.xm for editing
sudo nano /etc/clickhouse-server/config.d/config.xml
define the required settings
config.xml:
<yandex>
..
<remote_url_allow_hosts>..</remote_url_allow_hosts>
..
</yandex>
restart service to apply settings
sudo service clickhouse-server restart

Issue in recording script using Jmeter in Android

In JMeter, use Templates > Recording
Unfold Workbench > HTTP(S) Test Script Recorder and start recorder
A certificate authority file is generated in jmeter/bin folder called ApacheJMeterTemporaryRootCA.crt
Install it in Android
Connected my device in to desktop by advance setting in wifi
But its not recording my action in desktop.............
How to find whether my device is connected but desktop?
First use JMeter Recording Template
Then start JMeter's HTTP(S) Test Script Recorder, it will generate in jmeter/bin folder, a file called ApacheJMeterTemporaryRootCA.crt .
Copy file to your android device and install it as CA Certificate.
See How do I install a user certificate? thread for more details.
The certificate has limited life time (defaults to 7 days) but you can extend it by setting in user.properties
proxy.cert.validity=Number of days
Now the problem you'll face in Android >= 7.0 is that applications only use by default System installed Certificates.
So you'll need to ask developper of application to modify the APK, see why here.
Edit manifest and add :
android:networkSecurityConfig="#xml/network_security_config"
You'll get:
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="#xml/network_security_config"
... >
...
</application>
</manifest>
Then add in res/xml/network_security_config.xml this:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<!-- Trust preinstalled CAs -->
<certificates src="system" />
<!-- Additionally trust user added CAs -->
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
Note that this is needed whatever tool you use (Neoload, LoadRunner, ...)
For full details read:
https://www.ubik-ingenierie.com/blog/how-to-record-android-application-using-https-traffic-jmeter/

Freeswitch update profile using mod_xml_curl

I am currently working on a project that updates profiles on a freeswitch server, using mod_xml_cur.
My problem is the following
My project is a selfhosted owin webapi that creates a profile and when requested uses owin to create an xml that should be loaded by freeswitch.
when i use the command "sofia profile test start" it fetches the profile(named test) from my owin url.
on the Console I see "Reload XML [succes]
but then it states [WARNING] sofia.c:5603 No Such Profile 'test'
the downloaded XML file is in /tmp with a temporary name .
And when I rename it and move it to /etc/freeswitch/sip_profiles#
and start it again, it loads the profile.
My understanding is that using mod_xml_curl the profile should load from memory when the xml is opened from my owin url.
What am I doing wrong here?
<document type="freeswitch/xml">
<section name="configuration">
<profiles>
<profile name="Your profile name">
<gateways>
<gateway name="Your gateway name">
<param name="username" value="Your username"/>
<settings>

MOD_OREKA configuration on Freeswitch

Has anyone successfully configured mod_oreka? I have been trying but for some reasons control doesn't pass into the module.
Thanks!
Just did, and stumbled upon your question by googling for something else (related).
Here's what I did:
cd into my freeswitch source directory, in src/mod/applications/mod_oreka and then make && make install, since it wasn't compiled by default the first time.
edit the configuration for the module, inside your freeswitch installation directory, open conf/autoload_configs/oreka.conf.xml and add:
<param name="sip-server-addr" value="1.1.1.1"/>
<param name="sip-server-port" value="59150"/>
Get into the fs_cli and do reload mod_oreka or just restart freeswitch
In your calls, make sure to start the application oreka for every call you want to record:
<action application="oreka_record"/>
These instructions were useful and are the official reference for the module: https://freeswitch.org/confluence/display/FREESWITCH/mod_oreka
Hope it helps!

servicestack hello failed to load http handler

I am following the Hello Web Service tutorial on ServiceStack.net. I get the message below when trying to access the service:
Failed to load httpHandler type `ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack'
I am using xsp which I started in my working directory for the project with the default values (i.e.: port 8080). I edited the web.config in this directory as documented in the tutorial.
How does the service find the http handler? Using xsp on port 8080 will I be able to open the metadata page?
The web.config which is in the same directory as the app contains:
<configuration>
<!-- Required for MONO -->
<system.web>
<httpHandlers>
<add path="servicestack*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
</httpHandlers>
</system.web>
<!-- Required for IIS7 -->
<system.webServer>
<!-- ServiceStack: Required -->
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>
As mentioned I'm working with Mono and xsp. I now realize that in my working directory, MonoDevelop not only created web.config but also a bin directory which contains all of the dlls that I created and referenced in my project.
Setting xsp root directory to the path containing the web.config and ./bin enabled the http handler to be found and allowed me to finally access my web service and
http://localhost:8080/ServiceStack/metadata
In this scenario I did not need my dlls to be in /bin but in the project's bin
I had also overlooked the call to HelloAppHost().Init()
Bit of a learning curve... but I'm looking forward to using ServiceStack.
Thank you #mythz and #Mr.Young
I think your configuration might be incorrect. You might have mixed up the configuration with the configuration for using ServiceStack with an existing web framework.
The basic configuration for hosting ServiceStack at the root (/) path without any other web frameworks is
<system.web>
<httpHandlers>
<add path="*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
</httpHandlers>
</system.web>
Remove the servicestack* from the path and the IIS specific stuff. It's possible your running into the VERY uncool bug in Mono ASP.NET implementation of virtual paths, details here: https://groups.google.com/d/msg/servicestack/kzfS88RldIU/LsJ2jV9M2LIJ

Resources