[OPEN-ILS-DEV] Re: SIP server config question

David J. Fiander djfiander at fastmail.fm
Fri Apr 6 16:43:16 EDT 2007


Bill,

Your code is much better than mine.  The one thing that my special  
case did was match the hostname 'localhost' against the incoming  
socket address of 127.0.0.1, but neither of us are properly matching  
hostnames recorded in the configuration file against IP addresses  
associated with the socket.  More than likely, that's not a problem.

Part of the reason for this complicated configuration stuff was the  
theory that the SIP server could provide multiple listeners, each  
listening on a different address and providing services to different  
organizations on each address.  Basically I built in a lot of over- 
generalized stuff right at the beginning, before we knew if we needed  
it or not, and since Evergreen doesn't need it, it's never been tested.

As well, when I moved from a bunch of hand-crafted code to using the  
Net::Server framework, I got it wrong, since I bind to the ports  
specified in the configuration file, but I completely ignore the IP  
addresses or hostnames that might have been specified.

- David

On 6-Apr-07, at 15:56 , Bill Erickson wrote:

> David,
>
> I recently noticed that setting the "port" option for a service to  
> (for example) "6001/tcp" or "*:6001/tcp" is fine as far as  
> Net::Server is concerned, but when I attempt to connect to my local  
> SIP instance, it complains with
>
> "process_request: Unknown recognized server connection:  
> 10.1.0.112:6001/tcp"
>
> I've found why it happens in Sip/Configuration.pm in the  
> find_service method and I've attached a patch to address it.   
> However, it's obvious a special case was designed for local  
> connections ( 127.0.0.1) that my thick skull is not grasping at  
> first glance.  My patch just removes the special case, but given  
> it's likely there for a reason, the issue may be better resolved a  
> different way.
>
> Thoughts/Ideas appreciated.
>
> CC'ing open-ils-dev list.
>
> -bill
>
>
> -- 
> Bill Erickson
> PINES Systems Developer
> Georgia Public Library Service
> billserickson at gmail.com
> http://open-ils.org
> <SIP_listen_address.patch>

-- 
David J. Fiander
Digital Services Librarian





More information about the Open-ils-dev mailing list