Freepbx can't connect to asterisk wrong password - asterisk

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.

Related

asterisk sip gone unreachable on sipml5 page load

I have installed and configure asterisk on my server, everything is working fine, but the problem is when user connected first time following message appears on sip debug :
[May 27 22:13:25] WARNING[20193]: chan_sip.c:3727 __sip_xmit: sip_xmit of 0x7f16b400bdb0 (len 646) to 192.168.0.150:61709 returned -1: No such file or directory
Scheduling destruction of SIP dialog '32729691-cce2-c278-d528-924721cfddca' in 32000 ms (Method: REGISTER)
but on refreshing page sip peer is reachable.
Seems like communication is one way only. The asterisk receives, but cannot send. Check firewalls, NATs, routing.
I have solved the problem, I have an error in my sip.conf file, changing sip.conf solves the problem

Notify or update data in browser with asterisk

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...

Is there a way to test an Asterisk from the terminal, without a phone

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

How to perform call with Asterisk and Skype

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".

Asterisk + FreePBX + GoTalk. Inbound route not working

I'm running asterisk 1.6.2.6 and freepbx-2.7.0
My trunk is configured as follows:
Outgoing Settings
Trunk name: GoTalk
Peer Details:
host=sip.gotalk.com
username=09xxxxxx
secret=YNxxxxxx
type=peer
fromuser=09xxxxxx
fromdomain=sip.gotalk.com
canreinvite=no
insecure=very
Incoming Settings
User Context: 09xxxxx
User Details:
username=09xxxxx
fromuser=09xxxxx
type=peer
secret=YNxxxxx
insecure=very
host=dynamic
fromdomain=sip.gotalk.com
context=from-pstn
Register String:
09xxxxxx:YNxxxxxxx#sip.gotalk.com/09xxxxxx
I have an inbound route called Incoming with DID 09xxxxxx
diverted to local extension 200
When I do a sip trace and dial my telephone number 0741xxxxx I just get failure beeps. I never see any SIP traffic from GoTalk to my asterisk server trying to connect the call.
Seems I'm not registering correctly for incoming calls because GoTalk aren't sending them to me. I am correct in using the GoTalk username 09xxxxxx as the DID, aren't I ? I've tried using my phone number but it makes no difference.
It's solved
GoTalk need the more convoluted Register String:
09xxxxxxxx:YNyyyyyy:09xxxxxxx#sip.gotalk.com:5060/09xxxxxx
Put that in and it registered and received calls fine

Resources