If so, when you receive a request on the external IP, the $socket_in(ip) should return the actual DHCP IP.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 11/17/21 10:21 AM, Muhamad Putra Abdullah wrote:

Hi,

socket=udp:enp1s0:5060 tag INTERNAL_IP  # CUSTOMIZE ME

socket=udp:enp2s0:5060 tag EXTERNAL_IP  # CUSTOMIZE ME

My INTERNAL_IP is set to static and EXTERNAL_IP set to DHCP. I just use tag to test something.

Regards

*From:*Bogdan-Andrei Iancu <[email protected]>
*Sent:* Wednesday, 17 November, 2021 3:55 PM
*To:* Muhamad Putra Abdullah <[email protected]>; OpenSIPS users mailling list <[email protected]> *Subject:* Re: [OpenSIPS-Users] How to get all listening socket IP address as variable

Hi,

How do you define the listening socket in OpenSIPs cfg ? (the one related to the DHCP interface)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  <https://www.opensips-solutions.com>
OpenSIPS eBootcamp 2021
   https://opensips.org/training/OpenSIPS_eBootcamp_2021/  
<https://opensips.org/training/OpenSIPS_eBootcamp_2021/>

On 11/17/21 2:19 AM, Muhamad Putra Abdullah wrote:

    Hi,

    Is there a way to get the IP address of DHCP interface to use in
    the script? I can get the call go through if I set both the
    interface as static.

    Regards

    Get Outlook for Android <https://aka.ms/AAb9ysg>

    ------------------------------------------------------------------------

    *From:* Bogdan-Andrei Iancu <[email protected]>
    <mailto:[email protected]>
    *Sent:* Tuesday, November 16, 2021, 6:45 PM
    *To:* OpenSIPS users mailling list; Muhamad Putra Abdullah
    *Subject:* Re: [OpenSIPS-Users] How to get all listening socket IP
    address as variable


    Hi,

    via the socket_xx() vars you can get only the sockets relative
    to/used by that call, you cannot iterate thru the listening sockets.

    Regards,

    Bogdan-Andrei Iancu

    OpenSIPS Founder and Developer

       https://www.opensips-solutions.com  <https://www.opensips-solutions.com>

    OpenSIPS eBootcamp 2021

       https://opensips.org/training/OpenSIPS_eBootcamp_2021/  
<https://opensips.org/training/OpenSIPS_eBootcamp_2021/>

    On 11/15/21 9:39 AM, Muhamad Putra Abdullah wrote:

        Hi,

        I have 2 listening interface for opensips 3.2. How do I get
        both IP address to be used as variable in opensips config
        file? I try to use socket_in/ socket_out but failed to get the
        other interface IP address.

        Thanks

        Sent from Mail
        <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows



        _______________________________________________

        Users mailing list

        [email protected]  <mailto:[email protected]>

        http://lists.opensips.org/cgi-bin/mailman/listinfo/users  
<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to