[Serusers] lookup of sip_hf_from in location table

Jiri Kuthan jiri at iptel.org
Wed May 12 21:05:38 CEST 2004


It seems that you are trying to mix several different kinds of issues.

If you would like to make a user unreachable forcibly (why do you want
to do that, BTW?) then do remove his usrloc entries. (BTW -- what are
you going to do when he reregisters?) If you would like to prevent him
from making calls, use some ACL feature. I don't recommend mixing
user location with call processing policy.

-jiri

At 08:15 PM 5/12/2004, Chris Crawford wrote:
>Content-Class: urn:content-classes:message
>Content-Transfer-Encoding: 7bit
>Content-Type: multipart/alternative;
>        boundary="----_=_NextPart_001_01C4384D.0DAC2327"
>
>Hello.
> 
>Currently before allowing an invite, a lookup(“location”) is performed which looks up the Request URI in the location table and identifies the contacts.  I would like to lookup the source caller’s contacts in the location table as well.  Here is an instance that would require that:
> 
>1-       We create a user and allow them to register for a period of time.
>2-       The management system removes the user from ser, using serctl rm, so location and other subscriber information is removed. 
>3-       The UA still thinks it is registered, so it will post INVITEs, as the action on the server did not trigger an event on the client (this is normal).  
>4-       When not in authentication mode, the proxy allows it to request and INVITE as the lookup( “location” ) is only for the Request-URI.
> 
>How do I force a lookup for the source caller in the location table, so that if the location entry is not there for the source caller it returns a 403, triggering a reREGISTER on the UA?  I wrote the conditional below and it seems to work, but it seems a bit ‘dirty’. There must be some other API for this
 ?
> 
>if( exec_msg('
>         FROMUSER=`/opt/tools/parseuser $SIP_HF_FROM`;
>         QUERY="select contact from location
>         where username=\"$FROMUSER\"";
>         CONTACT=`mysql  -Bsuser -pheslo -e "$QUERY" ser`;
>         if [ -z "$CONTACT" ] ; then
>                 exit 0 ;
>         else
>                 exit 1 ;
>         fi ; ') )
> 
>Do you have any other suggestions?
> 
>Cheers and thanks ahead of time,
> 
>Chris
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers

--
Jiri Kuthan            http://iptel.org/~jiri/ 




More information about the sr-users mailing list