If dispatcher sets a socket for sending out, you can get its address
with $fs.
Also, there is a mode parameter for dispatcher that allows you to
specify you want the socket value from attributes to be set as string in
a field of an xavp -- right now I have now quick option to check it
myself and point to it, just look at the dispatcher readme.
Cheers,
Daniel
On 21.06.22 12:14, Tor Petterson wrote:
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(a)lists.kamailio.org> on behalf of
Mathias WOLFF <mathias(a)celea.org>
*Sent:* Tuesday, June 21, 2022 11:58
*To:* Kamailio \(SER\) - Users Mailing List <sr-users(a)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(a)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
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
*
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training - Online: June 20-23, 2022
*
https://www.asipto.com/sw/kamailio-advanced-training-online/