Remote Hints help

Speedy2k

Member
Joined
Oct 11, 2008
Messages
387
Reaction score
0
Hi guy, i really need some help make remote hints work, i miss something about that, i'm willing to give 100$ to the PIAF comunity to make this work, the best scenario would be to be able to put this as a module, but i really need to be able to make remote hints between 7 systems. i have 1 main system and 6 connected to the main. they all have their own line. but i really need the receptionist on the main site to be able to see every extension on the 7 systems and everyone to see each other, i know there is a scripts to make this work but i can't seems to find a way to make it work. I would really like some explanation for this if someone find out how to make this work.

Thanx a lot! here is the scripts:
http://www.nizon.ca/remote-hints.tar

Here is the original post
http://trixbox.org/forums/vendor-fo...-57ict-multi-line-appearance-blf-iax-trunking
 

Speedy2k

Member
Joined
Oct 11, 2008
Messages
387
Reaction score
0
Please someone, it doesn't look so hard to do, i only miss some information to make this work!
 

Speedy2k

Member
Joined
Oct 11, 2008
Messages
387
Reaction score
0
Nobody can help me on this ??? I really need my aasrta phone to show the status of my remote PBX extension, sice i have 1 receptionist for 6 locations. Is AstManProxy should do the trick ?? is it possible to make the Aastra XML script work with it and if yes does someone can point me on a way to do this ?? I'm still thinking then the script on the 1 post is the easiest way to do it, but i can't get the way it is working, i only need some help with this! thanx a lot!
 

jmullinix

Guru
Joined
Oct 21, 2007
Messages
1,263
Reaction score
7
Snom phones support this out of the box. Replace your receptionist phone with a Snom 360 or 370 with a sidecar.

This can be done with an Aastra also. You will need to set up a line on the receptionist's phone to each phone system. Then you can set up your presence buttons on the phone using the identities of the remote boxes.
 

Speedy2k

Member
Joined
Oct 11, 2008
Messages
387
Reaction score
0
Snom phones support this out of the box. Replace your receptionist phone with a Snom 360 or 370 with a sidecar.

This can be done with an Aastra also. You will need to set up a line on the receptionist's phone to each phone system. Then you can set up your presence buttons on the phone using the identities of the remote boxes.


But you cannot look at the code in the php scripts, in my head, this is the best option we have! It enable every phone on every remote PBX to be able to see the hints from each other?? Like i said, i can give to the community this is not a problem! It would be really appreciated! Thanx! Because using 1 brand of phone for all the site is mandatory for maintenance and ease of use!!!
 

Speedy2k

Member
Joined
Oct 11, 2008
Messages
387
Reaction score
0
Ok guys for the interested of you, i have make it happen!!
So here is the setup i have done!
download all file into a directories of you choice, i have used /usr/local/remotehints/ on the main server
edit the file hints.php and modify those line:
PHP:
//Server 1
$hint_xfr[1]['sipstuff']['302'] = 1; //Chanegs to hint 302 from context "sipstuff" will be passed to Server 2 as rhint_sipstuff_302
to:
PHP:
//Server 1
$hint_xfr[1]['ext-local']['1000'] = 1; //Change hint 1000 from context "ext-local" will be passed to Server 2 as rhint_ext-local_1000
$hint_xfr[1]['ext-local']['1100'] = 1; 
$hint_xfr[1]['ext-local']['1101'] = 1;
You have to add 1 line per extension you want to monitor on a remote system phone. These are the main server extension.

And for the remote server here is the modification to do:
PHP:
//Server 2
$hint_xfr[2]['default']['316'] = 1; //Changes to hint 316 in context "defaut"... blah blah server 1 as rhint_default_302
Change this line to:
PHP:
//Server 2
$hint_xfr[2]['ext-local']['2000'] = 1; //Changes to hint 2000 in context "ext-local"will be passed to Server 1 as rhint_default_2000
Once again, you have to add 1 line per phone you want to monitor on the main server.

Save this file and open the ast_relay.php file
and make it look like that!
PHP:
//Server 1
$server[1]['addr'] = "127.0.0.1";
$server[1]['port'] = 5038;
$server[1]['user'] = "hints";
$server[1]['pass'] = "hints";
//Server 2
$server[2]['addr'] = "remote IP";
$server[2]['port'] = 5038;
$server[2]['user'] = "hints";
$server[2]['pass'] = "hints";

By the way you have to setup a user in each manager_custom file i have used hints/hints as username and password, you can make it what you want!

Here is what my entries in the manager_custom.conf look like:
Code:
[hints]
secret = hints
deny=0.0.0.0/0.0.0.0
permit=0.0.0.0/0.0.0.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

And now, for each remote extension you want to monitor, you have to create a custom hint context on the remote server, So if like me Server 1 as extension 1000,1100,1101.
And server 2 as extension 2000. here is what we will add to server 1 extension_custom.conf

Code:
[ext-local-custom]
exten => 2000,hint,Custom:rhint_ext-local_2000

And here is what the extension_custom.conf on the remote server will look like:

Code:
[ext-local-custom]
exten => 1000,hint,Custom:rhint_ext-local_1000
exten => 1100,hint,Custom:rhint_ext-local_1100
exten => 1101.hint,Custom:rhint_ext-local_1101

And by the way, you will have to add the DEVSTATE function to your asterisk system if it is not already done.
To know if you have it or not, go into your @ CLI and type:
Code:
core show function DEVSTATE
You should get something like that:
Code:
  -= Info about function 'DEVSTATE' =-
[Syntax]
DEVSTATE(device)
[Synopsis]
Get or Set a device state
[Description]
  The DEVSTATE function can be used to retrieve the device state from any
device state provider.  For example:
   NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)})
   NoOp(Conference number 1234 has state ${DEVSTATE(MeetMe:1234)})
  The DEVSTATE function can also be used to set custom device state from
the dialplan.  The "Custom:" prefix must be used.  For example:
  Set(DEVSTATE(Custom:lamp1)=BUSY)
  Set(DEVSTATE(Custom:lamp2)=NOT_INUSE)
You can subscribe to the status of a custom device state using a hint in
the dialplan:
  exten => 1234,hint,Custom:lamp1
  The possible values for both uses of this function are:
UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING
RINGINUSE | ONHOLD
if not you will need to install it.
To install the DEVSTATE function, here is the step i have get:
Get the zipped file attached to this post and unzip it to the /usr/src/asterisk/funcs/ directory.
Code:
cd /usr/src/asterisk
make distclean
make clean
./configure
make menuselect
** Go see in the option 6 if there is a * next to:func_devstate if not press space bar on it!.**
After you press ESC 1 time a "s" to save your change.
Code:
make
make install

add this line to your /etc/amportal.conf
Code:
USEDEVSTATE=true

Restart your @ amportal restart and go into the CLI to make shure the function is now avaible:
Code:
core show function DEVSTATE

It is working really well here! Hope it will help some people here!! it would be really nice if it was possible to have this as a module to FreePBX if some guru are interested!!
 

Attachments

  • func_devstate.zip
    2.1 KB · Views: 14

Socs28

New Member
Joined
Mar 5, 2010
Messages
54
Reaction score
0
I had this working on 2 different setups until just recently, and I'm not sure which update killed it. I think it's something in the new version of FPBX. I'm using 2.8 already. Have you done any testing with this? I'm not enough of an expert to know where to start the debugging. I had it working on Asterisk 1.6.2.6 when it stopped. I have since upgraded to 1.6.2.7, but no change.
 

Members online

Forum statistics

Threads
25,838
Messages
167,924
Members
19,260
Latest member
lucky
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top