[Home]

Summary:ASTERISK-09044: [patch] IAXVARS does not work for authenticated IAX2 channels
Reporter:craig guy (craig)Labels:
Date Opened:2007-03-19 02:38:17Date Closed:2007-08-29 12:54:35
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20070319__iax2_vars_datastore.diff.txt
( 1) 20070628__bug9315.diff.txt
( 2) iaxvars.trunk.diff
Description:The patch adds support for encoding and decoding iaxvars IE for authenticated IAX2 calls.

First, the original patch only supports IAX variables
on unauthenticated calls. The calls being made between boxA and
boxB are authenticated calls. The IE variables were being
transported in the IAX_COMMAND_NEW frame. This is too early for
authenticated calls since the channel isn't available until the call
has been authenticated, which occurs during the processing of the
subsequent IAX_COMMAND_AUTHREP frame. Second acf_iaxvar_read was not
returning the result correctly.

The simplest solution I found was to:
a) Attach the IAX variables to both the IAX_COMMAND_AUTHREP frame in
addition to the IAX_COMMAND_NEW frame. In the case of an authenticated
call the variables attached to the IAX_COMMAND_NEW frame are ignored.
b) Add support for populating the IAX variables into the channel while
processing the IAX_COMMAND_AUTHREP.
c) Minor fix to acf_iaxvar_read

IAXVARS allows push and pull of dialplan variables between asterisk systems via IAX2 channel.  Corydon76 introduced a patch in support of this feature.  However the patch does not allow variable passing across authenticated IAX2 channels.  The following patch to chan_iax2.c rectifies this.

The patch applies cleanly to trunk, SVN 58924 chan_iax2.c
The patch has not been tested against trunk as we run 1.2.16 internally, and the patch was developed against 1.2.16 and then ported back to trunk.  If someone could please test against trunk and report back.  The changes are very minor.

****** ADDITIONAL INFORMATION ******

IAXVARS allows push and pull of dialplan variables between asterisk systems via IAX2 channel.  Corydon76 introduced a patch in support of this feature.  However the patch does not allow variable passing across authenticated IAX2 channels.  The following patch to chan_iax2.c rectifies this.

The patch applies cleanly to trunk, SVN 58924 chan_iax2.c
The patch has not been tested against trunk as we run 1.2.16 internally, and the patch was developed against 1.2.16 and then ported back to trunk.  If someone could please test against trunk and report back.  The changes are very minor.
Comments:By: craig guy (craig) 2007-03-19 02:40:17

Ooops, severity should be tweak, not minor.

By: Tim Panton (mexuar-tim) 2007-03-19 09:45:59

We had an unofficial IAX standardization meeting at eTel. A couple of things came up:
1) Mark wasn't keen on the multiple instances of a single IE type.
2) Putting the iaxvars in a New means that they aren't encrypted even if the rest of the IAX
connection is (because new is unencrypted).

The second one could be worked around by not adding the vars to a new if encryption is on.

By: Tilghman Lesher (tilghman) 2007-03-19 13:19:11

We're actually in the middle of a modification to how IAX2 variables are stored, based on kpfleming's recommendation to go with ast_storage structures instead of channel variables.  I've rolled your changes into my patch, although it still needs to be tested.

Note that ast_storage is not available in 1.2.

By: Tilghman Lesher (tilghman) 2007-06-28 15:19:22

Updated patch to current trunk, revision 72491.

By: Digium Subversion (svnbot) 2007-07-18 17:23:03

Repository: asterisk
Revision: 75805

------------------------------------------------------------------------
r75805 | tilghman | 2007-07-18 17:23:02 -0500 (Wed, 18 Jul 2007) | 2 lines

Change IAX variables to use datastores (closes issue ASTERISK-9044)

------------------------------------------------------------------------

By: Digium Subversion (svnbot) 2007-08-29 10:02:59

Repository: asterisk
Revision: 81335

------------------------------------------------------------------------
r81335 | tilghman | 2007-08-29 10:02:59 -0500 (Wed, 29 Aug 2007) | 2 lines

Changed one too many variable settings in issue ASTERISK-9044 (closes issue ASTERISK-10191)

------------------------------------------------------------------------

By: Digium Subversion (svnbot) 2007-08-29 12:54:35

Repository: asterisk
Revision: 81352

------------------------------------------------------------------------
r81352 | murf | 2007-08-29 12:54:32 -0500 (Wed, 29 Aug 2007) | 128 lines

Merged revisions 81326,81332-81335,81341,81343-81345,81347-81348,81350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r81326 | file | 2007-08-28 20:21:08 -0600 (Tue, 28 Aug 2007) | 2 lines

Add inline function for signed linear subtraction.

................
r81332 | file | 2007-08-29 08:16:07 -0600 (Wed, 29 Aug 2007) | 12 lines

Merged revisions 81331 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81331 | file | 2007-08-29 11:13:55 -0300 (Wed, 29 Aug 2007) | 4 lines

(closes issue ASTERISK-9405)
Reported by: mattv
Make rtp timeouts work even if two RTP streams are directly bridged in the RTP stack.

........

................
r81333 | mmichelson | 2007-08-29 08:19:33 -0600 (Wed, 29 Aug 2007) | 5 lines

Changing a NOTICE to a DEBUG.

(closes issue ASTERISK-10190, reported and patched by junky, with small modification by me)


................
r81334 | file | 2007-08-29 09:19:11 -0600 (Wed, 29 Aug 2007) | 2 lines

Add API calls for iterating through an event. This should allow events to have multiple information elements (while there was nothing preventing it before you could not actually access any except the first one).

................
r81335 | tilghman | 2007-08-29 09:21:10 -0600 (Wed, 29 Aug 2007) | 2 lines

Changed one too many variable settings in issue ASTERISK-9044 (closes issue ASTERISK-10191)

................
r81341 | mmichelson | 2007-08-29 09:57:27 -0600 (Wed, 29 Aug 2007) | 16 lines

Merged revisions 81340 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81340 | mmichelson | 2007-08-29 10:52:42 -0500 (Wed, 29 Aug 2007) | 8 lines

This fix creates a more accurate way of detecting whether realtime members were deleted.
(closes issue 10541, reported by Alric, patched by me)

The REALLY nice things about this patch is that queue members now have a "realtime" field
which will be true if the member is a realtime member. This means we can check this value
prior to certain processing if it should ONLY be done for realtime members.


........

................
r81343 | russell | 2007-08-29 09:59:10 -0600 (Wed, 29 Aug 2007) | 11 lines

Merged revisions 81342 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81342 | russell | 2007-08-29 10:57:29 -0500 (Wed, 29 Aug 2007) | 3 lines

If chan_h323 is not being built, don't use g++ to do the final link of Asterisk.
(in response to a question on the asterisk-dev list)

........

................
r81344 | file | 2007-08-29 10:03:51 -0600 (Wed, 29 Aug 2007) | 2 lines

To keep others happy... revert part of my additions so trunk works.

................
r81345 | file | 2007-08-29 10:07:35 -0600 (Wed, 29 Aug 2007) | 2 lines

This concludes bringing trunk back to a working state.

................
r81347 | mmichelson | 2007-08-29 10:09:02 -0600 (Wed, 29 Aug 2007) | 11 lines

Merged revisions 81346 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81346 | mmichelson | 2007-08-29 11:08:09 -0500 (Wed, 29 Aug 2007) | 3 lines

Changed some tabs to spaces


........

................
r81348 | file | 2007-08-29 10:25:30 -0600 (Wed, 29 Aug 2007) | 2 lines

Return ast_event_get_ie_raw to using an iterator and fix logic in ast_event_iterator_next.

................
r81350 | mmichelson | 2007-08-29 10:39:40 -0600 (Wed, 29 Aug 2007) | 20 lines

Merged revisions 81349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r81349 | mmichelson | 2007-08-29 11:35:29 -0500 (Wed, 29 Aug 2007) | 12 lines

This patch, in essence, will correctly pause a realtime queue member and reflect those
changes in the realtime engine.

(issue ASTERISK-10060, reported by irroot, patch by me)

This patch creates a new function called update_realtime_member_field, which is a generic
function which will allow any one field of a realtime queue member to be updated. This patch
only uses this function to update the paused status of a queue member, but it lays the foundation
for persisting the state of a realtime member the same way that static members' state is maintained
when using the persistentmembers setting


........

................

------------------------------------------------------------------------