Vous êtes sur la page 1sur 7

ChanSpy - Customization in FreePBX | FreePBX

http://www.freepbx.org/forum/chanspy-customization-in-freepbx

Freedom to Connect
(http://freepbx.org/freepbx-official-paid-support)

www.VoipSwitch.com
softswitch, billing, softphone, callback, calling cards, more.... www.voipswitch.com
Ads by Google

Not Logged in - No Account?


Don't have an account? Registering an account with us allows you to post to the forums, easily track new posts, subscribe to threads, pm (private message) other forum members, and receive periodic news letters (you can opt out if you desire). Once you are logged in this message will no longer appear. If you don't have an account, you can create one by registering here. (/user/register) Lost your password, request a new password (/user/password) . We respect your privacy which means we collect minimal information when you register and we do not resell that information or use it in any objectionable way. You can review our privacy policy (/privacy-policy) for full details.

ChanSpy - Customization in FreePBX


Posted June 14th, 2007 by blakegrover (tadpole)

Hi, We are looking into listening in on conversations with our asterisk server and I have read that ChanSpy does just that. I enabled it on freePBX and I was able to cycle trough all the active calls by pressing * but I was having a difficult time trying to go to a specific call. We also needed a way to make it password protected. After doing some searching I found that if I put this in the extensions.conf file it should work.

exten => 555,1,Authenticate(1234) exten => 555,2,Read(SPYNUM,extension) exten => 555,3,ChanSpy(SIP/${SPYNUM},q)

1 de 7

14/05/2008 07:00 p.m.

ChanSpy - Customization in FreePBX | FreePBX

http://www.freepbx.org/forum/chanspy-customization-in-freepbx

but it wouldn't work and I think it had to do with freepbx already has ChanSpy integrated in the files. I found out that in the extensions_additional.conf there is the following to enable ChanSpy:

[app-chanspy] include => app-chanspy-custom exten => 555,1,Macro(user-callerid,) exten => 555,n,Answer exten => 555,n,Wait(1) exten => 555,n,ChanSpy() exten => 555,n,Hangup ; end of [app-chanspy]
I modified this section so it looks like this:

[app-chanspy] include => app-chanspy-custom exten => 555,1,Authenticate(1234) exten => 555,2,Read(SPYNUM,extension) exten => 555,3,ChanSpy(SIP/${SPYNUM},q) ;old code ;exten => ;exten => ;exten => ;exten => ;exten => 555,1,Macro(user-callerid,) 555,n,Answer 555,n,Wait(1) 555,n,ChanSpy() 555,n,Hangup

; end of [app-chanspy]
It works great, by dialing 555 it asks for a password and then it asks for the extension and then connects me to it if there is a call. This is exactly what we need, but I found out everytime I make a change in the freePBX system and reload the changes it erases my changes. I have tried to disable the ChanSpy in FreePbx and then stick this code in extensions.conf and extensions_custom.conf but it doesn't work at all it just gives me a 484 error on my phone. Is there any way I can get ti so when I reload the changes in freepbx it keeps my changes on the ChanSpy, or is there a new update that lets me add authentication and jump to a certain extension in ChanSpy in freePBX?

2 de 7

14/05/2008 07:00 p.m.

ChanSpy - Customization in FreePBX | FreePBX

http://www.freepbx.org/forum/chanspy-customization-in-freepbx

Also one more question does anyone know how to disallow a certain extension(s) from ChanSpy. The CEO doesn't want anyone listening to his calls and with ChanSpy they would. Thanks Blake

__________________

Comment viewing options


Threaded list - expanded Date - oldest first 50 comments per page

Save settings

Select your preferred way to display the comments and click "Save settings" to activate your changes.

ChanSpy - Customization in FreePBX


(/forum/chanspy-customization-in-freepbx#comment-5682)
On June 14th, 2007 p_lindheimer (Developer) said:

blakegrover, you are right that chanspy and several others should have the option of being password protected. Please enter a ticket into our trac system against 2.3-branch to have this done. zapbarge would also fit in this category and there are probably a few others. you can also put in the request to make chanspy work with a specific extensions by appending the extension number after the feature code. I have done this and it works IIRC it was this (should probably check that the extension is a sip extension though)

exten exten exten exten exten

=> => => => =>

_555X.,1,Macro(user-callerid,) _555X.,n,Answer _555X.,n,Wait(1) _555X.,n,ChanSpy(SIP/${EXTEN:3}) _555X.,n,Hangup

So please put in the requests and we can try and see what we can do.

__________________

3 de 7

14/05/2008 07:00 p.m.

ChanSpy - Customization in FreePBX | FreePBX

http://www.freepbx.org/forum/chanspy-customization-in-freepbx

Philippe Lindheimer - FreePBX Project Leader FreePBX Training Opportunities - Click Here (/open-telephony-training-seminar-0003) Get Official Paid Support - Click Here (/freepbx-official-paid-support)

ChanSpy - Customization in FreePBX


(/forum/chanspy-customization-in-freepbx#comment-5683)
On June 14th, 2007 blakegrover (tadpole) said:

p_lindheimer, Is there anyway I can stick it in a different config file in the meantime so I can use FreePBX and not have to worry about changing these lines of code everytime? I am going to try to implement groups on the ChanSpy so that it will only look at certain extensions and not having to change the config files everytime I want to update FreePBX settings would be nice. Thanks Blake

ChanSpy - Customization in FreePBX


(/forum/chanspy-customization-in-freepbx#comment-5684)
On June 14th, 2007 p_lindheimer (Developer) said:

you will have to modify the extensions.conf file and put an include before extensions_additional.conf and then define it in that file. That will take precedence over extensions_additional.conf. However, upgrading to a new version will overrite your extensions.conf file (although it is just one include statement). This is rectified in 2.3 (which is still svn/trunk): http://freepbx.org/trac/ticket/1997#comment:1
(http://freepbx.org/trac/ticket/1997#comment:1)

you can click on the link to the change to see how it was added.

__________________

4 de 7

14/05/2008 07:00 p.m.

ChanSpy - Customization in FreePBX | FreePBX

http://www.freepbx.org/forum/chanspy-customization-in-freepbx

Philippe Lindheimer - FreePBX Project Leader FreePBX Training Opportunities - Click Here (/open-telephony-training-seminar-0003) Get Official Paid Support - Click Here (/freepbx-official-paid-support)

ChanSpy - Customization in FreePBX


(/forum/chanspy-customization-in-freepbx#comment-5685)
On June 14th, 2007 blakegrover (tadpole) said:

p_lindheimer, Thanks for your help Blake

ChanSpy - Customization in FreePBX


(/forum/chanspy-customization-in-freepbx#comment-5686)
On June 15th, 2007 blakegrover (tadpole) said:

I tried moving the block of code in a seperate config file (below) extensions_chanspy.conf

; ChanSpy configuration [chanspy] include => app-chanspy-custom ;exten => 555,1,Authenticate(1234) ;exten => 555,2,Read(SPYNUM,extension) ;exten => 555,3,ChanSpy(SIP/${SPYNUM},q) ;old code exten => 555,1,Macro(user-callerid,) exten => 555,n,Answer exten => 555,n,Wait(1) exten => 555,n,ChanSpy() exten => 555,n,Hangup ; end of [app-chanspy]
and then in the extensions.conf file I added an include before extensions_additional.conf.

5 de 7

14/05/2008 07:00 p.m.

ChanSpy - Customization in FreePBX | FreePBX

http://www.freepbx.org/forum/chanspy-customization-in-freepbx

; ; ; ; ; ; ; ; ;

FreePBX Copyright (C) 2004 Coalescent Systems Inc (Canada) Copyright (C) 2006 Why Pay More 4 Less Pty Ltd (Australia) Released under the GNU GPL Licence version 2. dialparties.agi (http://www.sprackett.com/asterisk/ (http:// Asterisk::AGI (http://asterisk.gnuinter.net/ (http://asterisk. gsm (http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX loligo sounds (http://www.loligo.com/asterisk/sounds/ (http: mpg123 (http://voip-info.org/wiki-Asterisk+config+musiconho

; include extensions contexts for chanspy #incluce extensions_chanspy.conf ; include extension contexts generated from AMP #include extensions_additional.conf ; Customizations to this dialplan should be made in extension ; See extensions_custom.conf.sample for an example #include extensions_custom.conf
I am having troubles trying to get SPYGROUP working with freepbx and ChanSpy. On the documentation for ChanSpy it says I can assign extensions to the SPYGROUP and then I will only be able to listen in on the extensions in the group. For eacmple below is the sample configuration to setup a spygroup for sales and for crm.

[crm-agents-site2] exten => _[1-6]XXX,1,SetVar(SPYGROUP=CRM) exten => _[1-6]XXX,2,Dial(IAX2/g2/${EXTEN},15,tTwW) [sales-agents-site2] exten => _[1-6]XXX,1,SetVar(SPYGROUP=SALES) exten => _[1-6]XXX,2,Dial(IAX2/g2/${EXTEN},15,tTwW) [app-chanspy-crm-agents] exten => _*53,1,SetVar(SPYGROUP=CRM) exten => _*53,2,ChanSpy(|g(CRM)q) [app-chanspy-sales-agents] exten => _*54,1,SetVar(SPYGROUP=SALES) exten => _*54,2,ChanSpy(|g(SALES)q)

6 de 7

14/05/2008 07:00 p.m.

ChanSpy - Customization in FreePBX | FreePBX

http://www.freepbx.org/forum/chanspy-customization-in-freepbx

I would like to implement something like this in freepbx or at least modify the configuration files so it would be possible. Does anyone know if I could make these changes without losing my configuration each time I change something in freepbx?

ChanSpy - Customization in FreePBX


(/forum/chanspy-customization-in-freepbx#comment-5687)
On June 29th, 2007 erolfornoles (tadpole) said:

I've made a custom ChanSpy context:

[app-chanspy-custom] exten => 5555,1,Answer exten => 5555,2,Wait(1) exten => 5555,3,Goto(custom-app-enh-chanspy,s,1) exten => 5555,4,Hangup [custom-app-enh-chanspy] exten => s,1,BackGround(please-enter-the) exten => s,n,Read(SPYNUM|extension) exten => s,n,ChanSpy(SIP/${SPYNUM}|w)
Works okay, except when I enabled the User Login/Logoff feature codes. How do I ChanSpy a user that has logged into his or her phone via the *11 feature code without knowing his device number? Let's say User 4004 is logged into Device 2002. Instead of entering 2002, I would like to enter 4004 instead. Any leads on how to do this? Thanks![/code]

__________________ Erol M. Fornoles

7 de 7

14/05/2008 07:00 p.m.

Vous aimerez peut-être aussi