Let's say i have a network of * boxes connected via IAX, one of them is a "switch", one or more are the "gateways".
- An IAX[2] "customer" register himself on the "switch" (and gets an accountcode for te purpose of cdr) - The customer places a call to the "switch", the switch does some magic and decides which "gateway" the call should be forwarded - The switch authenticates the call with the "gateway" and then performs a transfer effectively connecting the "customer" directly with the "gateway" (which is something I specifically want, this rules out a notransfer=yes solution) - The "gateway" does something expensive (= calls the PSTN) I want to be billed From a CDR standpoint, i have a cdr record from the "switch" containing the accountcode for the user, but useless billing informations since the call has been transferred, The "gateway" has, of course, useful billing information, but doesn't have the original "accountcode" for the user, since the call was coming from the "switch" Given that I can't trust the callerid, and I can't set it to something else (i must accept from "customer" any callerid and pass it to the PSTN), I would like to bill the calls based on the "accountcode" for the user. Here comes the trouble: since neither the accountcode nor the uniqueid are preserved during the transfer, i do not see anything to safely correlate the accountcode with the billing records on the gateway. I can "guess" at it based on the call specific callerid, the time of day and such. But it would be guessing. A few thoughts on it: * one could pass via IAX a uniqueid when i transfer the call, and have this unique id logged in the CDR records. This way any call segment pertaining to the same phone call can be correlated for cdr purpose. * one could have the gateway allow trusted sources (the "switch") to set via IAX the "accountcode" when transferring the call, and log it as an "originalaccountcode" or even the "accountcode" itself in the cdr. This way every cdr record in the network will have a reference to the actual customer that made that event happen. * one could devise some way to give back from the "gateway" to the transferrer (the "switch") an indication that the call has ended, with that many billable_seconds. (can this be done? i do not see it that simple...) This way the switch would have all the cdr info in one cdr row. Anybody has suggestions on this? thanks lele _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users