[OpenSIPS-Users] How opensis can manage different ports.

Kennard_White at logitech.com Kennard_White at logitech.com
Mon Sep 20 19:01:22 CEST 2010


Hi Guys,

I don't understand why you need to do any of this (bflags,setting $fs). We
listen on both port 5060 and 5062 of our public interface, and the
registrar module handles all this internally. Specifically, we can receive
an REGISTER on either port, and when an INVITE comes in for that user and
it goes thru lookup(), then the outgoing INVITE will be sent on the same
socket on which the REGISTER was received.

In registrar module, the save() function stores the received socket into
the usrloc module, and the lookup() function retrieves it and stores that
into the force_send_sock. The only thing I can see that would mess this up
is if you use the 's' flag to save(), which will then try extracting the
received sock from a header rather than using the actual received socket.

The relevant code registrar/save.c:240 and registrar/lookup.c:288.

Could you help me understand what it is you are attempting to do that the
registrar module doesn't handle internally?

Thanks,
Kennard





From:	Stefano Pisani <stefano.pisani at omnianet.it>
To:	OpenSIPS users mailling list <users at lists.opensips.org>
Date:	09/18/2010 02:52 AM
Subject:	Re: [OpenSIPS-Users] How opensis can manage different ports.
Sent by:	users-bounces at lists.opensips.org



  Hi,
I solved it using field socket in location table and using $fs = this
socket before t_relay()
just in case of local lookup

Il 18/09/2010 06:43, Andrew Pogrebennyk ha scritto:
> On 18.09.2010 07:36, mayamatakeshi wrote:
>> If you are dealing with more than 2 ports, this might get complicated.
>> But in case of just 2 ports, you could check the ReceivedPort and set
>> a bflag during handling of the REGISTER request:
>>
>> if($Rp == 5060) {
>>    setbflag(BFLAG_RECEIVED_ON_PORT_5060);
>> }
> That's correct. It will also work with more than 2 ports, but you need
> to enumerate each socket with a flag.
>

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100920/21de6999/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/users/attachments/20100920/21de6999/attachment.gif 


More information about the Users mailing list