[OpenSIPS-Users] How can the global variable "listen" to listen WLAN ?
Bogdan-Andrei Iancu
bogdan at opensips.org
Mon Mar 28 19:17:18 CEST 2016
yes, but I'm not suggesting, but saying it :).
You can use M4 text pre-processor with a define inside the cfg, so you
can replace the name of the interface.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 28.03.2016 20:14, Rodrigo Pimenta Carvalho wrote:
> Ok Bogdan-Andrei
>
> So, are you suggesting that the opensips.cfg file should be edited by a script, aren't you?
>
> Thank you for the explanation.
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 RAMAL 979
>
> ________________________________________
> De: Bogdan-Andrei Iancu <bogdan at opensips.org>
> Enviado: segunda-feira, 28 de março de 2016 14:03
> Para: Rodrigo Pimenta Carvalho; OpenSIPS users mailling list
> Assunto: Re: [OpenSIPS-Users] How can the global variable "listen" to listen WLAN ?
>
> Hi Rodrigo,
>
> If you do not know the name of the interface, it is something beyond
> OpenSIPS area. You should do a small shell script to detect the name of
> the interface (or the IP) and to put it into the OpenSIPS cfg, before
> OpenSIPS start.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 28.03.2016 17:41, Rodrigo Pimenta Carvalho wrote:
>> Hi Alex and Bogdan-Andrei.
>>
>> The customer of my project will use wireless network or cable. It depends on the user preference and his home devices capabilities. That is, sometimes my hardware with OpenSIPS will be connected to a switch by means of wlan and sometimes by means of eth cable.
>> I can't do a forecast about it.
>> So, my OpenSIPS.cfg file must be prepared for both situations. How to do it?
>>
>> For example, if I just write :
>>
>> listen=tcp:eth0:5060 # CUSTOMIZE ME
>> listen=tcp:wlan0:5060 # CUSTOMIZE ME
>>
>> This 2 simultaneous configurations will cause problems, because I generally only one interface will be used. A kind of error is: "ERROR:core:fix_socket_list: could not resolve wlan0"
>>
>> Any idea for this case will be very helpful!
>>
>> Thanks a lot.
>>
>>
>> RODRIGO PIMENTA CARVALHO
>> Inatel Competence Center
>> Software
>> Ph: +55 35 3471 9200 RAMAL 979
>>
>> ________________________________________
>> De: Bogdan-Andrei Iancu <bogdan at opensips.org>
>> Enviado: quinta-feira, 24 de março de 2016 06:24
>> Para: OpenSIPS users mailling list; Rodrigo Pimenta Carvalho
>> Assunto: Re: [OpenSIPS-Users] How can the global variable "listen" to listen WLAN ?
>>
>> Hi Rodrigo,
>>
>> The listen param may accept as input the name of any network interface
>> you may have on your system - eth0, eth1, lo, ma1, wlan1,
>> etc....whatever is listed by "ifconfig" as configured interface may be used.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>> On 22.03.2016 13:54, Rodrigo Pimenta Carvalho wrote:
>>> Hi Alex.
>>>
>>> I have tried something similar in the past and I have problems to execute opensips.
>>> I'm not sure now if I had done exactly this way, but I will try it as your suggestion.
>>>
>>> By the way, the opensips documentation doesn't say about wlan for 'listen' variable.
>>> Let me try it and post the result here with more details.
>>>
>>> Regards.
>>>
>>>
>>>
>>> RODRIGO PIMENTA CARVALHO
>>> Inatel Competence Center
>>> Software
>>> Ph: +55 35 3471 9200 RAMAL 979
>>>
>>> ________________________________________
>>> De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Alex Balashov <abalashov at evaristesys.com>
>>> Enviado: segunda-feira, 21 de março de 2016 21:03
>>> Para: users at lists.opensips.org
>>> Assunto: Re: [OpenSIPS-Users] How can the global variable "listen" to listen WLAN ?
>>>
>>> On 03/21/2016 04:36 PM, Rodrigo Pimenta Carvalho wrote:
>>>
>>>> According to the documentation "...It can be an IP address, hostname or
>>>> network interface id".
>>>>
>>>> So, can I do the following configuration?
>>>>
>>>>
>>>> listen=tcp:wlan0:5060
>>> Why can't you just do exactly that?
>>>
>>> --
>>> Alex Balashov | Principal | Evariste Systems LLC
>>> 1447 Peachtree Street NE, Suite 700
>>> Atlanta, GA 30309
>>> United States
>>>
>>> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
>>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
More information about the Users
mailing list