Hello ! I'm using Kamailio for 2 months, and I have a problem with the routing logic. My aim is to use 2 Kamailio servers (in a cluster, so I have a primary and a backup server with a Virtual IP that can switch between the 2 servers) working with 2 medias servers (same as above, a primary and a backup). The Kamailio servers are here to handle failover, so all the requests go through them, and then are sent to the active media server. My question is : Which module(s) should I load to transmit all the requests (including registers) to my media server, through the Kamailio server ? Any particular parameters ? Then, what will be in the "request_route" ? I'm using Kamailio 4.3.4. Best regards, Alexandre
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.
If indeed you mean ALL traffic, including traffic that Kamailio itself can route internally:
Add something to the LOCATION route to only allow usrloc based routing from the media server. In my case, I have added this at the top:
# Only do this for things authorized by IP # UAs need to go via billing platform if (!allow_source_address()) { return; }
Create a new route that is called at the end of your main route with something like the following:
# Routing to Billing route[BILLING] { # only local users allowed to call if (from_uri!=myself) { sl_send_reply("403", "Not Allowed"); exit; }
$ru = "sip:" + $rU + "@1.2.3.4:5060");
route(RELAY); exit; }
In essence, block all but allowed IPs (your media gateway IPs should be allowed) from routing via usrloc and change the request URI to route all traffic via the media gateway IP (1.2.3.4).
Phil From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of alexandre.anconetti@orange.com Sent: 01 February 2016 13:24 To: sr-users@lists.sip-router.org Subject: [SR-Users] Kamailio/How to send all requests ?
Hello ! I'm using Kamailio for 2 months, and I have a problem with the routing logic. My aim is to use 2 Kamailio servers (in a cluster, so I have a primary and a backup server with a Virtual IP that can switch between the 2 servers) working with 2 medias servers (same as above, a primary and a backup). The Kamailio servers are here to handle failover, so all the requests go through them, and then are sent to the active media server. My question is : Which module(s) should I load to transmit all the requests (including registers) to my media server, through the Kamailio server ? Any particular parameters ? Then, what will be in the "request_route" ? I'm using Kamailio 4.3.4. Best regards, Alexandre
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
Hello, It seems to work, now i have to solve some problems on my media server but the Kamailio part is ok I think. Thank you for your help ! Best regards, Alexandre
De : sr-users [mailto:sr-users-bounces@lists.sip-router.org] De la part de Phil Lavin Envoyé : lundi 1 février 2016 14:41 À : Kamailio (SER) - Users Mailing List Objet : Re: [SR-Users] Kamailio/How to send all requests ?
If indeed you mean ALL traffic, including traffic that Kamailio itself can route internally:
Add something to the LOCATION route to only allow usrloc based routing from the media server. In my case, I have added this at the top:
# Only do this for things authorized by IP # UAs need to go via billing platform if (!allow_source_address()) { return; }
Create a new route that is called at the end of your main route with something like the following:
# Routing to Billing route[BILLING] { # only local users allowed to call if (from_uri!=myself) { sl_send_reply("403", "Not Allowed"); exit; }
$ru = "sip:" + $rU + "@1.2.3.4:5060");
route(RELAY); exit; }
In essence, block all but allowed IPs (your media gateway IPs should be allowed) from routing via usrloc and change the request URI to route all traffic via the media gateway IP (1.2.3.4).
Phil From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of alexandre.anconetti@orange.com Sent: 01 February 2016 13:24 To: sr-users@lists.sip-router.org Subject: [SR-Users] Kamailio/How to send all requests ?
Hello ! I'm using Kamailio for 2 months, and I have a problem with the routing logic. My aim is to use 2 Kamailio servers (in a cluster, so I have a primary and a backup server with a Virtual IP that can switch between the 2 servers) working with 2 medias servers (same as above, a primary and a backup). The Kamailio servers are here to handle failover, so all the requests go through them, and then are sent to the active media server. My question is : Which module(s) should I load to transmit all the requests (including registers) to my media server, through the Kamailio server ? Any particular parameters ? Then, what will be in the "request_route" ? I'm using Kamailio 4.3.4. Best regards, Alexandre
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.