I want to make my local freeswitch communicate with the cloud freeswitch server. I am running recording application on local freeswitch and playing application on cloud.
Both of them are getting invoked by origination command but my recording app is not able to record wav files played by cloud application.
I used following command On fs_cli:
originate loopback/126/default &bridge(sofia/internal/1235#192.168.0.130)
<include>
<extension name="Dial to dialplan in cloud">
<condition field="destination_number" expression="^126$">
<action application="answer"/>
<action application="bridge" data="sofia/internal/121#54.225.247.53"/>
</condition>
</extension>
</include>
Did you look at the SIP traffic with wireshark?
It seems that you're connecting to port 5060 on 54.225.247.53. But 5060 is only used for authenticated INVITE's.
Unauthenticated INVITE's are accepted by port 5080.
So, you need to decide first if you want authenticated calls, then who makes the authentication, then configure the Sofia gateways accordingly.
Related
I am trying to record mobile traffic through jmeter but not getting success. Can anyone please help.
Steps followed as below:
In JMeter added recording template and Setting port to 9090 in
recorder
In mobile below configuration done
Change wifi with the below setting: Proxy mode set to manual Given
hostname = localhost (laptop) ip address Port = 8888 Installed JMeter
security certificate and verified it under trusted credential in
mobile
Starting recording in JMeter
Launching any site i.e. google on mobile
Getting error “You are offline”
The ports must match, given you Setting port to 9090 in recorder you need to use the port 9090 in your mobile device network proxy configuration.
Also if you're running Android 6.0 or higher you will need to take some extra steps in order to be able to intercept secure traffic like:
In application element of your app manifest add the next line:
android:networkSecurityConfig="#xml/network_security_config"
Create network_security_config.xml file under your app resources folder and put the following code there:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
Build your application in debug mode
gradlew assembleDebug
Install the .apk onto your device
That's it, you should be able to record now
More information:
Android network security config
Recording Using Android Devices
I am trying to connect to couchbase running on Amazon EC2. I can connect it by public URL exposed from Amazon or IP address, but every time I try to connect from the code, it throws a timeout exception.
What I have done is:
I set a configuration
<couchbaseClients>
<couchbase useSsl="false">
<servers>
<add uri="http://PUBLIC-IP-ADDRESS:8091/pools"></add>
</servers>
<buckets>
<add name="default" useSsl="false" password="">
<connectionPool name="custom" maxSize="10" minSize="5"></connectionPool>
</add>
</buckets>
</couchbase>
Then while opening cluster I put there a configuration name
new Cluster("couchbaseClients/couchbase");
Also, I found somewhere I need to open a set of ports. I did inbound rules for all the ports I found to allow for all clients (any IP address).
What am I doing wrong?
Exception is:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond PUBLIC-IP-ADDRESS:11210
Port 11210 is opened, I'm able to telnet.
Also, I am able to connect to couchbase`s console.
Ok, the resolution was quite simple. During installation of Couchbase i was wrongly specifying Server Hostname - a local one
I have a solution that contains a website and a Windows Azure Cloud Service Project. Here is the ServiceDefinition.csdef:
...
<WebRole name="FrontEndWeb" vmsize="Small">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="http" port="2996" />
</Endpoints>
...
</WebRole>
...
I have the web-debug settings set to: Visual Studio Development Server & Auto Assign Ports
When I run the Windows Azure Cloud Service Project, I get the following message in my General Output log: Windows Azure Tools: Warning: Remapping private port 2996 to 2997 in role 'FrontEndWeb' to avoid conflict during emulation.
It is imperative that the site run on port 2996 due to a host validation requirement.
Things I've tried:
Manually specifying the port for the web for Visual Studio Development Server
Using IIS Express with the exact port I'm aiming for
Things I do NOT have:
IIS installed on my computer
Why is the Azure Cloud Emulator remapping the ports, and what can I do to prevent it from doing that?
It might be possible that some other application is already running on 2996. Try to run nestat command from dos prompt and see which applications are running on which port?
Without the intention of "digging old graves" but if it's for others' benefit. I found myself in the same situation and managed to get around it without "feeling gross".
I noticed that when MSBuild is applying the transformations to the ServiceDefinition.csdef file, this file was not really just copied from the solution folder to the output folder. Instead it was being parsed and re-emitted. This transformation was however not without subtle side effects. Notice this difference:
<!-- the .csdef file in the solution -->
<InputEndpoint name="Endpoint1" protocol="http" port="8080" />
<!-- the .csdef file after MSBuild -->
<InputEndpoint name="Endpoint1" protocol="http" port="8080" localport="8080" />
Notice the extra localport attribute. As you know web roles have an internal and a public endpoint (one in front, one after the load balancer) and these ports seem to be managed by these attributes. By default only the port attribute is generated when creating a new project - thus the confusion.
When deploying the package to the emulator, CSPack needs to avoid using the same port for these two endpoints, thus re-routing the internal one.
The simple fix is to manually add the localport attribute in the .csdef file and specify a port value different from the public (or any other) one.
Have the same problem. But I don't have IIS installed, don't have Web Matrix and don't have anything listening the port 80 before.
So when I start debugging, I see "remapping from port 80 to 81". However emulator starts my webrole listening on port 80. That wouldn't be problem, but in my code I have the following code for constructing links:
int port = HttpContext.Current.Request.Url.Port;
if (port != 80 && port != 443)
{
uri.Append(":");
uri.Append(port.ToString());
}
So when I start debugging and open my site in browser entering http:// localhost, strangely I have all my links pointing to the http://localhost:81.
Again, webrole endpoint is on port 80.
After the debugging start I see that DevFC listens on port 80, but System process (image path points to the ntoskrnl) listens port 81.
What's happening?
The Azure Compute Emulator simulates the entire Azure fabric, including the load balancer and multiple instances. Because of this, forcing specific IPs onto the Emulator is tricky business, as the Emulator will remap the VIP (virtual IP address) to simulate the Azure platform.
This article http://blogs.staykov.net/2013/05/windows-azure-basicscompute-emulator.html explains in detail the emulator environment.
It sounds like you need that port to satisfy an external requirement; have you considered running your app in debug mode outside the emulator? You can launch it in a standard IIS Express instance and control the endpoints using the IIS Express .config files, and then deploy normally to Azure for production.
In my case i had my web application with the property SSL Enabled set to "True" and i didn't have a endpoint in my Web Role Cloud settings for Https.
Open your Web Role settings and in the left hand side menu click on the third menu called Endpoints and add an endpoint for Https. Now click on Configuration tab and you will see a section "Startup action". Uncheck HTTP endpoint and check HTTPS endpoint.
I struggled with this issue for some time and annoyingly the solution was to restart my computer.
I created an instance on EC2 and installed JBoss. I edited the standalone.xml like so:
<interface name="management">
<inet-address value="0.0.0.0"/>
</interface>
<interface name="public">
<inet-address value="0.0.0.0"/>
</interface>
Also, I enabled port 8080 for incoming tcp traffic in iptables and also added a rule to the EC2 security group config via the EC2 management console.
I verified the deployment is working fine by logging in to the server via ssh and I did:
lynx http://localhost:8080
I can see my web app running. But when I access the same from a browser using the public DNS given to me via amazon <my public DNS>:8080 I don't see anything. The browser cannot find anything.
Do I absolutely need to have an EIP on EC2 mapped to my instance so that my web app is accessible via the Internet?
Any pointers in the right direction would be very helpful.
Thanks.
I figured out what the problem was. It was iptables. I stopped the service using:
service iptables stop
It worked!
I realized I don't need iptables running on my EC2 host as amazon has security groups in place which act like a "firewall" anyway.
PS: I am not sure if this qualifies as an answer but wanted to put my answer here anyway as it might help others with similar issues.
I am attempting to post data from an Android application running in the Android Emulator on my local machine to a web application running under IIS Express also running on my local machine. Unfortunately, when I post to 10.0.2.2 from the emulator I receive a Host Not Found error message.
If I configure the web application to run under ASP.NET Dev Server (Cassini) instead of IIS Express the Android application is able to post with no problems. What configuration am I missing for IIS Express that is preventing it from working with a loopback from the Android emulator?
Grant yourself permission to bind to network adapters other than localhost, and configure IIS express to bind to all adapters.
IIS Express will then accept connections from the Android emulator via 10.0.2.2. If you add a rule to the firewall, you can also expose IIS Express to your network, which decreases security but is useful for testing physical devices.
Step details: (they assume a port number of 5555 - use your actual port instead)
Run this from a command prompt as Administrator:
netsh http add urlacl url=http://*:5555/ user="NT AUTHORITY\INTERACTIVE"
In %USERPROFILE%\Documents\IISExpress\config\applicationhost.config, replace your site's localhost binding with bindingInformation="*:5555:*". The result should look like this:
<site name="..." id="...">
<!-- application settings omitted for brevity -->
<bindings>
<binding protocol="http" bindingInformation="*:5555:*" />
</bindings>
</site>
Add following line to IIs config file (ex c:\Users[YourName]\Documents\IISExpress\config\applicationhost.config ) Change the port 8085 if required..
<binding protocol="http" bindingInformation="*:8085:127.0.0.1" />
so your config file will end-up with something like this
<bindings>
<binding protocol="http" bindingInformation="*:4396:localhost" /> // the existing one
<binding protocol="http" bindingInformation="*:8085:127.0.0.1" /> // new line
</bindings>
now you can call your web service from remote by calling to port 8085
ex from android emu.
new HttpPost("http://10.0.2.2:8085");
By default, IIS Express only accepts connections from localhost. To enable connections from remote devices (and the emulator counts as such), use the instructions from here.
In short:
netsh http add urlacl url=http://[machinename]:[port]/ user=everyone
netsh http delete urlacl url=http://[machinename]:[port]/
Replace [machinename] and [port] with your computer name (or non-local IP) and port IIS Express runs on.
Also, see this question and this one.
Here is my solution:
I am using Visual Studio Express 2013 for Web and my RESTful web service is running on IIS express.
When I tried to access my web service using an Android emulator in the same machine it gave me this invalid hostname error. As suggested by above answers I did add new bindings to my applicationhost.config file but still it didn't work. At last, I was able to fix this issue by running Visual Studio "as administrator".
You need to add a new binding for your PC name or change a binding to *:<port>:* or :<port>: and then allow that port using Windows Firewall with Advanced Security.
File to look into is <solution folder>\.vs\<project name>\config\applicationhost.config around line 167