SIpml5 demo not working with asterisk 11.9.0 - asterisk

I am trying to configure an example for SIPml5 and i found this info from https://wiki.asterisk.org/wiki/display/AST/Asterisk+WebRTC+Support.
I have asterisk 11.9.0 installed and downloaded source of SIPml5 from http://code.google.com/p/sipml5/source/checkout
I copied sample code into web root directory and example loaded successfully and also able to register 2 extensions.
I have tried both browser Google Chrome and Firefox with their latest versions.
For asterisk, I made some configuration like below.
Please check : http://pastebin.com/7KCvtcNf
For Outbound calls :
when i am dialling 8002 -> 8001 every time Chrome Browser asking for allow microphone. Is there any way to disable asking permission and allowing it by default ?
when i allow microphone then SIpml5 phone showing like "Not Allow".
Here is the asterisk logs : http://pastebin.com/JZeDjyay
For Incoming calls :
When call come to browser,And allow microphone then Call rejected and asterisk showing like "Got SIP response 603 "Failed to get local SDP" in asterisk CLI.
But After some google i found new link https://code.google.com/p/sipml5/wiki/Downloads for "SIPml-api.js" and after replacing that JS File Calls are comming in browser even i am able to answer that calls,Also in browser it says "In call" but in asterisk CLI it keep showing ringing and other end showing like "remote ringing" .
Here is the asterisk logs : http://pastebin.com/e8Ap3bhq
Can anyone please let me know what am i doing wrong?

If you are going to test webRTC, i successfully tested the Flashphoner Web Call Server with Asterisk 1.8.x versions using different call scenarios. Regarding sipML5, i would suggest you to please try using this tutorial by Sanjay Willy : http://highsecurity.blogspot.com/2012/12/webrtc-and-asterisk-11-using-sipml5.html
I hope it will be helpful for you.
Regards,

Related

How to call without video by linphonec?

I am build Linphone from official site for Debian:
$ ./linphone --version
linphone 4.1.1-655-g95245907
$ ./linphonec --version
version: 3.12.0
I am try voice call in linphonec to test phone, but get error:
> call 891********8
2019-03-06 17:13:20:391 liblinphone-error-LinphoneCore has video disabled for both capture and display, but video policy is to start the call with video. This is a possible mis-use of the API. In this case, video is disabled in default LinphoneCallParams
Error from linphone_core_invite.
Okay, may be enable set only voice? Yes, it is possible:
> help call
'call <sip-url or number> [options]' : initiate a call to the specified destination.
Options can be:
--audio-only : initiate the call without video.
--early-media : sends audio and video stream immediately when remote proposes early media.
Good option --audio-only. Try it:
> call 891********8 --audio-only
2019-03-06 17:14:01:951 liblinphone-error-LinphoneCore has video disabled for both capture and display, but video policy is to start the call with video. This is a possible mis-use of the API. In this case, video is disabled in default LinphoneCallParams
Error from linphone_core_invite.
This option is not work.
Q: How to disable video in default LinphoneCallParams? How to do it?
I ran into a similar problem and the solution I came up with may help.
My problem:
linphonec> call 5201
2019-04-13 02:47:38:771 liblinphone-error-LinphoneCore has video disabled for both capture and display, but video policy is to start the call with video. This is a possible mis-use of the API. In this case, video is disabled in default LinphoneCallParams
Error from linphone_core_invite. <----- THE REAL PROBLEM
The solution was to include the domain. For me this was:
linphonec> call sip:5201#172.31.0.1
2019-04-13 02:53:00:103 liblinphone-error-LinphoneCore has video disabled for both capture and display, but video policy is to start the call with video. This is a possible mis-use of the API. In this case, video is disabled in default LinphoneCallParams
Establishing call id to sip:5201#172.31.0.1, assigned id 2
Call 2 to sip:5201#172.31.0.1 in progress.
Media streams established with sip:5201#172.31.0.1 for call 2 (audio).

IdentityModel.OidcClient library doesn't seem to work with UWP

We are using ASP.NET Identity with IdentityServer4. We've added a Client to use with Azure AD. This works great within a web page, that part is working.
Our end goal is a UWP app, so we found the IdentityModel.OidcClient which has a UWP sample. This sample has two browser classes. We configured HTTPS, but the WabBrowser class now refuses to connect to the site at all. If I change the config to hit https://demo.identityserver.io then it works, but all the other config is the same, so I'm not sure what the problem could be. It shows an error message in the pop up browser that it could not connect.
I looked at the SystemBrowser class, but this logs in fine, then the browser window does not close, and even if we close it, the code doesn't move on to get back a result. Looking at the source, this is not surprising, it calls:
Launcher.LaunchUriAsync(new Uri(options.StartUrl));
and that's all. The RedirectUri is not passed in, and mechanism appears to exist to use it. So, the behaviour we see appears to be the extent of what the class can do.
Looking at the console .NET Core sample, it has a SystemBrowser class that works. I updated the UWP sample to use the Fall Creators Update and was able to bring in the ASP.NET Core dlls needed to compile this code. It sets up a class like this:
public LoopbackHttpListener(int port, string path = null)
{
path = path ?? String.Empty;
if (path.StartsWith("/")) path = path.Substring(1);
_url = $"http://127.0.0.1:{port}/{path}";
_host = new WebHostBuilder()
.UseKestrel()
.UseUrls(_url)
.Configure(Configure)
.Build();
_host.Start();
}
and I can confirm this gets called only once, but even if I hard code an unused IP address, I get an error that the IP is in use.
So, at this stage, the sample that exists for UWP works for the demo server but not for ours (I suspect an HTTPS issue, but that's not the error I get), and importing code that works for a Core sample, does not work either. I've spent a couple of days on this and would appreciate a nudge in the right direction.
So, to recap, the WabBrowser seems the best bet but, for my localhost IdentityServer I get this:
and if I try to use a .NET Core library that works elsewhere, it thinks a port is in use. I suspect I need to work out why WabBrowser can't connect to my local site. I have turned off Fiddler. I can browse to my https URL and get a disco document, in the browser, at https://localhost:44305/.well-known/openid-configuration.
There are extra steps necessary to enable localhost in the Web Authentication Broker -
https://msdn.microsoft.com/en-us/library/windows/desktop/jj658959%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
This website gave me the fix. Here is a synopsis:
Remove loopback isolation
For security and reliability reasons, UWP applications are not allowed to send requests to the loopback interface. While Visual Studio automatically creates exemptions for debugged apps, this feature won't be helpful in this case, as the authentication broker always executes in a separate process.
If you see this (cryptic) error message in your Windows event logs, then you're likely facing this issue:
AuthHost encountered a navigation error at URL: [...] with StatusCode: 0x800C0005.
One option to fix it is to use the loopack exemption utility developed by Eric Lawrence. It's natively included in Fiddler 4 but can also be downloaded as a standalone software. To allow the authentication broker to communicate with the loopback interface, exempt the applications starting with microsoft.windows.authhost and save your changes:
If everything was properly configured, you should now see the login/consent page returned by your server.

How do I resolve the Google OAuth "redirect_uri_mismatch" error?

I am failing to configure my Google OAuth for my Meteor app.
I was successful in setting it up a few weeks ago when it worked perfectly, but now all of a sudden I cant seem to correctly configure this.
I have tunneled my app via ngrok. Am going to give you a step by step illustration of the how I go towards setting this up. Kindly point out what am doing wrong and what I can do to rectify this.
I start in my terminal. I fire up the app using:
meteor --port 7000
I open up another terminal and fire up ngrok using:
./ngrok http 7000
This yields
In my Meteor.startup I add the following code:
../client/main.js
Meteor.startup(function () {
// Client startup method.
METEOR_OFFLINE_CATALOG=1;
METEOR_PROFILE=1;
Meteor.absoluteUrl.defaultOptions.rootUrl ='http://41958975.ngrok.io';
//
});
In my browser console when I type:
Meteor.absoluteUrl()
I get
I now paste the http://41958975.ngrok.io link into the browser and get this:
Clicking on the button is followed by:
Since the steps 1 to 5 have previously been done, I jump straight to steps 6, 7, and 8.
...and complete by pasting in the Client ID and the Client Secret
then clicking on the save configuration. The results is:
Now when I click on the sign in with google button: This pops up, just like its supposed to happen.
I click on one of the account options. This is when it all goes bazurk! I am redirected back to the sign in with google button (login page) with this error message showing
Looking at the terminal, I also get this error message:
I cant seem to get beyond this point.
What am I doing wrong and how can I get beyond this point?
Looking forward to your help.
You forgot to modify your ROOT_URL when you're running your app. The very first line of your last screenshot clearly shows it:
App running at: http://localhost:7000/
Setting absoluteUrl on client won't help, because it's your server who tries to obtain a token.
It uses OAuth._redirectUri() function to get redirect_uri, and there the Meteor.absoluteUrl() is used (it takes ROOT_URL from env variables, as stated in documentation).
Thus, your redirect_uri becomes http://localhost:7000/_oauth/google and that clearly mismatches with http://41958975.ngrok.io/_oauth/google (step #7).
To fix that you should start your Meteor application like this:
ROOT_URL="http://41958975.ngrok.io" meteor

Log in issues with Astersik

I just tried to get into Astersik and FreePBX because I'd like to set up a office phone network with different extensions for different people.
So I took a Raspberry Pi 3, downloaded the image here and followed this documentation. I thought for testing it should be fine.
It was so. Everything worked, no errors or something else while installation. So I opened the FreePBX site in my browser, logged in as admin, created a new user, a new Chain_SIP extension and linked both. Submitted this and applied the config (the red button in the right upper corner). I logged out, logged in with the credentials of the new user in FreePBX admin interface and the UCP interface. Everything was still fine.
Now I wanted to connect via a client to it and chose Empathy and came back to reality. I wasn't able to connect. Astersik full log tells me:
[2016-11-24 19:07:08] NOTICE[2004] chan_sip.c: Registration from
'' failed for '192.168.0.54:34061' - Wrong
password
I used that password which was shown during the process to create the extension. I tried the user (not the extension) credentials too, which didn't work and returned the same error, only 1003 is replaced by the user name.
Somewhere I found the command
asterisk -rx "sip show users"
which returns:
Username Secret Accountcode Def.Context ACL Forcerport
1003 12345678 from-internal Yes Yes
I'm sure, I missed something, but I have no ides what.
Could someone help me?
In FreePBX terminology user <> extension look at http://wiki.freepbx.org/pages/viewpage.action?pageId=5242941 for details. I believe, in your case you need to
asterisk -rx "sip show peers"
not
asterisk -rx "sip show users"

Integrate twitter in drupal 7 website

I am trying to get the twitter module (7.x-5.4) running on my local drupal 7.19 website. Already installed Oauth and registered a twitter app. I am using the keys of that twitter app.
Callback URL
http://localhost/drupal-7.19/twitter/oauth
twitter host
http://twitter.com
Twitter API
https://api.twitter.com
Twitter search
http://search.twitter.com
TinyURL
http://tinyurl.com
when I want to add at least my own twitter account so that the site can display my tweets. when I want to add this account, an error occurs:
Notice: Undefined property: stdClass::$data in Twitter->request() (line 131 of root\modules\twitter\twitter.lib.php).
Could not obtain a valid token from the Twitter API. Please review the configuration.
any ideas? thanks in advance.
In my case, uncommenting the line
extension=php_openssl.dll
in php.ini resolved the error.
I'm not sure this will work for you, but this worked for me. I had the same exact error, even though I had followed the documentation. Here's the test: go to admin/reports/status. If you see the following warning: "HTTP request status Fails" this means your drupal/LAMP stack is unable to use DNS to callback to itself. In my case I used my machines's IP to access my Drupal instance. So, rather that use "localhost" use your machine's IP address (you can use ipconfig on MSWin or ifconfig on Mac/Linux) and use that for finishing the twitter account setup process.
Again, not
http://localhost/drupal-7.19/twitter/oauth
but
http://10.0.1.9/drupal-7.19/twitter/oauth
(substituting your machine's IP address)
I was getting the exact same error which i fixed by adding appropriate proxy server details.
Notice: Undefined property: stdClass::$data in Twitter->request() (line 131 of C:\wamp\www\test_twitter\sites\all\modules\twitter\twitter.lib.php
The problem was due to proxy-settings. I added values for $conf['proxy_server'] and $conf['proxy_port'] in settings.php and this error vanished.
I also verified that if i remove the proxy settings, this error is reproduced again.
Install oauth_common and twitter on your Drupal site
Check that both Oauth and the Twitter modules are enabled. I didn't use any of the other Twitter modules to do this
Go to the twitter module in Drupal
Go to the Configure (button) -> settings (Tab)
(note that the Callback URL is http://localhost/yourwebsite/twitter/oauth i.e. it doesn’t have to be 127.0.0.1)
Click on the link that says register your application
Go to twitter and sign in to be a developer
Add a new application, making a distinct feed name
Enter your site details
For localhost use: http://127.0.0.1:8000/twitter/oauth for both the website and callback URLs
Press save when you've done
Next go to the Test OAuth button - this will give you your illusive consumer key and consumer secret key
Back to the Drupal website and and to the twitter module to configure (button) -> settings (Tab)
Copy and paste these consumer and consumer secret keys you just got
Press Save configuration
Hopefully no errors.
Go to the twitter tab in the module and hopefully your twitter avatar has appeared
Read the top of the page where it says "Tweets are pulled from Twitter by running cron. You can view the full list of tweets at the Tweets view."
Select the View Tweets checkbox and click view - Chances are your tweets won’t show up in the next window - yet
Go to your drupal Configuration screen and to [System] Cron and press the "Run cron"
Now go back to view tweets from the twitter module and they should all appear
[This was a pig to figure out]

Resources