[OpenSIPS-Users] Listening on two different ports? Or two different addresses

Kenneth Löfstrand kenneth at ip-solutions.se
Thu Mar 11 14:17:17 CET 2010


Thank you, Bogdan

mhomed solved my problem. OpenIMS is based on SER but obviously the 
parameter is available also there.

Regards
Kenneth

Bogdan-Andrei Iancu skrev:
> Hi Kenneth,
>
> not sure what this openims is, but if something from the OpenSIPS 
> family, the normal behaviour is to preserve the socket (same inbound 
> socket will be used for outbound socket). But there are 2 exceptions:
>     - if you cannot route across interface (totally different networks), 
> you may enable mhomed option and opensips will try to autodetect the 
> right outbound interface based on the destination IP
>                 http://www.opensips.org/Resources/DocsCoreFcn16#toc58
>     - using from script force_send_socket("socket") - to force a 
> specific outbound interface.
>                 http://www.opensips.org/Resources/DocsCoreFcn16#toc101
>
> Regards,
> Bogdan
>
> Kenneth Löfstrand wrote:
>   
>> Hi
>> I have a question that might be related. Honestly it's not an opensips 
>> question, it happens when using openims but I get no answer from that 
>> list so I thought it might be worth a try here. Please ignore this mail 
>> if you think it doesn't belong to this list.
>>
>> I have assigned two IP addresses to my p-cscf, one address towards the 
>> access network and one towards core. The p-cscf was expected to use the 
>> core address address when forwarding a sip message towards the other 
>> cscf's and the access address when forwarding to the terminals but this 
>> doesn't happen. A sip message that was received on the access interface 
>> will be forwarded using the access IP address as source address. Could 
>> this be handled in the script or does it have to be patched in the code?
>>
>> Regards
>> Kenneth Löfstrand
>>
>>
>> Bogdan-Andrei Iancu skrev:
>>   
>>     
>>> Hi Chris,
>>>
>>> yes, that is the right approach - you can force the outgoing socket via 
>>> the "socket" param.
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Chris Maciejewski wrote:
>>>   
>>>     
>>>       
>>>> Sorry Bogdan,
>>>>
>>>> Ignore my email below. I missed 'socket' option in  't_uac_dlg' MI
>>>> function, as described at:
>>>> http://www.opensips.org/html/docs/modules/1.4.x/tm.html#id272529
>>>>
>>>> Regards,
>>>> Chris
>>>>
>>>> On 8 March 2010 16:28, Chris Maciejewski <chris at wima.co.uk> wrote:
>>>>   
>>>>     
>>>>       
>>>>         
>>>>> Hi Bogdan,
>>>>>
>>>>> Thanks for info. I managed to bind to two different ports 5060 and
>>>>> 5566 just fine.
>>>>>
>>>>> However it seems to me there is a problem with mi_xmlrpc module in
>>>>> this scenario.
>>>>>
>>>>> For example when I have Client 1 registered with my.domain:5566
>>>>> ('location' table shows correctly "udp:my_ip:5566" in 'socket' column)
>>>>> and I am sending OPTIONS with t_uac_dlg via MI RPC to the 'contact' of
>>>>> Client 1, OpenSIPs will send OPTIONS from udp:my_ip:5060 instead of
>>>>> udp:my_ip:5566 where REGISTER was received.
>>>>>
>>>>> As a result Client 1 (which is behind NAT) will not receive OPTIONS as
>>>>> NAT bindings don't match.
>>>>>
>>>>> OPTIONS generated by nathelper module are correctly sent from
>>>>> udp:my_ip:5566. It is just mi_xmlrpc which seems to ignore 'socket'
>>>>> column in 'location' table.
>>>>>
>>>>> Please let me know if you need any more info on this issue.
>>>>>
>>>>> Kind regards,
>>>>> Chris
>>>>>
>>>>>
>>>>> On 1 March 2010 06:57, Bogdan-Andrei Iancu <bogdan at voice-system.ro> wrote:
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>>>> Hi Chris,
>>>>>>
>>>>>> Sure it is possible. Do in cfg:
>>>>>>    listen=udp:ip:5060
>>>>>>    listen=udp:ip:5566
>>>>>>    listen=tcp:ip:5060
>>>>>>    listen=tcp:ip:5566
>>>>>>
>>>>>> And do not forget to set fork to yes.
>>>>>>
>>>>>> Regards,
>>>>>> Bogdan
>>>>>>
>>>>>> Chris Maciejewski wrote:
>>>>>>       
>>>>>>         
>>>>>>           
>>>>>>             
>>>>>>> Hi,
>>>>>>>
>>>>>>> I know the answer to this question is probably "no", but wanted to
>>>>>>> check with you.
>>>>>>>
>>>>>>> Is it possible to make one instance of opensips listen on two different ports?
>>>>>>>
>>>>>>> Lets say if I wanted opensips to listen on UDP/TCP 5060 and UDP/TCP 5566?
>>>>>>>
>>>>>>> Can this be done?
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Chris
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Users mailing list
>>>>>>> Users at lists.opensips.org
>>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>>>
>>>>>>>
>>>>>>>         
>>>>>>>           
>>>>>>>             
>>>>>>>               
>>>>>> --
>>>>>> Bogdan-Andrei Iancu
>>>>>> www.voice-system.ro
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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