Getting this error.
asterisk stasis app not active
Dialplan:
same => n,Stasis(example)
My app name is example.js, I checked to make sure it's calling the app:
ari.start('example');
The problem was, I had forgotten to start my app:
node example.js
Related
I have a react-native application running on expo client using npm run android on Android Studio Emulator, WebApi call to get data using fetch works perfectly fine when I disable Enable SSL on the Visual Studio project settings see below, which means it is running on http port 54715, if you see arrow mark I unchecked Enable SSL checkbox
And also I made changes in applicationhost.config file to point my localhost to 127.0.0.1 which is an alias for 10.0.2.2 to connect from Android emulator, see below:
<bindings>
<binding protocol="http" bindingInformation="*:54715:127.0.0.1" />
<binding protocol="http" bindingInformation="*:54715:localhost" />
<binding protocol="https" bindingInformation="*:44367:127.0.0.1" />
</bindings>
So from above if I make fetch call from react native app it is working just fine, see code below:
fetch("http://10.0.2.2:54715/WeatherForecast/getAllProgramTypes")
.then((response) => {
return response.json();
})
.then((data) => {
console.log(data);
})
.catch((err) => {
console.log(err);
});
But the moment I click on EnableSSL on the project properties it would run on https port which is self certified
https://10.0.2.2:44367/WeatherForecast/getAllProgramTypes
https run on 44367 port, and when I make fetch to the web api:
fetch("https://10.0.2.2:44367/WeatherForecast/getAllProgramTypes")
.then((response) => {
return response.json();
})
.then((data) => {
console.log(data);
})
.catch((err) => {
console.log(err);
});
now with https I am getting TypeError: Network request failed, it is unable to make https call on localhost.
I got it working with http when I un-check Enable SSL and run the .Net Core solution but how to make fetch call with local https work ?
When I look at Microsoft docs it says Bypass the certificate security check, how do i do it with react-native code ?
https://learn.microsoft.com/en-us/xamarin/cross-platform/deploy-test/connect-to-local-web-services#bypass-the-certificate-security-check
Ciao unfortunately seems that is not possible to bypass the certificate security check in Javascript.
Possible solution:
Add the self-signed certificate to your root certificate repository on your local machine.
Obtain a valid signed certificate from a free service such as Let's Encrypt.
So, http or https even if it's working on Android Emulator, the question again is how it will work on your iPhone device or an Android device, I mean if you are using Expo Client app to open you react native app, now how do you connect your localhost .NET Core WebApi or any other endpoints on your local machine to your mobile devices to have the app running.
I have a common working solution which works for both emulators and mobile apps on the individual devices.
Step 1: Go to https://ngrok.com/
Step 2: Sign Up, you may use GitHub account
Step 3: Click on Download for windows if you have windows OS and unzip the file, you will
see the .exe, copy that to your desktop or the location you wanted.
Step 4: Go windows explorer and open command prompt on the location where you copied the
exe, run dir to check to see if you have ngrok.exe in the location you are on.
Step 5: Run ngrok authtoken yourTokenGivenDuringSignUp , it’s one-time thing you may need
to do
Step 6: Run ngrok http https://localhost:PortNumber -host-header="localhost:PortNumber" , Port number is the port that your .NET core solution is running, Enable SSL in the project properties we need https for this to work.
Step 7: Copy https link which will be ngrok created https URL which is highlighted, given as below example
Now you can use above link to replace in the fetch url to make the mobile app or Emulators work from your local code.
Note*** We need to be running the ngrok on step 6 & our solution, also url is different every time so run the step 6 and .NET Core solution to generate new web address and use it in the react native app.
Happy Coding :)
I am using Maximo Anywhere 7.5.2.0 - Work Execution App
The issue is , the online - offline login sometime getting failed. The first time of app flashed in the Ipad, I can able to login in the app for the both mode online and offline. After some time I cannot able to login. I got the "The user name and password combination that you entered is not valid" error even it is correct credentials.
I have enclosed the logs here.
Object {errorMsg: "The user name and password combination that you entered is not valid."} "
----------------------------------------
rejected at Object.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/auth/UserAuthenticationManager.js:498:17)
at http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:285161
at _7c0 (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:273376)
at _7ba (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:273240)
at _7d8.reject (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:274951)
at _7c6 (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:274017)
at _7c0 (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:273657)
at _7ba (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:273240)
at _7d8.reject (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:274951)
at AbstractChallengeHandler.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/auth/CustomChallengeHandler.js:98:18)
----------------------------------------
Error
at Promise.then._7cd.then (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:275189)
at declare.loginClickHandler (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/handlers/LoginHandler.js:78:4)
at null.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/ui/control/UserInterface.js:850:47)
at HTMLButtonElement.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:285161)
at Function.on.emit (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:557950)
at null.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/ui/control/UserInterface.js:139:12)
at HTMLFormElement.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:285161)"_1047 # dojo.js:2(anonymous function) # dojo.js:2_142.filter # dojo.js:2_1055 # dojo.js:2
dojo.js:2 Object {responseJSON: Object, status: 401} "
----------------------------------------
rejected at AbstractChallengeHandler.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/auth/CustomChallengeHandler.js:98:18)
at http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:285161
at onLoginFormResponse (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/worklight/worklight.js:9549:5)
at klass.window.WLJSX.Ajax.Request.WLJSX.Class.create.respondToReadyState (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/worklight/worklight.js:1184:28)
at klass.window.WLJSX.Ajax.Request.WLJSX.Class.create.onStateChange (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/worklight/worklight.js:1117:9)
at XMLHttpRequest.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/worklight/worklight.js:958:20)
----------------------------------------
Error
at Promise.then._7cd.then (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:275189)
at Object.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/auth/UserAuthenticationManager.js:400:52)
at http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:285161
at _7c0 (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:273376)
at Promise.then._7cd.then (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:275270)
at Object.lang.mixin._realmAuthentication (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/auth/UserAuthenticationManager.js:398:4)
at Object.<anonymous> (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/js/platform/auth/UserAuthenticationManager.js:343:10)
at http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:285161
at _7c0 (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:273376)
at Promise.then._7cd.then (http://11.11.11.11:0989/MaximoAnywhere/apps/services/preview/WorkExecution/common/0/default/dojo/dojo.js:2:275270)
Even the different user with correct credentials not able to login. It is start working only I restarted the server. I faced this issue very often. Kindly advice.
Any help would be appreciated.
Thanks in advance
Offline login requires that you have logged in previously as this user before. It stores this information in the localStorage of the application. If offline login seems to be breaking on iOS, this might be a known issue that we've found and fixed as an iFix.
The first time you login, you must have a server connection to download the data initially and validate your username/password.
Are you using an embedded worklight or standalone worklight server? You should check the server logs to see if the server is actually running while you're trying to login as the second user.
UPDATE:
The only thing I can think of here, is that your worklight server is failing to respond to the initial WL.Client.connect somehow. Either it's too slow, or maybe running out of heap space. So when it's time to actually try and WL.login with our challenge handler, that handshaking has failed..
Check the heapsize of your worklight server make sure it's large enough
Check the connect timeout in our Startup.js file being used with the WL.Client.connect method, and bump it way up to be larger and see if it fixes the problem.
I am facing issue with APNS php code for push notification on IOS devices, I have two separate connection for Development and Production.
I have configure the development connection on my server by adding the .pem file certificate and Passphares its working perfect and I received the notification also. Have a look my development configuration:
Url: 'ssl://gateway.sandbox.push.apple.com:2195'
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_SANDBOX,
'APNS_Dev_ISAS.pem'
);
$myNewLogger = new MyNewLogger();
$push->setLogger($myNewLogger);
// Set the Provider Certificate passphrase
$push->setProviderCertificatePassphrase('1234567');
$push->setRootCertificationAuthority('APNS_Dev_ISAS.pem');
$push->connect();
Issue:
Than I configured the connection for Production by adding following parameters but I getting the connection error:
Url: ssl://gateway.push.apple.com:2195
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION,
'APNS_PROD_ISAS.pem'
);
$myNewLogger = new MyNewLogger();
$push->setLogger($myNewLogger);
// Set the Provider Certificate passphrase
$push->setProviderCertificatePassphrase('12345678');
$push->setRootCertificationAuthority('APNS_PROD_ISAS.pem');
$push->connect();
Error of connection:
INFO: Trying ssl://gateway.push.apple.com:2195...ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
INFO: Retry to connect (1/3)...INFO: Trying ssl://gateway.push.apple.com:2195...ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
INFO: Retry to connect (2/3)...
INFO: Trying ssl://gateway.push.apple.com:2195...ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
INFO: Retry to connect (3/3)...
INFO: Trying ssl://gateway.push.apple.com:2195...ERROR: Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)
I google the issue and I found the some solutions and I have check all and everything is fine but no success.
I have used the correct path for development and production.
I have created the separate certificate .pem files for both and tested the certificate on pusher app. Certificate are correct.
Port is also fine and no blocking from my server because same port is used in development url and development server push notification working fine.
Any help will be appreciated really. Thanks in advance.
Certificate (.pem) having issue that I was created for push notification.
Solution:
After few days trying on same issue I found that create certificate with mini character passpharess may be 1234, It will work perfect for you and make successful connection to IOS push notification server.
May be this will help someone else.
Thanks.
I was getting same problem when I execute my PHP script. After some research, I commented these three key-pair values 'cafile', 'CN_match' and 'ciphers'.
Then its started working properly. I hope this reply become useful to any other person as well.
$contextOptions = array(
'ssl' => array(
'verify_peer' => false, // You could skip all of the trouble by changing this to false, but it's WAY uncool for security reasons.
// 'cafile' => 'NiteVisionWebPushFile.pem',
// 'CN_match' => 'gateway.push.apple.com', // Change this to your certificates Common Name (or just comment this line out if not needed)
// 'ciphers' => 'HIGH:!SSLv2:!SSLv3',
'disable_compression' => true,
));
I'm using SignalR but have run into a problem. When a connection is started in one browser window and then a user logs in in another browser window the User identity is changed (this causes the error 'System.InvalidOperationException: Unrecognized user identity. The user identity cannot change during an active SignalR connection' on the server when a method is called on the hub.
I'm using this code on the client:
proxy.server.analyze(content)
.done(function () {
console.log('Success!');
})
.always(function () {
console.log('This is always called!');
})
.fail(function (error) {
console.log('This is never called!');
});
When I'm seeing errors on the server the fail function is never being called so there appears to be no way on the client to handle this problem and stop and start the connection.
So is there a "best practice" way of handling this case? How can I detect on the client that the user identity has changed in another browser window and stop and re-start the connection?
This is a known issue.
It is fixed in the next release. Here's the issue that ended up also fixing your issue: https://github.com/SignalR/SignalR/issues/2106.
Lastly, in the next release (0.2.0) what will happen is the connection will throw an error and stop itself. Therefore you'll be able to handle your case via either the error handler or you can of course you can tie into the "disconnected" event.
If you're willing to try a pre-releases you can always pull from the offical source or webstack nightly (http://www.myget.org/F/aspnetwebstacknightly/)
I'm wanting to use the asterisk manager api to show the status of all my SIP lines in a PHP web interface.
I thought I'd start simple and use telnet to see it working.
So I created a user in /etc/asterisk/manager.conf
[portal]
secret = password
read = all,system,call,log,verbose,command,agent,user
Then telnet to localhost on port 5038
This is what I get:
asterisk ~ # telnet localhost 5038
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Asterisk Call Manager/1.0
Action: login
Username: portal
Secret: 8u9sdgk
Events: off
Response: Success
Message: Authentication accepted
Action: SIPPeers
Response: Error
Message: Permission denied
Why am I getting permission denied? I thought the user has basically full access?
Do I need to restart asterisk to make this work? I didn't restart it. On the other hand, I was able to log in which makes me think that the manager.conf has been reloaded as the portal user didn't exist before.
Any ideas?
For SIPPeers you need 'system, all' privileges. So just add 'write=system' after 'read' line
You need to modify manager.conf, add follow:
read = all,ystem,call,user,dtmf
write = all,system,call
notice: must be add all after write