[Freeswitch-dev] Add accountcode to Show Channels

Matt Riddell lists at venturevoip.com
Mon Sep 14 23:21:57 PDT 2009


On 15/09/09 6:13 PM, Trixter aka Bret McDanel wrote:
> On Tue, 2009-09-15 at 16:24 +1200, Matt Riddell wrote:
>
>> 2. Check how many calls the system currently has (broken down by
>> accountcode so that I can restrict individual accounts).
>
> could this be done with mod_limit with the key as the customer id that
> you set as a variable with originate?

I should have been more accurate - basically I'm looking to maintain a 
number of channels through increasing and decreasing call rate - 
basically repurposing the predictive engine in SmoothTorque.

>> So, in Asterisk the way we do it is "show channels concise"  which
>> provides a list of channels with their details (much the same as
>> freeswitch), but also provides the accountcode which allows me to group
>> the calls.
>
> well you could potentially just view the limit data that is set with
> mod_limit and get this info, if that is a suitable solution.  I really
> dont have a firm grasp of what it is that you want to do so I dont know
> if this is acceptable for other reasons.

The problem is that I'll also need to see where in the dialplan each 
channel is up to and then from there relate back to customers.

With "show channels" this other info is also provided - although I'll 
look into mod_limit.

>> esl_send_recv(&ser->handle, "bgapi originate
>> {variable_accountcode=bar}sofia/internal/1000%x.x.x.x 9999\n\n");
>>
>> Then the accountcode is blank - maybe because it is initially set up
>> without one and the variable is set later?
>
> where is it blank?  In your patch?  Would the mod_limit stuff help so
> that you dont have to approach it this way and still have every feature
> that you want?

Yeah, basically the patch just copies the accountcode into the channel 
in the sqlite db.

I'd love to be able to do it some other way!  I'm not in any way tied to 
making it work like Asterisk :)  In fact I have even created a new SVN 
branch for dealing with this even though the code will support both 
Asterisk and FreeSwitch :)

I'll have a look at mod_limit and maybe that's a better place to patch 
if need be.

-- 
Cheers,

Matt Riddell
Director
_______________________________________________

http://www.venturevoip.com/news.php (Daily Asterisk News)
http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer)
http://www.venturevoip.com/c3.php (ConduIT3 PABX Systems)



More information about the FreeSWITCH-dev mailing list