Freeswitch Originate to SIP endpoint with Password - freeswitch

Looking to originate a call from Freeswitch to an external SIP phone using originate.
In the Freeswitch docs I can see this being done as "originate sofia/example/300#foo.com 8600" however can not see any information on how to set the password.
Anyone have an idea?

you can use
originate [sip_auth_username='xxxxxxx',sip_auth_password='xxxxxxxx']sofia/external/111111#example.com &park()
or
<action application="bridge" data="[sip_auth_username='user',sip_auth_password='xxxxxx']user/1000#default"/>

Related

Whatsapp webhook won't connect with ngrok

I made a controller in laravel for WhatsApp webhook authentication, run it locally and use ngrok to connect it with WhatsApp webhook, it won't connect, it said "The Callback url or verify token could not be validated", but when I deploy it on heroku it working normally.
Is there any special config so I can connect it locally using ngrok ? or is there any alternative solution?
Went through the same issue and it seems that WhatsApp Cloud API considers NgRok malicious, and won't accept it as a callback webhook endpoint.
You need to follow the steps provided in ngrok documentation,
https://ngrok.com/docs/integrations/whatsapp/webhooks,
I am not sure which step you are missing or have a problem with, but as per the error "The Callback url or verify token could not be validated", your deployed code for webhook is not valid as per the provided guideline in WhatsApp webhook docs.
Make sure you have set the same verification code in the code and webhook verification when you configure!
According to the ngrok docs, you need to have a pro or enterprise license for validation to work. A free alternate solution for anyone that may need it (at least at the time of writing) is Cloudflare tunnel. Just read the docs or you can watch this video(CLI version) or video(dashboard version) to help you set it up. You will need to have a domain though.

Your app is vulnerable to Intent Redirection

I published an app to the Google Play store. I just received an email from Google that says that "Your app(s) are vulnerable to Intent Redirection.
To address this issue, follow the steps in this Google Help Center article. "
I have looked into the google help center article but couldn't find anything that I can incorporate in my app.
Although, I am using Google Play Services SMS Retriever Auth which may be the cause of this problem. I am protecting the broadcast receiver with the SEND_PERMISSION which ensures that an Intent comes from Play Services by doing so:
<receiver
android:name=".receiver.SmsBroadcastReceiver"
android:permission="com.google.android.gms.auth.api.phone.permission.SEND"
android:exported="true">
<intent-filter>
<action android:name="com.google.android.gms.auth.api.phone.SMS_RETRIEVE" />
</intent-filter>
</receiver>
How can I solve this problem? Is anyone facing the same issue? If so please can you guide me as I have to resolve this issue before 20th December or my app will get removed?
You just need to replace (android:exported="true") to (android:exported="false")..
and search everywhere if you are passing any Parcelable Object and try to remove them and check again..
Finally,,,
I recommend to use this to retrieve ur SMS >> SMS_RETRIEVER_API

Google Speech Recognition API

I'm trying to use the Google Speech API v2 (at address https://www.google.com/speech-api/v2/recognize?...)
I need to use my Api Key, but when I use it I get error 403 Forbidden
When I use an API key that was on the example project I downloaded it is working fine.
I saw that at the Google Developers Console I can enable a lot of api options, but didn't find any Speech-API option. Is there anything else I need to enable to get access to this API using my key?
Thank you!
Instructions are here : http://www.chromium.org/developers/how-tos/api-keys
!! Do not forget to activate the API "Speech API" in "APIs" under "APIS & AUTH" !!
According to chromium that there is no quota for google speech to text APIs anymore.so you will not found it in your google cloud project console
I am not sure this API is available to everyone, but here is a github project that provides a valid key. You should try with this key.
https://github.com/gillesdemey/google-speech-v2
This is an old post, but hopefully it will help someone.
I couldn't find the Speech API listed under the popular APIs on https://console.developers.google.com/ either. You have to search for the Speech API using the "Search all 100 + APIs" search field.
In order to use the service you need to:
get a developer key (see above answers for instructions)
send a mono flac audio file to http://www.google.com/speech-api/v2/recognize (Google doesn't accept stereo audio anymore)
specify your audio file's sampling rate (e.g. 16000, 44100, etc.) and Content-Type as audio/x-flac in your HTTP header
specify values for key, client and lang parameters in the url
Here is a wget example with full parameters and header:
wget -q --post-file file.flac --header="Content-Type: audio/x-flac; rate=16000" -O - "http://www.google.com/speech-api/v2/recognize?client=chromium&lang=en_US&key=AIzaSyAcalCzUvPmmJ7CZBFOEWx2Z1ZSn4Vs1gg"
Note that the free service is limited to 50 requests/day for a developer key.
This repository offers a shell script to use the API from the command line (including voice recording).

Access to GMail mailbox content with google-api

Is there a way to access a Gmail Mailbox using the google-api? I'm trying to do this from command line using Java FWIW.
I already have code in place that achieves this via IMAP so that is not what I'm looking for.
You can access GMAIL IMAPS and SMTP using XOAUTH authentication, see here :
https://developers.google.com/gmail/xoauth2_protocol
It is not really the google-api-java-client, it is plain IMAP/SMTP but authentication is OAUTH2.
After going through the Google API once again and considering this question did not get an answer in the past 6 days, I guess it is safe to say there is no other way aside from IMAP/S.
NOTE:
This question was initiated because I was told by numerous people that a certain Google API was available and preferable for this purpose. It seems they were all informed by the same person who was not able to show me his source of information and agreed that according to the documentation IMAP indeed is the only API available as of now.

Any suggestion for companies or service for global SMS API?

You might used whatsapp or LINE from iOS or Android smartphone.
You need to activate your account but input your phone number at the first time.
And the app will try to send a SMS message to your phone for authentication.
Do you have any suggestion how they achieve this?
As far as I think, there might be some SMS API Service companies to help on that.
If so, do anyone have some suggestions or list for those companies which provide integrated global SMS Service API (via Web API to trigger)
And also if I want to receive SMS message from users, is there any suggested company to help on receiving SMS?
Or is there any better way to achieve similar goals (Sending and Receiving SMS via Web API worldwide)
I know that the company Twilio does it. Check this out http://www.twilio.com/api/sms
What you're talking about is often called as two-factor authorization, mobile verification API, one time password API. We (and me, personally) implemented this as a part of our SMS API.
As a first step, you must generate the code. And after the user received the message and entered it in your UI, you're validating it.

Resources