[Home]

Summary:ASTERISK-00441: [patch] Forward of the accountcode over IAX2
Reporter:lele (lele)Labels:
Date Opened:2003-10-28 03:51:04.000-0600Date Closed:2004-09-25 02:49:38
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) accountcode.txt
Description:My need was to be able to retain the accountcode of a transferred call for CDR purposes.

This patch allows to optionally forward the accountcode via IAX2 only: this way the box that receives a call gets the same accountcode the user was registered with on the transferring box. The receiving box can optionally accept the accountcode and use it for CDR identification.

This is IAX2 only

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

I'm adding two new configuration directives in iax.conf:

sendinfo=[yes|no] default no.
We want to send the peer an accountcode and possibly more info about the call to be added later (i'm thinking about a network-unique-id that follows a call across your entire network)

trusted=[yes!no] default no
This identifies the user as "trusted" so we accept the "info" he is sending, including accountcode, and use it locally (or forward to the next iax peer)

Comments:By: Olle Johansson (oej) 2004-03-22 16:27:47.000-0600

This bug needs more testers and positive reports. Anyonen else that tested it?

By: Olle Johansson (oej) 2004-04-06 03:29:26

Message sent out on -dev list.

By: flavour (flavour) 2004-04-06 07:15:57

Doesn't patch cleanly against current CVS HEAD
- shame as I agree that this functionality would be useful...

patching file apps/app_dial.c
Hunk #1 succeeded at 627 (offset 40 lines).
patching file channels/chan_iax2.c
Hunk #1 succeeded at 195 with fuzz 1 (offset 24 lines).
Hunk #2 succeeded at 207 with fuzz 2.
Hunk #3 succeeded at 371 (offset 33 lines).
Hunk ASTERISK-1 succeeded at 1931 with fuzz 2 (offset 420 lines).
Hunk ASTERISK-2 FAILED at 1960.
Hunk ASTERISK-3 succeeded at 1676 (offset 11 lines).
Hunk ASTERISK-4 succeeded at 2149 with fuzz 1 (offset 423 lines).
Hunk ASTERISK-5 succeeded at 2765 (offset 92 lines).
Hunk ASTERISK-6 FAILED at 2824.
Hunk ASTERISK-7 succeeded at 5405 (offset 696 lines).
Hunk ASTERISK-8 succeeded at 4814 (offset 92 lines).
Hunk ASTERISK-9 succeeded at 5435 (offset 696 lines).
Hunk ASTERISK-10 succeeded at 5061 (offset 95 lines).
Hunk ASTERISK-11 succeeded at 5778 (offset 730 lines).
Hunk ASTERISK-12 succeeded at 5528 (offset 147 lines).
2 out of 16 hunks FAILED -- saving rejects to file channels/chan_iax2.c.rej
patching file channels/iax2-parser.c
Hunk #1 FAILED at 120.
Hunk #2 succeeded at 519 with fuzz 2 (offset 12 lines).
1 out of 2 hunks FAILED -- saving rejects to file channels/iax2-parser.c.rej
patching file channels/iax2-parser.h
Hunk #1 FAILED at 44.
1 out of 1 hunk FAILED -- saving rejects to file channels/iax2-parser.h.rej
patching file channels/iax2.h
Hunk #1 FAILED at 104.
1 out of 1 hunk FAILED -- saving rejects to file channels/iax2.h.rej

edited on: 04-06-04 06:07

By: John Todd (jtodd) 2004-04-06 09:28:10

I believe this is a useful patch, though I am sorry to say I don't have time to test right now.  In fact, the ability to move other variables across the IAX2 channel would be very much appreciated (not just accountcode) so that I don't have to hack together TCP applications to do that out of band and then match up with ugly "cut" processes.

By: jerjer (jerjer) 2004-04-06 13:46:09

I can see some possible uses for this patch, but one would have to make absolutely sure it is secure...like not sending clear text over the wire.

my 2 pesos

By: Olle Johansson (oej) 2004-04-24 16:59:12

lele: Have you disclaimed this patch to Digium (see http://bugs.digium.com for more info) ??

All: Any more test results?

Can we make this more general, following the syntax for internal variable passing that we're working on?

_VARIABLE is always transfered - arrives as VARIABLE (no _)
__VARIABLE is always transfered - arrives as __VARIABLE (two underscores, stays)
Meaning that the later variable will continue to be transferred if forwarded over a second IAX2 link.

By: Olle Johansson (oej) 2004-04-26 16:16:46

reminder...

By: lele (lele) 2004-04-26 16:59:19

I have disclamed long time ago. There are already a few of my patches in * code

By: Mark Spencer (markster) 2004-04-28 22:40:15

It's an interesting patch, but I don't think I want to see account code carried across IAX2 in general.