Folks,
First of all I will like to apologize before hand, since I am better with numbers than with words. Therefore I hope you all can at least understand the essence of what I am trying to communicate. ;-)
I am trying to set up an application, where I use Kamailio, asterisk, and A2Billing to process pre paid calling cards, and wholesale voip. I already have setup a kamailio service using carrier route and a2billing as a preprocessor. It works beautiful, Great work guys!!!!
The questions I have are around the design for resiliency and redundancy. I will like to use another instance of kamailio for a dispatcher function to load balance between asterisk servers, since the is a limitation and performance issues with asterisk. Now I have done some research and some testing and they only way I know I can make it work is by using 302 redirection to redirect the invites from my customers to the corresponding asterisk server. If I use a direct setup using ds_select_dst asterisk gets all "confused" since the request appears to come from the dispatcher ip address. For wholesale ip, I filter a2billing on ip address and not username. My configuration is as follows:
<customer>------><dispatcher/kamailio>------><a2billing/asterisk>-----><carrierroute/kamailio>------><carrier>
Any thoughts, comments and/or suggestions are more than welcomed!
Carlos
Any comments?
From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Carlos A. Alvarez Sent: Thursday, July 09, 2009 11:10 AM To: 'Users@lists.kamailio.org' Subject: [Kamailio-Users] OpenSer/Kamailio and A2Billing
Folks,
First of all I will like to apologize before hand, since I am better with numbers than with words. Therefore I hope you all can at least understand the essence of what I am trying to communicate. ;-)
I am trying to set up an application, where I use Kamailio, asterisk, and A2Billing to process pre paid calling cards, and wholesale voip. I already have setup a kamailio service using carrier route and a2billing as a preprocessor. It works beautiful, Great work guys!!!!
The questions I have are around the design for resiliency and redundancy. I will like to use another instance of kamailio for a dispatcher function to load balance between asterisk servers, since the is a limitation and performance issues with asterisk. Now I have done some research and some testing and they only way I know I can make it work is by using 302 redirection to redirect the invites from my customers to the corresponding asterisk server. If I use a direct setup using ds_select_dst asterisk gets all "confused" since the request appears to come from the dispatcher ip address. For wholesale ip, I filter a2billing on ip address and not username. My configuration is as follows:
<customer>------><dispatcher/kamailio>------><a2billing/asterisk>-----><carrierroute/kamailio>------><carrier>
Any thoughts, comments and/or suggestions are more than welcomed!
Carlos
On Donnerstag, 9. Juli 2009, Carlos A. Alvarez wrote:
I am trying to set up an application, where I use Kamailio, asterisk, and A2Billing to process pre paid calling cards, and wholesale voip. I already have setup a kamailio service using carrier route and a2billing as a preprocessor. It works beautiful, Great work guys!!!!
Hello Carlos,
The questions I have are around the design for resiliency and redundancy. I will like to use another instance of kamailio for a dispatcher function to load balance between asterisk servers, since the is a limitation and performance issues with asterisk. Now I have done some research and some testing and they only way I know I can make it work is by using 302 redirection to redirect the invites from my customers to the corresponding asterisk server. If I use a direct setup using ds_select_dst asterisk gets all "confused" since the request appears to come from the dispatcher ip address. For wholesale ip, I filter a2billing on ip address and not username.
Hm, the usage of 302 redirection to just load-balance your asterisk servers is IMHO a bit complicated. Normally you should be able to just use dispatcher or similar modules (like cr in cfg file mode) for this purpose. If you only need the incoming IP address for billing purposes perhaps you could store this in a custom SIP header and evaluate this later on the asterisk?
Henning
Thanks Henning,
I currently use the dispatch module with 302 redirection to load balance A2Billing servers. If I use either cr or dispatcher with ds_select_dst to load balance, the problem I have is that when the SIP request is forwarder to A2Billing, it appears to be coming from the same source ip address. This is a problem when I am wholesaling IP to multiple carriers, since each carrier has its own source ip address.
With 302 it works perfect since the connection information is sent in the contact field, the carrier's gateway just reissue a re-invite to the designated asterisk/a2billing server to credit and route the call. The call is then forwarded to a cr server who forwards it to a local gateway or to a 3rd party carrier. The problem is that most carriers are not supporting 302 redirection.
<voip whsl>-------<dispatcher>-------<a2billing/asterisk>-----<carrierroute>-------<dst carrier>
Any suggestions please? How can I make ds_select_dst work on this scenario?
Carlos
From: Henning Westerholt [mailto:henning.westerholt@1und1.de] Sent: Monday, July 13, 2009 10:22 AM To: users@lists.kamailio.org Cc: Carlos A. Alvarez Subject: Re: [Kamailio-Users] OpenSer/Kamailio and A2Billing
On Donnerstag, 9. Juli 2009, Carlos A. Alvarez wrote:
I am trying to set up an application, where I use Kamailio, asterisk, and A2Billing to process pre paid calling cards, and wholesale voip. I already have setup a kamailio service using carrier route and a2billing as a preprocessor. It works beautiful, Great work guys!!!!
Hello Carlos,
The questions I have are around the design for resiliency and redundancy. I will like to use another instance of kamailio for a dispatcher function to load balance between asterisk servers, since the is a limitation and performance issues with asterisk. Now I have done some research and some testing and they only way I know I can make it work is by using 302 redirection to redirect the invites from my customers to the corresponding asterisk server. If I use a direct setup using ds_select_dst asterisk gets all "confused" since the request appears to come from the dispatcher ip address. For wholesale ip, I filter a2billing on ip address and not username.
Hm, the usage of 302 redirection to just load-balance your asterisk servers is IMHO a bit complicated. Normally you should be able to just use dispatcher or similar modules (like cr in cfg file mode) for this purpose. If you only need the incoming IP address for billing purposes perhaps you could store this in a custom SIP header and evaluate this later on the asterisk?
Henning
2009/7/14 Carlos A. Alvarez carlos.alvarez@commxinc.com:
I currently use the dispatch module with 302 redirection to load balance A2Billing servers. If I use either cr or dispatcher with ds_select_dst to load balance, the problem I have is that when the SIP request is forwarder to A2Billing, it appears to be coming from the same source ip address. This is a problem when I am wholesaling IP to multiple carriers, since each carrier has its own source ip address.
In the proxy add a header "Source-IP: XXX.XXX.XXX.XXX" and use it in Asterisk for billing. Perhaps this is not feasible if A2Billing depends on peers (now there is just one peer: Kamailio).