Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Chanspy on Asterisk 1.4.19


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
steve at rawlings.demo...
Guest





PostPosted: Wed Apr 16, 2008 12:51 pm    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

Hi all,

I've just upgraded to 1.4.19 from 1.4.18.1 and now have problems with
app_chanspy. To monitor I use -

exten => 596,1,ringing
exten => 596,n,Wait(1)
exten => 596,n,ChanSpy(|g(2000))
exten => 596,n,Hangup

and the listened-to channel as follows -

exten => _77XXXX,1,Set(SPYGROUP=2000)
exten => _77XXXX,n,Dial(Zap/g2/${EXTEN:2})

This worked fine with 1.4.18.1. With 1.4.19 if I dial 596 I get answered
but there's no spying, the only way I could get this to work was with -

exten => 596,n,ChanSpy(|b)

but this spied on all channels, not just those with SPYGROUP set to 2000
so not much use to us.

I've recompiled Asterisk 1.4.19 with app_chanspy.c from 1.4.18.1 and it
works again. I'm using latest zaptel, libpri and addons on CentOS 4.4.
Changelog in 1.4.19 shows some changes to app_chanspy to stop asterisk
crashes and other improvements so would be nice to have the fixes maybe.

Anyone any ideas?

Regards,

Steve
Back to top
jsmith at digium.com
Guest





PostPosted: Wed Apr 16, 2008 1:53 pm    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

On Wed, 2008-04-16 at 18:51 +0100, Steve Rawlings wrote:
Quote:
This worked fine with 1.4.18.1. With 1.4.19 if I dial 596 I get answered
but there's no spying, the only way I could get this to work was with -

exten => 596,n,ChanSpy(|b)

but this spied on all channels, not just those with SPYGROUP set to 2000
so not much use to us.

I've recompiled Asterisk 1.4.19 with app_chanspy.c from 1.4.18.1 and it
works again. I'm using latest zaptel, libpri and addons on CentOS 4.4.
Changelog in 1.4.19 shows some changes to app_chanspy to stop asterisk
crashes and other improvements so would be nice to have the fixes maybe.

It sounds like there may have been some sort of regression introduced in
the changes between 1.4.18.1 and 1.4.19. Would you mind opening a
ticket on the bug tracker so that the developers can make sure it gets
addressed?
--
Jared Smith
Community Relations Manager
Digium, Inc.
Back to top
sean.bright at gmail.com
Guest





PostPosted: Thu Apr 17, 2008 8:44 am    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

Steve Rawlings wrote:
Quote:
exten => 596,n,ChanSpy(|g(2000))

...snip...

Quote:
This worked fine with 1.4.18.1. With 1.4.19 if I dial 596 I get answered
but there's no spying, the only way I could get this to work was with -

exten => 596,n,ChanSpy(|b)

but this spied on all channels, not just those with SPYGROUP set to 2000
so not much use to us.

You can pass multiple options to a dialplan application, so instead of
downgrading ChanSpy, you could have just done:

exten => 596,n,ChanSpy(|bg(2000))

Or am I missing something?

--
Sean Bright
sean.bright at gmail.com
Back to top
stotaro at totarotechn...
Guest





PostPosted: Thu Apr 17, 2008 9:58 am    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

On Thu, Apr 17, 2008 at 9:44 AM, Sean Bright <sean.bright at gmail.com> wrote:
Quote:
Steve Rawlings wrote:


Quote:
exten => 596,n,ChanSpy(|g(2000))

...snip...


Quote:
This worked fine with 1.4.18.1. With 1.4.19 if I dial 596 I get answered
but there's no spying, the only way I could get this to work was with -

exten => 596,n,ChanSpy(|b)

but this spied on all channels, not just those with SPYGROUP set to 2000
so not much use to us.

You can pass multiple options to a dialplan application, so instead of
downgrading ChanSpy, you could have just done:

exten => 596,n,ChanSpy(|bg(2000))

Or am I missing something?

--
Sean Bright
sean.bright at gmail.com

Should one have to change their dialplan for functionality to remain
the same in the same version?

I thought it was only really supposed to change when something is
deprecated (and documented in a README or something after throwing
warnings for a version or so.)

Thanks,
Steve Totaro
Back to top
sean.bright at gmail.com
Guest





PostPosted: Thu Apr 17, 2008 11:31 am    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

Steve Totaro wrote:

Quote:
Should one have to change their dialplan for functionality to remain
the same in the same version?

I wasn't suggesting it wasn't a regression, just making the OP aware
that he can pass multiple arguments to a dialplan application (i.e.
ChanSpy(|bg(2000)))

He mentioned that he was able to get it to work in 1.4.19 by passing the
bridge argument ('b') but didn't seem to be aware that he could also
pass his original argument list ('g(2000)') as well. Seems easier to
just work around the problem with the additional argument than to
backport the application.

--
Sean Bright
sean.bright at gmail.com
Back to top
steve at rawlings.demo...
Guest





PostPosted: Thu Apr 17, 2008 1:10 pm    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

Guys,

Sean Bright wrote:
Quote:
Steve Totaro wrote:

Quote:
Should one have to change their dialplan for functionality to remain
the same in the same version?

I wasn't suggesting it wasn't a regression, just making the OP aware
that he can pass multiple arguments to a dialplan application (i.e.
ChanSpy(|bg(2000)))

He mentioned that he was able to get it to work in 1.4.19 by passing the
bridge argument ('b') but didn't seem to be aware that he could also
pass his original argument list ('g(2000)') as well. Seems easier to
just work around the problem with the additional argument than to
backport the application.


Yes I was aware of multiple arguments, I did try chanspy(|bg(2000)), I
tried all combinations I could think of. Although maybe what I should
have said was I tried chanspy(|b) just to prove chanspy itself was
working at all (and it was), with chanspy(|bg(2000)) the 'spygroup'
element didn't work, it just spied on every active call.

Anyway, I've raised a bug report as requested by Jared at Digium.

Steve
Back to top
list at virtutel.ca
Guest





PostPosted: Thu Apr 17, 2008 1:20 pm    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

My own Chanspy(g(GROUPNAME)) works 2 times out of three (roughly). The
other time, it crashes Asterisk. Using 1.4.19 too.

Mike

Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
Steve Rawlings
Sent: Thursday, April 17, 2008 14:10
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

Guys,

Sean Bright wrote:
Quote:
Steve Totaro wrote:

Quote:
Should one have to change their dialplan for functionality
to remain
Quote:
Quote:
the same in the same version?

I wasn't suggesting it wasn't a regression, just making the
OP aware
Quote:
that he can pass multiple arguments to a dialplan application (i.e.
ChanSpy(|bg(2000)))

He mentioned that he was able to get it to work in 1.4.19
by passing
Quote:
the bridge argument ('b') but didn't seem to be aware that he could
also pass his original argument list ('g(2000)') as well. Seems
easier to just work around the problem with the additional argument
than to backport the application.


Yes I was aware of multiple arguments, I did try
chanspy(|bg(2000)), I tried all combinations I could think
of. Although maybe what I should have said was I tried
chanspy(|b) just to prove chanspy itself was working at all
(and it was), with chanspy(|bg(2000)) the 'spygroup'
element didn't work, it just spied on every active call.

Anyway, I've raised a bug report as requested by Jared at Digium.

Steve


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
sean.bright at gmail.com
Guest





PostPosted: Thu Apr 17, 2008 1:45 pm    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

Ah. My apologies for the confusion. Not that it helps you a great
deal, but I am running ChanSpy successfully in production (as we speak)
with 1.4.19 with no crashes or the like:

ChanSpy(SIP/11,g(Spyable))

Maybe its only a problem if no channel spec is passed?

Steve Rawlings wrote:
Quote:
Guys,

Sean Bright wrote:
Quote:
Steve Totaro wrote:

Quote:
Should one have to change their dialplan for functionality to remain
the same in the same version?
I wasn't suggesting it wasn't a regression, just making the OP aware
that he can pass multiple arguments to a dialplan application (i.e.
ChanSpy(|bg(2000)))

He mentioned that he was able to get it to work in 1.4.19 by passing the
bridge argument ('b') but didn't seem to be aware that he could also
pass his original argument list ('g(2000)') as well. Seems easier to
just work around the problem with the additional argument than to
backport the application.


Yes I was aware of multiple arguments, I did try chanspy(|bg(2000)), I
tried all combinations I could think of. Although maybe what I should
have said was I tried chanspy(|b) just to prove chanspy itself was
working at all (and it was), with chanspy(|bg(2000)) the 'spygroup'
element didn't work, it just spied on every active call.

Anyway, I've raised a bug report as requested by Jared at Digium.

Steve


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

--
Sean Bright
sean.bright at gmail.com
Back to top
mmichelson at digium.com
Guest





PostPosted: Thu Apr 17, 2008 4:18 pm    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

Mike wrote:
Quote:
My own Chanspy(g(GROUPNAME)) works 2 times out of three (roughly). The
other time, it crashes Asterisk. Using 1.4.19 too.

Mike

Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
Steve Rawlings
Sent: Thursday, April 17, 2008 14:10
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

Guys,

Sean Bright wrote:
Quote:
Steve Totaro wrote:

Quote:
Should one have to change their dialplan for functionality
to remain
Quote:
Quote:
the same in the same version?
I wasn't suggesting it wasn't a regression, just making the
OP aware
Quote:
that he can pass multiple arguments to a dialplan application (i.e.
ChanSpy(|bg(2000)))

He mentioned that he was able to get it to work in 1.4.19
by passing
Quote:
the bridge argument ('b') but didn't seem to be aware that he could
also pass his original argument list ('g(2000)') as well. Seems
easier to just work around the problem with the additional argument
than to backport the application.

Yes I was aware of multiple arguments, I did try
chanspy(|bg(2000)), I tried all combinations I could think
of. Although maybe what I should have said was I tried
chanspy(|b) just to prove chanspy itself was working at all
(and it was), with chanspy(|bg(2000)) the 'spygroup'
element didn't work, it just spied on every active call.

Anyway, I've raised a bug report as requested by Jared at Digium.

Steve

This was an incredibly subtle bug that was introduced into 1.4.19 when the other
work was done on chanspy to fix crashes and deadlocks. It has been fixed in 1.4
in SVN revision 114226.

Basically, chanspy was a crapshoot if you didn't specify a first argument,
because the function intended to walk through the list of active channels would
always end up returning the first channel it found. If that happened to be a
spy-able channel, then great, otherwise you'd never spy on anything.

Mark Michelson
Back to top
list at virtutel.ca
Guest





PostPosted: Thu Apr 17, 2008 10:14 pm    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
Mark Michelson
Sent: Thursday, April 17, 2008 17:18
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

Mike wrote:
Quote:
My own Chanspy(g(GROUPNAME)) works 2 times out of three (roughly).
The other time, it crashes Asterisk. Using 1.4.19 too.

Mike

Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf
Of Steve
Quote:
Quote:
Rawlings
Sent: Thursday, April 17, 2008 14:10
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

Guys,

Sean Bright wrote:
Quote:
Steve Totaro wrote:

Quote:
Should one have to change their dialplan for functionality
to remain
Quote:
Quote:
the same in the same version?
I wasn't suggesting it wasn't a regression, just making the
OP aware
Quote:
that he can pass multiple arguments to a dialplan
application (i.e.
Quote:
Quote:
Quote:
ChanSpy(|bg(2000)))

He mentioned that he was able to get it to work in 1.4.19
by passing
Quote:
the bridge argument ('b') but didn't seem to be aware
that he could
Quote:
Quote:
Quote:
also pass his original argument list ('g(2000)') as well. Seems
easier to just work around the problem with the
additional argument
Quote:
Quote:
Quote:
than to backport the application.

Yes I was aware of multiple arguments, I did try
chanspy(|bg(2000)),
Quote:
Quote:
I tried all combinations I could think of. Although maybe what I
should have said was I tried
chanspy(|b) just to prove chanspy itself was working at
all (and it
Quote:
Quote:
was), with chanspy(|bg(2000)) the 'spygroup'
element didn't work, it just spied on every active call.

Anyway, I've raised a bug report as requested by Jared at Digium.

Steve

This was an incredibly subtle bug that was introduced into
1.4.19 when the other work was done on chanspy to fix crashes
and deadlocks. It has been fixed in 1.4 in SVN revision 114226.

Basically, chanspy was a crapshoot if you didn't specify a
first argument, because the function intended to walk through
the list of active channels would always end up returning the
first channel it found. If that happened to be a spy-able
channel, then great, otherwise you'd never spy on anything.

Mark Michelson
Mark,

I added a first argument. Here is my line now:
exten => *012,n,Chanspy(SIP,qg(GROUP_NAME))

Unfortunately, that still crashes Asterisk once out of 3-5 times. Is there
anyway to absolutely prevent crashes with this bug in vanilla 1.4.19?

Thanks,

Mike
Back to top
anthonyf at rockynet.com
Guest





PostPosted: Thu Apr 17, 2008 10:26 pm    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

I saw a patch attached to that bug report, just download it run patch
and then make clean && make install, restart asterisk and you should be
smokin.

Mike wrote:
Quote:



Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
Mark Michelson
Sent: Thursday, April 17, 2008 17:18
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

Mike wrote:

Quote:
My own Chanspy(g(GROUPNAME)) works 2 times out of three (roughly).
The other time, it crashes Asterisk. Using 1.4.19 too.

Mike


Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf

Of Steve

Quote:
Quote:
Rawlings
Sent: Thursday, April 17, 2008 14:10
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

Guys,

Sean Bright wrote:

Quote:
Steve Totaro wrote:


Quote:
Should one have to change their dialplan for functionality

to remain

Quote:
Quote:
the same in the same version?

I wasn't suggesting it wasn't a regression, just making the

OP aware

Quote:
that he can pass multiple arguments to a dialplan

application (i.e.

Quote:
Quote:
Quote:
ChanSpy(|bg(2000)))

He mentioned that he was able to get it to work in 1.4.19

by passing

Quote:
the bridge argument ('b') but didn't seem to be aware

that he could

Quote:
Quote:
Quote:
also pass his original argument list ('g(2000)') as well. Seems
easier to just work around the problem with the

additional argument

Quote:
Quote:
Quote:
than to backport the application.


Yes I was aware of multiple arguments, I did try

chanspy(|bg(2000)),

Quote:
Quote:
I tried all combinations I could think of. Although maybe what I
should have said was I tried
chanspy(|b) just to prove chanspy itself was working at

all (and it

Quote:
Quote:
was), with chanspy(|bg(2000)) the 'spygroup'
element didn't work, it just spied on every active call.

Anyway, I've raised a bug report as requested by Jared at Digium.

Steve

This was an incredibly subtle bug that was introduced into
1.4.19 when the other work was done on chanspy to fix crashes
and deadlocks. It has been fixed in 1.4 in SVN revision 114226.

Basically, chanspy was a crapshoot if you didn't specify a
first argument, because the function intended to walk through
the list of active channels would always end up returning the
first channel it found. If that happened to be a spy-able
channel, then great, otherwise you'd never spy on anything.

Mark Michelson



Mark,

I added a first argument. Here is my line now:
exten => *012,n,Chanspy(SIP,qg(GROUP_NAME))

Unfortunately, that still crashes Asterisk once out of 3-5 times. Is there
anyway to absolutely prevent crashes with this bug in vanilla 1.4.19?

Thanks,

Mike


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


--
Thank you and have any kind of day you want,

Anthony Francis
Rockynet VOIP
(303) 444-7052 opt 2
voip at rockynet.com
Back to top
list at virtutel.ca
Guest





PostPosted: Fri Apr 18, 2008 8:24 am    Post subject: [asterisk-users] Chanspy on Asterisk 1.4.19 Reply with quote

Anthony,

What bug report ID# would that be? Not being a dev I find it hard to know
which of the 4 chanspy bug I need a patch for, since none of them seem to
refer to a 1.4.19 bug.

Mike

Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of
Anthony Francis
Sent: Thursday, April 17, 2008 23:27
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

I saw a patch attached to that bug report, just download it
run patch and then make clean && make install, restart
asterisk and you should be smokin.

Mike wrote:
Quote:



Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Michelson
Sent: Thursday, April 17, 2008 17:18
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

Mike wrote:

Quote:
My own Chanspy(g(GROUPNAME)) works 2 times out of three
(roughly).
Quote:
Quote:
Quote:
The other time, it crashes Asterisk. Using 1.4.19 too.

Mike


Quote:
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf

Of Steve

Quote:
Quote:
Rawlings
Sent: Thursday, April 17, 2008 14:10
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Chanspy on Asterisk 1.4.19

Guys,

Sean Bright wrote:

Quote:
Steve Totaro wrote:


Quote:
Should one have to change their dialplan for functionality

to remain

Quote:
Quote:
the same in the same version?

I wasn't suggesting it wasn't a regression, just making the

OP aware

Quote:
that he can pass multiple arguments to a dialplan

application (i.e.

Quote:
Quote:
Quote:
ChanSpy(|bg(2000)))

He mentioned that he was able to get it to work in 1.4.19

by passing

Quote:
the bridge argument ('b') but didn't seem to be aware

that he could

Quote:
Quote:
Quote:
also pass his original argument list ('g(2000)') as
well. Seems
Quote:
Quote:
Quote:
Quote:
Quote:
easier to just work around the problem with the

additional argument

Quote:
Quote:
Quote:
than to backport the application.


Yes I was aware of multiple arguments, I did try

chanspy(|bg(2000)),

Quote:
Quote:
I tried all combinations I could think of. Although
maybe what I
Quote:
Quote:
Quote:
Quote:
should have said was I tried
chanspy(|b) just to prove chanspy itself was working at

all (and it

Quote:
Quote:
was), with chanspy(|bg(2000)) the 'spygroup'
element didn't work, it just spied on every active call.

Anyway, I've raised a bug report as requested by Jared at Digium.

Steve

This was an incredibly subtle bug that was introduced into
1.4.19 when the other work was done on chanspy to fix crashes and
deadlocks. It has been fixed in 1.4 in SVN revision 114226.

Basically, chanspy was a crapshoot if you didn't specify a first
argument, because the function intended to walk through
the list of
Quote:
Quote:
active channels would always end up returning the first channel it
found. If that happened to be a spy-able channel, then great,
otherwise you'd never spy on anything.

Mark Michelson



Mark,

I added a first argument. Here is my line now:
exten => *012,n,Chanspy(SIP,qg(GROUP_NAME))

Unfortunately, that still crashes Asterisk once out of 3-5
times. Is
Quote:
there anyway to absolutely prevent crashes with this bug in
vanilla 1.4.19?
Quote:

Thanks,

Mike


_______________________________________________
-- Bandwidth and Colocation Provided by
http://www.api-digital.com --
Quote:

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


--
Thank you and have any kind of day you want,

Anthony Francis
Rockynet VOIP
(303) 444-7052 opt 2
voip at rockynet.com


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services