[Serusers] Unexpected disconnect - lost SIP packets?

Greger V. Teigre greger at teigre.com
Thu Nov 29 14:09:47 CET 2007


Make sure to NOT include alias=ipaddress. However, there's probably 
something wrong with the BYE, because it should have Route headers.
uri=myself is fairly simple and static, so normally you would like to 
use the domain module and use is_from_local()  and is_uri_host_local().

BTW, search() searches the full message,  uri=~"sip:.*@.*:5070" would be 
more precise and only search the uri.
g-)

Jeremy A wrote:
> I seem to have fixed the problem with a 'hack' that looks for packets 
> directed to port 5070 and sends them to route(1)
>
> I think that is probably the correct solution and is RFC compliant? 
> However it puzzles me that the test uri==myself doesn't take into 
> account the port number.
>
> NB my regex skills are low so the check for port 5070 is certainly 
> sub-optimal, however it works :-)
>
> Thanks for your help
>
> New routing code:
>
>     if (uri==myself) {
>
>         if (method=="REGISTER") {
>             # digest authentication
>             if (!www_authorize("", "subscriber")) {
>                 www_challenge("", "0");
>                 break;
>             };
>
>             save("location");
>             break;
>         };
>
>         lookup("aliases");
>         if (!uri==myself) {
>             append_hf("P-hint: outbound alias\r\n");
>             route(1);
>             break;
>         };
>
> 	# send on any uri that goes to port 5070 - it's not us
>
>         if (search(":5070")) {
> 	   route(1);
> 	   break;
> 	}
>
>         # native SIP destinations are handled using our USRLOC DB
>         if (!lookup("location")) {
>             sl_send_reply("404", "SER says Not Found");
>             break;
>         };
>     };
>
>
> Greger V. Teigre wrote:
>> The BYE should have a Route header, which is used for routing. If it 
>> does not have a Route header, the UA originating the BYE must be 
>> fixed. Of course, you can hack the BYE by doing the same kind of 
>> alias rewriting as the INVITE, but it is not RFC-compliant.
>> g-)
>>
>> Jeremy A wrote:
>>> Greger Viken Teigre wrote:
>>>> If you have alias=ip-of-ser in your config, ACK with port 5070 in ruri will match uri==myself.
>>>> The ACK should just be relayed.
>>>> See example cfg for ser used for sems for an example.
>>>> g-)
>>>>
>>>>   
>>> Unfortunately I am still quite puzzled by the SER configuration 
>>> process, so I have not been able to work out exactly what to do. The 
>>> ser/sems example uses pipes which doesn't help.
>>>
>>> So far I have simply added a clause to always forward ACK packets. 
>>> This is not sufficient.
>>>
>>> The ACK gets through but now the BYE command gets rejected 404 not 
>>> found on the user location lookup. I think this is caused by the 
>>> aliases involved in the call ?
>>>
>>> (Call is dialled as 2311 at fesa.sto. It gets reformed to 
>>> 1001 at butler.fesa.sto and passed to the SER proxy for 
>>> butler.fesa.sto. SER knows 1001 is an alias of registered user 1009 
>>> and sends the call to the user)
>>>
>>> Here is a log of a call made on the SER machine butler.fesa.sto
>>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20071129/e3b0e9cc/attachment.htm>


More information about the sr-users mailing list