Asterisk Click2Dial Estension How Does it work??

mcamerar

Joined
Nov 25, 2009
Messages
25
Likes
0
Points
0
#1
I know this could sound very stupid, but after installing Asterisk Click2Dial Estension in mozilla nothing happens!!!
I am using Elastix 2.0.0.58 and I would like to use this estension, but I cannot figure out why it doesn't work on my browser although the settings are quite obvious..
Is there any extra setting to configure in Elastix?
Could please tell me what is wrong with this estension?
Here are my setting:
use Ami instead of AJAM
host: the ip of my asterisk server
port: 5038
user: my user extension
pass: my pass extension
context: internal
channel: SIP n°: my user extension.

Is there anything wrong?
Please Help
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
Your "browser" will only work if it is the same machine as your server by default, The AMI user clause you choose for that process and that you define in manager.conf must allow connections from other than 127.0.0.1 , particularly the host/network you are trying to connect from. ( be very careful here :) :) ) it must also allow connections from the "user" you use. Please rethink and redefine what you re trying to do.

p,s, there is no context "internal" until you build one, perhaps you meant "from-internal"
 

mcamerar

Joined
Nov 25, 2009
Messages
25
Likes
0
Points
0
#3
Hi dicko,
thank for your reply first of all...
Actually what I am trying to do here is to have this mozilla estension working from any pc where I put my setting (my extension elastix setting!)to allow me to dial any phone number from the browser.
But still I don't get it how to do it.
Plus, now you scared me to death when you said "( be very careful here )", because I am a newbie and it took me ages to configure elastix the way it works now.
But i would really need something as simple as is possible to allow me to use this click2dial from any browser.
So could you please tell me more about how to set everything in a safe way?
Besides, is it not possible to allow this mozilla estension to use my softphone so I don't mess too much on elastix?
Whatever you think is better, will do for me !
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
This is pure theory, (that does not in any way mean it doesn't work, it does.)



It's really quite simple, there is a defined interface to asterisk called AMI (Asterisk Management Interface) that runs as a service by default on TCP/5038 it will allow control at a basic level of calls/status/monitoring/messageing etc. to and from Asterisk. For good reason. this is restrictively controlled by the accounts in /etc/asterisk/manager.conf and it's includes, and restricted by what is allowed both read and write by those accounts.

To allow any manipulation of Asterisk, (and be aware that anything you do with that interface will NOT show up in your FreePBX reports), you need to define a "user" with access rights appropriately in that file. So perhaps you should define a User there possibly like:

[dingbat]
secret = 36365ggdffd55678
deny=0.0.0.0/0.0.0.0
permit=192.168.1.0/255.255.255.0
permit=4.2.2.1/255.255.255.255
write = call


where the user name is dingbat, the password is 36365ggdffd55678 and your network is 192.168.1.0/255.255.255.0 but you also allow a guest (in this case a nameserver) at 4.2.2.1

This particular application is pretty blunt and doesn't take into account anything but making a call (this is scary as that costs money, that's why you need to limit access to this account to your local network, it needs no read permission and only call permission (the scary one))

you will then use that account for access from your arbitrary "dialer" application, there are no checks on what is presented and to be quite honest it would be quite trivial to preempt and inject undesirable calls in this distribution, hence my caution.

If a knuckle dragger discovered your server, and you had 5038 open on your firewall, and they guessed dingbat and 36365ggdffd55678, but were not in the network 192.168.1.0/255.255.255.0 or 4.2.2.1, nothing would happen, of course, if the trusted client met all these previously defined criteria,then by definition they could place a call through the AMI, to cut a long story short, this is probably what you are trying to achieve. BUT and a very big BUT, If someone just simply injected html code to that perhaps insecure page, you just paid for a call from Moldavia to Tehran. because you didn't understand what you gave away to the dialer code, and they will continue to do so until you notice that, unfortunately those will not appear in any of your normal reports until next months bill from your VSP ;)


good luck, sorry for the actual theory, and I know most people think it unnecessary :) :) they are however sometimes wrong, as of course am I.

dicko
 

mcamerar

Joined
Nov 25, 2009
Messages
25
Likes
0
Points
0
#5
Thank you to clarify how it works AMI.
Now it seems much better to me to understand.
Although I am not still able to make this mozilla interface working...
I did all what you said...
I created in manager.conf a user (which is and has the same settings of my personal extension)
Considering I am testing now from home (where I don't have a fix ip), I just tried with these settings for test:
deny=0.0.0.0/0.0.0.0
permit=0.0.0.0/0.0.0.0 (I assume this should allow every ip to have access, correct?)
read = call
write = call

and in the preferences of the mozilla estension:

use Ami instead of AJAM
host: the ip of my asterisk server
port: 5038
user: my user extension
pass: my pass extension
context: from-internal
channel: SIP n°: my user extension.

Still not work either in this way.
Sorry for my mistakes
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
if you agree with user=user and secret=password, then the asterisk CLI/debug log will show the connections and conversely show the rejections , your /var/log/httpd/*access* logs will show the web connections, as will /var/log/httpd/*errors* show your errored connections, be aware that Elastix will attempt to rewrite all HTTP connections to HTTPS, If you've still got problems, I suggest you ask the author of what you are using, we can't second guess their intension, and it is not main stream code, sorry.

I suggest you debug and verify your work with the various

manager show users
manager show connected
etc. manager commands at the Aterisk CLI
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,886
Members
17,563
Latest member
dineshr
Top