I am a newbie for Asterisk, so please be patient.
I would like to perform phone call originating by my application via Asterisk. I was recommended to use skype connection to terminate the call.
So, I installed AsteriskNow on VM with CentOs, created Skype Business account, got SIP ID and configured sip.conf and extensions.conf and explained here
http://forum.skype.com/index.php?showtopic=487451
Then I restarted asterisk service and checked log file. I did not see any error messages, so I hope that the configuration is accepted.
Now the question is: what do I have to do now? I want Asterisk to dial some phone number. It should arrive to skype that should forward the call to phone via VoIP gateway.
How can I do this?
Have a look at my answer: Asterisk click to call
You can do similar thing. At first do test with your local VoIP clients. You can probably install 2 SIP soft phones, configure them in sip.conf and using CallFile test if you can make connection between them. If this work, then instead of using Extension: SIP/test1 change it to valid dialable Skype for SIP "number".
Related
I'd like to install asterisk on a friend's computer but wish to do so without the computer being permanently bombarded with scammers. Locking down all the ports would be the obvious answer but this would mean that the remote client installed on a Android phone would then no longer work.
I do not want to have to use something like OpenVPN I would rather the remote extension reaches the asterisk box without the need for a VPN. Apopse from anything else not having to use a VPN would mean I could continue to benefit from push notification.
Security iptables particularly using something like m string matching - matching on keywords which may include the name of the client I am currently using on my Android and accepting incoming connections on detection of that word maybe one way of doing things blocking all IP addresses outside of the UK maybe another but of course nothing beats a VPN connection...
For an asterisk installation which will only serve one person, what is the ideal way of securing the installation whilst allowing reliable access from a remote extension which will not have a fixed IP but rather a dynamic one issued by the 3G connection it is running from.
You can do via versa:
1) setup iptables open port to provider
2) allow from other ips REGISTER only when UserAgent match your selected android app.
I have asterisk on a server 104.x.x.x and a main website on another server(204.x.x.x). Now I want to update the browser when someone call a sip number from my asterisk. Is there a better way of doing it? What I'm thinking is to expose an api that will update my telephony system database and do a ajax pooling or websocket on the browser from my website and call that api from dialplan via AGI method, but not sure if that is possible. Vicidial and other telephony system software works this way because their web application was also installed on the same server as asterisk. What this softwares do is call an external php or other language script from their dialplan
You should use the Asterisk manager API:
http://www.voip-info.org/wiki/view/Asterisk+manager+API
http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Monitor
to monitor calls from remote server.
Please check the manager.conf file, on how to allow access to a remote IP,
here's an example:
[usernamehere]
secret=yourpasswordhere
deny=0.0.0.0/0.0.0.0
permit=204.0.0.1/255.255.255.255
read=all,system,call,log,verbose,command,agent,user,originate
;write=command,call,originate
displayconnects=yes
You only need the "write" part if you intend to interact from the remote location back, like hanging up a call...
I've just setup FreePBX on my VPS. Everything is OK there are no notices. There hasn't been any errors in the installation. When I create my extension from the FreePBX create new SIP extension and try to connect afterwards I get Forbidden on my SIP client. The extension and the password are the same as I setup in the PBX.
This is the message from the log:
[2014-11-25 23:53:49] NOTICE[9209] chan_sip.c: Registration from '<sip:777#$$SERVER_IP$$>' failed for '$$MY_IP$$:59096' - Wrong password
The strange thing is that when I create an extension from the sip_custom.conf I connect to the server successfuly.
Any ideas :?
You have do apply changes(red button) after each change
You also have ensure your nat settings setuped correctly
You can check that device added in sip_additional.conf file and in asterisk via
asterisk -rx "sip show users"
Again, if you use nat=no and your device after nat, it will not work. Same can be if you use nat=yes and you have no nat.
I have installed asterisk I want to test I'm able to log in. I have in Go GoGrid. when I setup the IP, the extension and password I get it cannot reach the server. I'm able to ssh into the machine.
Is there a way to test from the console that asterisk is running and receiving connections ?
I would like to test from the terminal that I can connect with that extension and password ?
There might a problem with Asterisk running on GoGrid ?
Thanks,
Federico
Federico. Firstly, I run four Asterisk PBXs on GoGrid, so I know it works just fine.
Make sure your IP Tables is allowing SIP, IAX2 & RTP connections; by default, the images supplied don't.
To see if Asterisk is "seeing" a connection, use "asterisk -rvvv" to connect to the running Asterisk console. Use "sip show peers" or "iax2 show peers" to see if your phones and trunks are connected properly.
I also find that the "iftop" utility is -very- useful for making sure that remote devices are even trying to reach your PBX eth0.
from ssh you can go asterisk console by
asterisk -r
to check inbound sip packets come via firewall use
asterisk -r
sip set debug on
more info can be found at asterisk debug page on voip info
Also you can check whether Asterisk is alive by a console SIP client such as Linphonec and pjsua.
http://www.linphone.org/eng/documentation/guide/linphonecsh-control.html
http://www.pjsip.org/pjsua.htm
I am using Asterisk 1.4 server and I have created a desktop client using the Asterisk.NET Library. I am able to log into the AMI (as a manager) using Asterisk.Net, but I cannot find a way to send the REGISTER command using the AMI, to share my client's location information with the server.
I want to know an AMI or a CLI command that can send a REGISTER request to the Asterisk Server.
Thanks
If you're trying to do a sip register you might want to use an actual sip client API.
What's your end goal in doing this?
This is a fundamentally odd thing to be doing - a bit like looking for an API on a web server that lets you send an HTTP request to it. In many ways Asterisk is a voice analogue to a web server - the dialplan is a little like the Apache config directives that send incoming requests to different files, scripts, or services, AMI is rather like its command-line, AGI is similar conceptually to CGI (hint in the name!).
If you want to SIP-REGISTER something with your Asterisk server, just send a SIP REGISTER message with the right options to the Asterisk box's SIP interface. In AGI I suppose you could use the cURL() application to call localhost, but it would be a horrific hack and would probably break things.