Load Balance Trunks
Hi All, Please help me the following 2 issues. 1- I have 100 Trunks from my SIP Provider. My provider restricts me to send only 120 minutes call duration per Trunk per each day. This means around 30 calls per Trunk per day with an ACD of 3 minutes. Please help me how to configure this if it is possible? 2- I need to send P-Preferred-Identity<sip:xxxxxxxxx@domain.com> in SIP header for each Trunk while dialing out to provider. Please help how to configure this. Thanks in Advance. Rgrds-----------Abid SaleemTechnical Manager NGNTerminus Technologies
Hi Abid.. see inline. On Wed, Jun 29, 2011 at 4:59 PM, Abid Saleem <abid_freeswitch@live.com> wrote:
Hi All, Please help me the following 2 issues.
1- I have 100 Trunks from my SIP Provider. My provider restricts me to send only 120 minutes call duration per Trunk per each day. This means around 30 calls per Trunk per day with an ACD of 3 minutes. Please help me how to configure this if it is possible?
You can use: http://wiki.freeswitch.org/wiki/Mod_distributor OR, a more precise way.. scrape your CDRs and then query them before making calls. Or, have a lua script that picks a random one from the list that a cron updates every 30 minutes to use slightly less resources.
2- I need to send P-Preferred-Identity<sip:xxxxxxxxx@domain.com> in SIP header for each Trunk while dialing out to provider. Please help how to configure this. http://wiki.freeswitch.org/wiki/Variable_sip_cid_type has some info on using PID. You can use "sofia profile external siptrace on" to see your SIP messages from FS to debug.
-Avi
1- I have 100 Trunks from my SIP Provider. My provider restricts me to send only 120 minutes call duration per Trunk per each day. This means around 30 calls per Trunk per day with an ACD of 3 minutes. Please help me how to configure this if it is possible?
Can't you find another provider with no such ... limitations ? You can do what Avi told you, or you can write your own piece of LUA script which would check in a DB which trunk to use, and then would bridge using this trunk, and will update the DB after hangup to add the call duration of the last call to the total amount for trunk X and current day (that would have to be done with the hangup_hook thingy, probably).
2- I need to send P-Preferred-Identity<sip:xxxxxxxxx@domain.com> in SIP header for each Trunk while dialing out to provider. Please help how to configure this.
bridge {sip_cid_type=none,sip_h_P-Preferred-Identity=XXXXXXX}sofia/..... -> I am sure of this one or bridge {sip_cid_type=pid}sofia/.... -> never tested
Thanks in Advance.
Rgrds ----------- Abid Saleem Technical Manager NGN Terminus Technologies _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
Dear David, Thanks for answer. This is the only provider choice I have. Also I am not good at programming, so can you help me writing such a script that can do this please. From: david.ponzone@ipeva.fr Date: Wed, 29 Jun 2011 17:41:41 +0200 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Load Balance Trunks 1- I have 100 Trunks from my SIP Provider. My provider restricts me to send only 120 minutes call duration per Trunk per each day. This means around 30 calls per Trunk per day with an ACD of 3 minutes. Please help me how to configure this if it is possible? Can't you find another provider with no such ... limitations ? You can do what Avi told you, or you can write your own piece of LUA script which would check in a DB which trunk to use, and then would bridge using this trunk, and will update the DB after hangup to add the call duration of the last call to the total amount for trunk X and current day (that would have to be done with the hangup_hook thingy, probably). 2- I need to send P-Preferred-Identity<sip:xxxxxxxxx@domain.com> in SIP header for each Trunk while dialing out to provider. Please help how to configure this. bridge {sip_cid_type=none,sip_h_P-Preferred-Identity=XXXXXXX}sofia/..... -> I am sure of this oneorbridge {sip_cid_type=pid}sofia/.... -> never tested Thanks in Advance. Rgrds-----------Abid SaleemTechnical Manager NGNTerminus Technologies_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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 _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
How does the provider notify you that each trunk has used its allotted time? -MC On Fri, Jul 1, 2011 at 8:54 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
Dear David,
Thanks for answer. This is the only provider choice I have. Also I am not good at programming, so can you help me writing such a script that can do this please.
------------------------------ From: david.ponzone@ipeva.fr Date: Wed, 29 Jun 2011 17:41:41 +0200 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Load Balance Trunks
1- I have 100 Trunks from my SIP Provider. My provider restricts me to send only 120 minutes call duration per Trunk per each day. This means around 30 calls per Trunk per day with an ACD of 3 minutes. Please help me how to configure this if it is possible?
Can't you find another provider with no such ... limitations ?
You can do what Avi told you, or you can write your own piece of LUA script which would check in a DB which trunk to use, and then would bridge using this trunk, and will update the DB after hangup to add the call duration of the last call to the total amount for trunk X and current day (that would have to be done with the hangup_hook thingy, probably).
2- I need to send P-Preferred-Identity<sip:xxxxxxxxx@domain.com> in SIP header for each Trunk while dialing out to provider. Please help how to configure this.
bridge {sip_cid_type=none,sip_h_P-Preferred-Identity=XXXXXXX}sofia/..... -> I am sure of this one or bridge {sip_cid_type=pid}sofia/.... -> never tested
Thanks in Advance.
Rgrds ----------- Abid Saleem Technical Manager NGN Terminus Technologies _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
What happens when a call extends more than 120 mins on a trunk, would the call be disconnected. Sent from BSNL with my BlackBerry® smartphone -----Original Message----- From: Michael Collins <msc@freeswitch.org> Sender: freeswitch-users-bounces@lists.freeswitch.org Date: Fri, 1 Jul 2011 09:09:38 To: FreeSWITCH Users Help<freeswitch-users@lists.freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Load Balance Trunks _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
Lcr entry could be activated on the the trunks. A cron job could monitor the usage and add or remove the trunk for the day. Sent from BSNL with my BlackBerry® smartphone -----Original Message----- From: Michael Collins <msc@freeswitch.org> Sender: freeswitch-users-bounces@lists.freeswitch.org Date: Fri, 1 Jul 2011 09:21:51 To: FreeSWITCH Users Help<freeswitch-users@lists.freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Load Balance Trunks _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
Hi Micheal, Avi and All, Sorry for a little late response as I was away. I have seen quite a few questions from you guys, so I am answering them in one email as below. 1- How does the provider notify you that each trunk has used its allotted time?Abid -> They have some counter in their IMS network to count on mins per trunk per day and they inform us by email.2- Are these trunks inbound only?Abid -> No. All these are Outbound Trunks. We just use them to send outgoing calls to our provider. 3- What happens when a call extends more than 120 mins on a trunk, would the call be disconnected?Abid -> The call is not disconnected right away but they send us a notification the next day. There is no real-time disconnection. 4- And then no more calls that day on that trunk?Abid -> Calls do not stop connecting immediately but they keep going. Currently their notification process is manual not automatic blocking. Please help me if you can. Thanks. Regards-----------------Abid SaleemTechnical Manager NGNTerminus Technologies Date: Fri, 1 Jul 2011 09:49:02 -0700 From: msc@freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Load Balance Trunks On Fri, Jul 1, 2011 at 9:46 AM, <hmkias@gmail.com> wrote: Lcr entry could be activated on the the trunks. A cron job could monitor the usage and add or remove the trunk for the day. Are these trunks inbound only? -MC _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
I think this might be a bit too involved for mailing list. At this point I would recommend consulting@freeswitch.org to see if there is a professional who can assist you. -MC On Tue, Jul 5, 2011 at 8:21 AM, Abid Saleem <abid_freeswitch@live.com>wrote:
Hi Micheal, Avi and All,
Sorry for a little late response as I was away. I have seen quite a few questions from you guys, so I am answering them in one email as below.
1- How does the provider notify you that each trunk has used its allotted time? Abid -> They have some counter in their IMS network to count on mins per trunk per day and they inform us by email. 2- Are these trunks inbound only? Abid -> No. All these are Outbound Trunks. We just use them to send outgoing calls to our provider.
3- What happens when a call extends more than 120 mins on a trunk, would the call be disconnected? Abid -> The call is not disconnected right away but they send us a notification the next day. There is no real-time disconnection.
4- And then no more calls that day on that trunk? Abid -> Calls do not stop connecting immediately but they keep going. Currently their notification process is manual not automatic blocking.
Please help me if you can. Thanks.
Regards ----------------- Abid Saleem Technical Manager NGN Terminus Technologies
------------------------------ Date: Fri, 1 Jul 2011 09:49:02 -0700 From: msc@freeswitch.org To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Load Balance Trunks
On Fri, Jul 1, 2011 at 9:46 AM, <hmkias@gmail.com> wrote:
Lcr entry could be activated on the the trunks. A cron job could monitor the usage and add or remove the trunk for the day.
Are these trunks inbound only? -MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
Hi Abid, What country are you based in? Do you have a good connection into the UK? Thanks. On 7/5/11, Abid Saleem <abid_freeswitch@live.com> wrote:
Hi Micheal, Avi and All, Sorry for a little late response as I was away. I have seen quite a few questions from you guys, so I am answering them in one email as below. 1- How does the provider notify you that each trunk has used its allotted time?Abid -> They have some counter in their IMS network to count on mins per trunk per day and they inform us by email.2- Are these trunks inbound only?Abid -> No. All these are Outbound Trunks. We just use them to send outgoing calls to our provider. 3- What happens when a call extends more than 120 mins on a trunk, would the call be disconnected?Abid -> The call is not disconnected right away but they send us a notification the next day. There is no real-time disconnection. 4- And then no more calls that day on that trunk?Abid -> Calls do not stop connecting immediately but they keep going. Currently their notification process is manual not automatic blocking. Please help me if you can. Thanks. Regards-----------------Abid SaleemTechnical Manager NGNTerminus Technologies Date: Fri, 1 Jul 2011 09:49:02 -0700 From: msc@freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Load Balance Trunks
On Fri, Jul 1, 2011 at 9:46 AM, <hmkias@gmail.com> wrote:
Lcr entry could be activated on the the trunks. A cron job could monitor the usage and add or remove the trunk for the day.
Are these trunks inbound only? -MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
-- Sent from my mobile device http://www.suretecsystems.com/services/openldap/ http://www.surevoip.co.uk
I realize this is late, but... There are so many ways to solve this. My approach? Use mod_lcr to define your trunks, mod_lcr will load balance (well choose random order at each "cost" level). use mod_nibblebill to keep track of your "account" for each trunk. Have a cron job at midnight that resets your "balance". When the trunk hits 0 it'll disconnect any active calls and any new calls will not complete on trunks that have a 0 balance. On Tue, Jul 5, 2011 at 10:21 AM, Abid Saleem <abid_freeswitch@live.com> wrote:
Hi Micheal, Avi and All, Sorry for a little late response as I was away. I have seen quite a few questions from you guys, so I am answering them in one email as below. 1- How does the provider notify you that each trunk has used its allotted time? Abid -> They have some counter in their IMS network to count on mins per trunk per day and they inform us by email. 2- Are these trunks inbound only? Abid -> No. All these are Outbound Trunks. We just use them to send outgoing calls to our provider. 3- What happens when a call extends more than 120 mins on a trunk, would the call be disconnected? Abid -> The call is not disconnected right away but they send us a notification the next day. There is no real-time disconnection. 4- And then no more calls that day on that trunk? Abid -> Calls do not stop connecting immediately but they keep going. Currently their notification process is manual not automatic blocking. Please help me if you can. Thanks. Regards ----------------- Abid Saleem Technical Manager NGN Terminus Technologies ________________________________ Date: Fri, 1 Jul 2011 09:49:02 -0700 From: msc@freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Load Balance Trunks
On Fri, Jul 1, 2011 at 9:46 AM, <hmkias@gmail.com> wrote:
Lcr entry could be activated on the the trunks. A cron job could monitor the usage and add or remove the trunk for the day.
Are these trunks inbound only? -MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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 _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
-- -Rupa
Rupa!!! Glad you chimed in. :) -MC On Fri, Jul 29, 2011 at 2:52 PM, Rupa Schomaker <rupa@rupa.com> wrote:
I realize this is late, but...
There are so many ways to solve this. My approach?
Use mod_lcr to define your trunks, mod_lcr will load balance (well choose random order at each "cost" level).
use mod_nibblebill to keep track of your "account" for each trunk. Have a cron job at midnight that resets your "balance". When the trunk hits 0 it'll disconnect any active calls and any new calls will not complete on trunks that have a 0 balance.
On Tue, Jul 5, 2011 at 10:21 AM, Abid Saleem <abid_freeswitch@live.com> wrote:
Hi Micheal, Avi and All, Sorry for a little late response as I was away. I have seen quite a few questions from you guys, so I am answering them in one email as below. 1- How does the provider notify you that each trunk has used its allotted time? Abid -> They have some counter in their IMS network to count on mins per trunk per day and they inform us by email. 2- Are these trunks inbound only? Abid -> No. All these are Outbound Trunks. We just use them to send outgoing calls to our provider. 3- What happens when a call extends more than 120 mins on a trunk, would the call be disconnected? Abid -> The call is not disconnected right away but they send us a notification the next day. There is no real-time disconnection. 4- And then no more calls that day on that trunk? Abid -> Calls do not stop connecting immediately but they keep going. Currently their notification process is manual not automatic blocking. Please help me if you can. Thanks. Regards ----------------- Abid Saleem Technical Manager NGN Terminus Technologies ________________________________ Date: Fri, 1 Jul 2011 09:49:02 -0700 From: msc@freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Load Balance Trunks
On Fri, Jul 1, 2011 at 9:46 AM, <hmkias@gmail.com> wrote:
Lcr entry could be activated on the the trunks. A cron job could monitor the usage and add or remove the trunk for the day.
Are these trunks inbound only? -MC
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE 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 _______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
-- -Rupa
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
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
participants (7)
-
Abid Saleem
-
Avi Marcus
-
David Ponzone
-
Gavin Henry
-
hmkias@gmail.com
-
Michael Collins
-
Rupa Schomaker