[Asterisk-Dev] Creating Virtual PBX Partitions
John Todd
jtodd at loligo.com
Mon Jul 12 12:01:38 MST 2004
At 8:55 AM -0500 on 7/12/04, Steven Sokol wrote:
> >Setting accountcode in sip.conf doesn't work for you in this
>>circumstance? That can be used as a unique identifier, if I
>>understand your question correctly.
>
>Yes, that works, but I hate to take up a billing field with operational
>data. Clients may well want to use the accountcode field for a cost center
>code or other non-unique value (i.e. everyone in Sales is given the Sales
>cost center code).
>
>I suppose I can use that until somebody complains that their CDR have "funny
>data" in the account code.
>
>I still think that this and other functions make it useful to know the
>user/peer name.
>
>S.
You could use the poor man's database hack and make the sequence of
numbers a fixed length, and then suffix or prefix different things in
there.
XXXXYYYYY
where "XXXX" was the identity of the user and "YYYY" was the true
account code. On passing the call into the dialplan, the first thing
you could do would be to chop up the accountcode number and put each
part into different variables. Then, use SetAccount to make the
account code the YYYY value to eliminate the other cruft.
Crude, ugly, awful, functional. Here's your Asterisk badge <swap> go
out and wear it with pride.
JT
More information about the asterisk-dev
mailing list