[Freeswitch-users] Limit_Hash

Rupa Schomaker rupa at rupa.com
Wed Sep 16 07:02:22 PDT 2009


On Wed, Sep 16, 2009 at 5:40 AM, Matt Riddell <lists at venturevoip.com> wrote:
> My question then becomes, how do I set a hash for an originated call?
>
> It seems that limit_hash is an application rather than a channel
> variable, and so far I've been doing most things without touching the
> dialplan.

Yes, it is a dialplan app.  So, you have to call it from a dialplan.

> So, say I want to originate 9 calls, 3 from 3 customers.
>
> I would like to mark the calls with my_customer_group_1 through 3, and
> then use the limit_hash_usage command to verify the count of channels in
> each group.
>
> I therefore have a few questions:
>
> 1. Can I mark a call in the originate statement?

If you don't want to bounce through the XML Dialplan, you can use an
inline dialplan instead and specify the dialplan on the originate
commandline.  The wiki has an example:

http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_InlineDialplan#Originate

> 2. How do I use the limit_hash_usage command?
>
> The wiki states:
>
> You can verify the usage of any resource with the limit_hash_usage api call.
>
> limit_hash_usage <realm> <id>
>
> Is realm the same as a SIP realm?
>
> Is id the hash that I have used to mark the call with?
>
> Just making sure :)

realm and id are just arbitrary strings.  They can be useful if you
want to do reporting out of the database (if using regular limit api,
for limit_usage it wouldn't apply).

You can provide your own meaning to realm and id.

In a multi-tenant setup, you might use domain as the realm but that
isn't necessary.

> --
> Cheers,
>
> Matt Riddell
> Director


-- 
-Rupa




More information about the FreeSWITCH-users mailing list