[SR-Users] Route for BYE requests

alexandre.anconetti at orange.com alexandre.anconetti at orange.com
Thu Feb 11 10:19:05 CET 2016


Hello,
I would like some advice about a situation i have encountered  recently. I'm using Kamailio 4.3.4 as a "proxy" : I have a media server, and to reach this server all the requests have to pass through my Kamailio server. The Kamailio server does not have to handle authentification or registration, all of that stuff is done on the media server. To do that I'm using the following route :

route[REDIRECT] {
                if($rU == "" ) {
                        $ru = ("sip:1.2.3.4:xxxx");
}
                else {
                        $ru = ("sip:" + $rU + "@1.2.3.4:xxxx");
}
}

1.2.3.4 is my media server's address. I have 2 users : an "internal" one registered on the media server, and an "external" one which is a random caller. It works fine for EXT -> Kamailio -> Media server requests but when I try to hang up with my internal user, the "BYE" request uses the following path : Internal user -> Media server -> Kamailio -> Media server instead of : Internal user -> Media server -> Kamailio -> External user. Obviously it is because of the REDIRECT route which send back the "BYE" request to the media server, when it should sends that request to the external user.
So, how should I modify that route to do what I want ? Maybe should I create a second route ? Any answer will be appreciated :)
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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160211/7ac7518b/attachment.html>


More information about the sr-users mailing list