[SR-Users] Finding advertised address of socket

Tor Petterson tor.petterson at enreach.com
Tue Jun 21 12:14:19 CEST 2022


I guess I didn't explain myself well enough.
I would like to find the socket address programatically from the kamailio.cfg script.
so after I do this:
        if (ds_select_domain($var(dispgroup), "4")) {
                xavp_params_explode($xavp(dsdst=>attrs), "dstattr");

is there a way to get the IP address of the selected socket?
________________________________
From: sr-users <sr-users-bounces at lists.kamailio.org> on behalf of Mathias WOLFF <mathias at celea.org>
Sent: Tuesday, June 21, 2022 11:58
To: Kamailio \(SER\) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Finding advertised address of socket

Hello,
Yes, you can add it in the configuration file, it is the 'socket' -> used to set the sending socket for the gateway. It is used for sending the SIP traffic as well as OPTIONS keepalives.

Regards

.....................................................................
Mathias WOLFF
Tel : +33 9.72.13.22.62
Gsm : +33 6.79.59.43.32
.....................................................................
CONFIDENTIALITE.
Cet email (y compris les éventuelles pièces jointes) peut contenir des informations confidentielles. Il ne peut être utilisé que pour la finalité pour laquelle il a été envoyé. Au cas où il ne vous serait pas destiné, merci de le supprimer et d'en avertir l'expéditeur.
CONFIDENTIALITY.
This email (including any attachments) may contain confidential information. It may not be used other than for the purpose for which it has been sent. If you are not the intendedrecipient, please delete it and notify the sender.


Envoyé avec la messagerie sécurisée Proton Mail<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fproton.me%2F&data=05%7C01%7Ctor.petterson%40enreach.com%7Cdea97fca9b6345714ae108da536cc97c%7C33733f45cfce4d1e9d174adfad5af331%7C0%7C0%7C637914024140240989%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=vo5A0uPnFLakexQIqBvPMjxfm2IIF5rBjyxH3OM3Onk%3D&reserved=0>.

------- Original Message -------
Le mardi 21 juin 2022 à 11:53, Tor Petterson <tor.petterson at enreach.com> a écrit :

Hi

I have a setup where Kamailio is connected to several telephony providers using different IP addresses to communicate with them.
So I have a socket per provider.
I am using the dispatcher module to route calls to the different providers.
My question is if there is a way to get the advertised address of the socket chosen by dispatcher?
I have a socket pointer in the XAVP, but I can't figure out if it is possible to get the advertised address from it somehow.

Thanks in advance.
Tor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220621/c4bb81a8/attachment.htm>


More information about the sr-users mailing list