<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>If dispatcher sets a socket for sending out, you can get its
address with $fs.</p>
<p><br>
</p>
<p>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.<br>
</p>
<p><br>
</p>
<p>Cheers,<br>
Daniel</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 21.06.22 12:14, Tor Petterson wrote:<br>
</div>
<blockquote type="cite"
cite="mid:DB7PR05MB5244D9AD00A31E735EB92603F4B39@DB7PR05MB5244.eurprd05.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
I guess I didn't explain myself well enough.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
I would like to find the socket address programatically from the
kamailio.cfg script.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
so after I do this:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
if (ds_select_domain($var(dispgroup), "4")) {<br>
xavp_params_explode($xavp(dsdst=>attrs),
"dstattr");</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
is there a way to get the IP address of the selected socket?<br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
sr-users <a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a> on behalf
of Mathias WOLFF <a class="moz-txt-link-rfc2396E" href="mailto:mathias@celea.org"><mathias@celea.org></a><br>
<b>Sent:</b> Tuesday, June 21, 2022 11:58<br>
<b>To:</b> Kamailio \(SER\) - Users Mailing List
<a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a><br>
<b>Subject:</b> Re: [SR-Users] Finding advertised address of
socket</font>
<div> </div>
</div>
<div>
<div style="font-family:Arial; font-size:14px">Hello,</div>
<div style="font-family:Arial; font-size:14px">Yes, you can add
it in the configuration file, it is the
<span>'socket' -> used to set the sending socket for the
gateway. It is used for sending the SIP traffic as well as
OPTIONS keepalives.</span>
<div><br>
</div>
<span></span>Regards<br>
</div>
<div style="font-family:Arial; font-size:14px"><br>
</div>
<div class="x_protonmail_signature_block"
style="font-family:Arial; font-size:14px">
<div class="x_protonmail_signature_block-user">
<div>.....................................................................<br>
</div>
<div>Mathias WOLFF<br>
</div>
<div>Tel : +33 9.72.13.22.62<br>
</div>
<div>Gsm : +33 6.79.59.43.32<br>
</div>
<div>.....................................................................<br>
</div>
<div>
<div><b>CONFIDENTIALITE.</b><br>
</div>
<div>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.<br>
</div>
<div><b>CONFIDENTIALITY.</b><br>
</div>
<div>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.<br>
</div>
</div>
<div><br>
</div>
</div>
<div style="font-family:Arial; font-size:14px"><br>
</div>
<div class="x_protonmail_signature_block-proton">Envoyé avec
la messagerie sécurisée
<a target="_blank"
href="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"
originalsrc="https://proton.me/"
shash="H35G9i0tdApQAB3tjac1zmgFQ2XHJXI3EVoQA0z4j6jNJ2EyK2iWYo7l/HlgQM11sEsj0oa1ZodlRjY1gVEFcVvmsaj2nA2O9t5WuP4ikhRQYWx3DE4ODZNvRS7eTiB7EfVDabzyXm+LUzqM2cmB62D8F02pFsTYnL5rOTa+CzI="
rel="noopener noreferrer" moz-do-not-send="true">
Proton Mail</a>. </div>
</div>
<div style="font-family:Arial; font-size:14px"><br>
</div>
<div class="x_protonmail_quote">------- Original Message -------<br>
Le mardi 21 juin 2022 à 11:53, Tor Petterson
<a class="moz-txt-link-rfc2396E" href="mailto:tor.petterson@enreach.com"><tor.petterson@enreach.com></a> a écrit :<br>
<br>
<blockquote class="x_protonmail_quote" type="cite">
<div class="x_elementToProof"
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Hi
<div><br>
</div>
<div>I have a setup where Kamailio is connected to several
telephony providers using different IP addresses to
communicate with them.</div>
<div>So I have a socket per provider.<br>
</div>
<div>I am using the dispatcher module to route calls to
the different providers.</div>
<div>My question is if there is a way to get the
advertised address of the socket chosen by dispatcher?</div>
<div>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.</div>
<div><br>
</div>
<div>Thanks in advance.</div>
Tor<br>
</div>
</blockquote>
<br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online: June 20-23, 2022
* <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</body>
</html>