Getting DEVICE_STATE of a trunk user in Asterisk - voip

I am new to Asterisk. We re working on an IVR project in University and we have some queues in queues.conf file. Some of our queue members are not registered in asterisk and we re calling them via trunk. But the problem is that we cant get the DEVICE_STATE information of these devices that is noıt registered in asterisk.
For example when we use Verbose function to see the state of a device; Verbose(${DEVICE_STATE(SIP/XXXX#10.0.0.2)}) it says the phone is INVALID.
But on the other hand we can call this phone via trunk. Is there any way to get the DEVICE_STATE of a phone which is not registered in asterisk and calling with trunk.
Thanks and Regards

you can not use DEVICE_STATE to make a call for external devices.

The short version is no, not that I am aware of. If the device is not registered, then Asterisk literally has no stateful information of the device. Therefore, until Asterisk has some reason to "talk to" the SIP device in question, it doesn't even know if it's on the network. A few quick Google searches didn't even show a way to do a pre-call SIP status enquiry.
Recommended Reading:
https://wiki.asterisk.org/wiki/display/AST/Function_DEVICE_STATE
http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/usingCustomDeviceStates.html

Related

How to answer a user in Home device and send a notification to user's phone

Is there any way to answer a user question in the Home device and at the same time, send a notification to another device?
For example, if the user ask for a direction, answer with the location (voice) and finish saying to the user:"I've sent you the location to your phone" and send him a map...
I know there is a way to switch conversation to another device (say, for example, one with screen) but I don't want to finish it in Home device.
Thanks in advance.
Not in a straightforward way, no, but there are a few options that you have that may do what you want.
You can try to use Assistant Notifications. Right now, notifications only appear on mobile devices, but even if/when they allow speaker notifications in the future, your user could still open it on a mobile device. You need to ask for permission to send a notification, and when they trigger the notification, an Intent in your Action will be triggered to actually show what you want to show.
You can also look into using a more standard notification channel such as Firebase Cloud Messaging. This does require you to have your own app on the mobile device, and it works outside of the Assistant, but may be a good choice if it meets your needs.

freeswitch sip trunk not receiving inbound calls

my sip trunk provider has given me a user name sip123456 when I configure that siip trunk as a gateway, I can make calls out no problem but I cannot receive any inbound calls! Now I did a lot of investigation and I found out that the user name has to be set as the telephone number for inbound calls to work, is there any other ways to overcome that issue in freeswitch, as my SIP trunk provider is unwilling to change the user name to the matching telephone number?
For information I am unable to provide a log as the call does not even reach freeswitch, my provider does not wish to provide a trace, also this issue happens in Asterisk, and Fusionpbx too! Now to make sure that my findings were correct, I used a different provider with another client, which uses telephone number as the user name, and my configuration works on both incoming and outgoing. I'm sure you would say to dump the other SIP provider but my client wants to find a solution hence I am posting this question...
My sincere apologies for being unable to provide further information such as trace logs etc, but has anyone faced the same issue, if yes what other work around have you used?
I suggest you go to Call Detail Records and find which variable contains the number you called. You would then use that variable for the inbound routes. You can change a setting in Default Settings
Category: dialplan
Subcategory: destination
Type: text
Value: ${sip_to_user}
In this example I used sip_to_user your carrier may send the number that was dialed in that variable or they could send it another way. Either way find your phone number and use the correct variable name. If this setting doesn't exist then add it. Click on the 'Reload' button to make the changes take effect. Go to Dialplan -> Destinations and re-save your inbound destinations and it will rewrite the inbound routes for you with the new variable.
Best Regards, Mark J Crane - FusionPBX Creator

Can't sign up for Azure - "We were unable to verify your account"

Anyone else have this problem?
I cannot sign up for an Azure account.
On the registration page, it asks for your phone number and wants to confirm it by sending a text or calling you. I only have a Google Voice number, and I always get
We were unable to verify your account
No matter if I choose text or call. There is no way around it. Any help?
EDIT: Other posts have indicated it's a problem when your country isn't listed, but that is not the case here (I'm in the U.S.). Those posts suggest calling "your local Microsoft branch" but how do I find that?
.
After reading the comments above, and calling Microsoft myself, I was told the verification process does not support Google Voice or Skype phone numbers.
The person I spoke with on the pre-sales department of Azure said he could not manually create an account for me or validate my Google Voice number, despite me sending him this question on StackOverflow showing that others had been successful in calling Microsoft as I had.
My solution was to use a friend's number and have him send me the verification code he received. However, it must be within the Azure signup's session timeout period or the code is no good.
I really hope someone at Microsoft sees this and corrects it for future customers.
I wanted to throw in a answer for Republic Wireless users who are having this problem.
I know this doesn't pertain specifically to Republic Wireless, but this is for those users, and should perhaps prove helpful, since this is the 1st result from Google on the error message.
Republic Wireless is a VoIP company, but they still use an underlying sprint phone number to handle calls/texts when you are not under WiFi, here is how to access your underlying phone number so you can get past the Windows Azure registration verification:
Open the Phone app (the standard dialer that comes with the phone).
Dial ##786#.
The number shown for Mobile Number is your Sprint number.
Hit the Back or Home button to dismiss the information screen.
https://community.republicwireless.com/people/carlh/blog/2013/11/20/moto-x-how-to-find-out-your-phones-sprint-number
I faced this exact same error. After trying different solutions, i decided to change my browser from Google Chrome to Microsoft Edge - and i was able to verify my account thereafter

Cisco call manager api to conference a device

I'm trying to implement some click to dial functionality as follows:
A user finds a number on a webpage (say employee extension)
Clicking that extension will dial a phone number that I've picked
Upon answering that call, I am immediately "conferenced" into
calling the number I actualy wanted to dial.
I've done something very similar using a Twilio API but want to use our corporate Cisco Call Manager capabilities instead of paying per minute for this functionality.
The WebDialerSOAP doesn't seem to be able to give me this functionality. I think doing a conference would work but can't find anything to do that. Possibly an open source call manager wrapper?
why not a FreeSWITCH server alongside the CUCM? It can set up conferences, and it's one of themost programmable products with as much control over API as you want.
It has also an RTMP module, so you can actually run a Flash-based softphone out of your browser
Use TAPI3 or JTAPI
Connect the code using TSP, and Application user
use CreateCall function to the number from HTML page with implementing the trigger.
use CreateCall to the other phone.
use Finish(FINISH_MODE.FM_ASCONFERENCE) to complete conference.

How to trigger an application in mobile automatically

My idea is to make an application start automatically when a message from a specific user reaches the inbox of the mobile . For example if my friend sends some numbers to my mobile, the sms has to be read and validated first and then calculator ( inbuilt mobile application) has to be triggered and process the numbers from the message. Please help me with the above query.
I am far from convinced you will be able to give the phone user access to the same sms you use to launch your MIDlet.
You may need to use native development on the phones that support it if J2ME can't give you exactly what you need.
In any case, you probably want to try with J2ME first so you need to read the specifications for JSR-118 and its PushRegistry API, along with JSR-120, which interfaces with SMS.
Most current J2ME-enabled phones will support static SMS Push but you will need to send the SMS to a particular port, much like you would data over a standard library socket.
I don't think you can trigger on just any old SMS message arriving.
This is the class you want to look at, in any case:
javax.microedition.io.PushRegistry

Resources