[Home]

Summary:ASTERISK-02415: [post-1.0 patch] ANI II exposed as a VAR in dialplan.
Reporter:Brian West (bkw918)Labels:
Date Opened:2004-09-15 14:55:04Date Closed:2004-10-03 17:49:17
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_zap_diff.txt
Description:Corydon says but 2278 makes this easy.. or we can modify the ast_channel struct to hold that info.  libpri was recently patched to know this info "ANI II" in q931.c but I would like that two digit code in the dialplan as ${ANIII} or the like.

bkw
Comments:By: Tilghman Lesher (tilghman) 2004-09-15 17:24:31

Available in ${ANI2} with this patch (provided that patch 2278 is already applied).

By: Mark Spencer (markster) 2004-09-15 18:14:26

How about a version that doesn't require the other code since that's not going to make it pre 1.0

By: Tilghman Lesher (tilghman) 2004-09-15 22:28:03

I don't see any glaring need for ANI2 pre-1.0.

By: Mark Spencer (markster) 2004-09-16 14:46:29

Is it at all valuable to bring those constants out into a header file instead of leaving them in q931.c you think?

By: Brian West (bkw918) 2004-09-16 14:52:36

I could see if we break out more of libpri to rework it into a header file but for such a small change at this stage I don't really see the need yet.. I could be totally WRONG!!!

bkw

By: Anthony Minessale (anthm) 2004-09-16 14:55:35

Let's think nike and "Just Do It!"

By: Mark Spencer (markster) 2004-09-17 00:03:23

I applied the libpri portion, but unfortunately the zap portion is not implemented properly.  At the point the field is being set, "c" is not yet the channel, and is instead initialized to NULL meaning that the ANI2 variable is set globally.

By: Brian West (bkw918) 2004-09-17 18:07:06

Now that I think about it.. if the ANI2 is there.. why not add it to the channel struct and just forget about this ${ANI2} stuff

Then we could do something like this:

exten => 8005551212//27,1,Hangup ( double / because the other is for cidmatch)

This is just a way to block all calls from anything with ANI2 of 27...

Just an idea...

By: Brian West (bkw918) 2004-09-17 20:14:55

Take your pick.... can someone test this please.

bkw

By: Mark Spencer (markster) 2004-09-17 20:46:48

Not willing to modify struct ast_channel before 1.0 as you know.  The first patch is still wrong though because you're just converting an integer directly into a pointer, you need to snprintf or sprintf it into a string and then use it.

By: Mark Spencer (markster) 2004-09-19 11:34:05

*no* changes to channel.h, with or without options, and it's entirely unnecessary.  You had an earlier patch which made no changes to channel.h, was about 2 lines and did everything you needed *except* you didn't use sprintf into a string and instead had casted the integer directly into a string which is a recipe for a segfault.

By: Mark Spencer (markster) 2004-09-25 18:52:44

This still has the variable register stuff in it.

By: Brian West (bkw918) 2004-09-25 21:55:37

ACK you deleted MY PATCH...

Corydon76  File Deleted: chan_zap.diff

By: Tilghman Lesher (tilghman) 2004-09-26 11:37:50

09-17-04 16:29 bkw918 File Deleted: 20040915__ani2_for_bkw.diff.txt

By: Brian West (bkw918) 2004-09-30 22:19:54

sowwy this was to go in the 1.x stuff and yours was for post 1.0

By: Mark Spencer (markster) 2004-10-03 16:23:31

Already in CVS head as CALLINGANI2

By: Russell Bryant (russell) 2004-10-03 17:49:17

not included in the 1.0 branch