VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
matt at venturevoip.com Guest
|
Posted: Tue Sep 15, 2009 6:20 am Post subject: [Freeswitch-users] Limit_Hash |
|
|
Hi,
I've moved this discussion to users as it seems my query is moving in
that direction
So, upon looking at limit_hash, it appears to do what I need to do.
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.
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?
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
--
Cheers,
Matt Riddell
Director
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
lists at venturevoip.com Guest
|
Posted: Wed Sep 16, 2009 5:52 am Post subject: [Freeswitch-users] Limit_Hash |
|
|
Hi,
Didn't see this one come through before when I posted it, so sending it
again - apologies if it did come through.
I've moved this discussion to users as it seems my query is moving in
that direction
So, upon looking at limit_hash, it appears to do what I need to do.
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.
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?
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
--
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)
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
rupa at rupa.com Guest
|
Posted: Wed Sep 16, 2009 9:08 am Post subject: [Freeswitch-users] Limit_Hash |
|
|
On Wed, Sep 16, 2009 at 5:40 AM, Matt Riddell <lists@venturevoip.com> wrote:
Quote: | 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.
Quote: | 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
Quote: | 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.
Quote: | --
Cheers,
Matt Riddell
Director
|
--
-Rupa
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
irmatov at gmail.com Guest
|
Posted: Thu Sep 17, 2009 9:26 am Post subject: [Freeswitch-users] Limit_Hash |
|
|
Hi,
On Tue, Sep 15, 2009 at 4:10 PM, Matt Riddell <matt@venturevoip.com> wrote:
Quote: | My question then becomes, how do I set a hash for an originated call?
|
You set a limit by executing limit_hash application at appropriate
place in your dial plan.
Quote: | 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.
|
Correct, limit_hash is an application.
Quote: | 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?
|
Somehow you need an ability to distinguish one customer from another.
For example, if each customer has its own number and originates calls
only from this number, you can use this number for limiting their
usage.
Quote: | 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?
|
No, <realm> is just an arbitrary string to allow you have same <id>s
in different realms. For example, realm can be a name of your
customer, and <id> can be a direction of call, so you can set a limit
of 5 outbound and 3 inbound calls per customer:
....
<action application="limit_hash" data="customer1 out 5"/>
....
<action application="limit_hash" data="customer1 in 3"/>
....
Of course, those two lines should be placed to appropriate (and most
probably separate) places of your dialplan.
So, back to your example. Three customers, 3 outbound calls per each.
Let's suppose customer 1, 2 and 3 have numbers 1001, 1002, 1003
assigned to them, and customer1 originates calls from 1001, and so
on.. You place the limit like this:
<extension name="customer_calls">
<condition field="destination_number" expression="^0([0-9]+)$">
<action application="limit_hash" data="customer ${caller-id-number} 3"/>
<action application="bridge" data="sofia/gateway/mygate/$1" />
</condition>
</extension>
You should see messages in console about limits during live calls.
Also, bear in mind that if you place a limit in one dialplan context
and then transfer your call to another, limit will be reset. Does
anyone know, why it is like this? Is it possible to allow limits
persist across dialplan contexts?
--
Timur Irmatov, xmpp:irmatov@jabber.ru
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|