[asterisk-dev] Passing AOC information across channels

Adam Goryachev mailinglists at websitemanagers.com.au
Tue Jan 31 02:06:22 MST 2006


On Tue, 2006-01-31 at 08:22 +0100, Koopmann, Jan-Peter wrote:
> On Tuesday, January 31, 2006 6:27 AM Tilghman Lesher wrote: 
> > Given that these messages can occur at any time during a call
> > (beginning, middle, or end), it really does beg for a frametype. 
> > Channel variables are really only appropriate for messages which
> > appear exclusively at the beginning of a call.  If you want to relay
> > AOC which appears towards the middle or end, you need a frame to pass
> > along the information.   
> 
> Would it not be possible to optinally declare some sort of transition
> function or hook? If this is not declared the costs simply go through
> untouched (good for putting * in front of your own PBX). If you declare
> the function it is called for every AOC frame that comes into the
> system. The function would need the original AOC values, the number
> dialed and the channel used. With this information a service provider
> can then change the AOC values to any value appropriate to him. No clue
> how to achieve this but this would solve quite a few problems.

I agree, and this was one of my first thoughts also... Why not use some
sort of FastAGI type interface... This way, the AGI can keep track of
which channel belongs to which call, and each time we get an AOC
message, we just pass:

AOC-Channel-ID: 21  (which was decided back in the original 'start' msg)
AOC-Code: D
AOC-Value: 12.32
AOC-Time: <unixtime.msec>

Then we return:
AOC-Channel-ID: 21
AOC-Code: D
AOC-Value: 13.23

Also, we might 'absorb' AOC messages without sending any at all (using
them to terminate a call once the user reaches a credit limit for
example). Further, we might absorb AOC message because our carrier
charges in n second intervals, but output AOC messages at other times
because we charge in y second intervals.

Of course, as also suggested, we can set some channel variable (like the
callerid ones) to pass AOC as-is, or to block AOC, or to pass AOC to xyz
fastagi.

Just my 0.02c...

Regards,
Adam




More information about the asterisk-dev mailing list