[Serusers] does_uri_exist does not find user in subscriber db?

Jan Janak jan at iptel.org
Thu Jul 15 08:53:04 CEST 2004


My quick guess is that the domain part of the Request-URI does not match
the domain in subscriber table. Try to set the following:

modparam("uri", "use_domain", 0)

that would disable domain matching, or compare the domain part of the 
Request-URI of the SIP message to the domain in subscriber table to see if 
they are the same.

  Jan.

On 14-07 16:46, Francisco Cuellar wrote:
> Hello all,
> 
> I've been having trouble with does_uri_exist function in uri module..for
> some reason it does not see the username in the subscriber table..
> am running ser-0.8.12 stable,
> checks.c file where function does_uri_exist resides in uri directory of Ser
> source is $Id: checks.c,v 1.10 2003/04/28 22:08:03 janakj Exp $
> 
> here are the options I'm loading for uri module
> 
> modparam("uri", "db_url", "mysql://seruser:serpasswd@localhost/ser")
> modparam("uri", "subscriber_table", "subscriber")
> modparam("uri", "uri_table", "uri")
> modparam("uri", "uri_user_column", "username")
> modparam("uri", "uri_domain_column", "domain")
> modparam("uri", "uri_uriuser_column", "uri_user")
> modparam("uri", "subscriber_user_column", "username")
> modparam("uri", "subscriber_domain_column", "domain")
> 
> this is the part on ser.cfg where I am trying to apply does_uri_exist
> 
>   if (!lookup("location")) {
>                 log(1, "LOG:USRLOC request not found\n");
>                 if (does_uri_exist()) {
>                         log(1, "LOG:URI Exists\n");
>                         if (is_user_in("Request-URI", "voicemail")) {
>                                 rewritehostport("192.168.10.10:5090");
>                                 log(1, "LOG:USRLOC request not found,VM
> set,relay to VM\n");
>                                 if (!t_relay()) {
>                                         sl_reply_error();
>                                         break;
>                                 };
>                         break;
>                         };
>                 };
>         };
> 
> I know that the username is in the subscriber table username 4500
> 
> when I check the mysql db I get
> mysql> select * from subscriber where username=4500;
> 
> | phplib_id                        | username | domain              |
> password |
>  first_name | last_name | phone | email_address            |
> datetime_created
>  | datetime_modified   | confirmation | flag | sendnotification | greeting |
> ha1
>                               | ha1b                             | perms |
> allow
> _find | timezone |
> ------+----------+
> | c493919a77f0c3e2671dce9048a78cce | 4500     | sip.mydomain.com| 4500     |
>             |           |       | 4500 at sip.mydomain.com| 2004-06-25 00:32:27
>  | 0000-00-00 00:00:00 |              | o    |                  |          |
> c49
> 3919a77f0c3e2671dce9048a78cce | 643bfb0b11229b401fc32c4af1b538d4 | NULL  | 0
>       | NULL     |
> +----------------------------------+----------+---------------------+-------
> ---+
> 
> but while running debug during a call to 4500 which is not in location db
> but is in subscriber table i get
> 
>  0(20262) lookup(): '4500' Not found in usrloc
>  0(20262) LOG:USRLOC request not found
>  0(20262) does_uri_exit(): User in request uri does not exist
>  0(20262) LOG: Called not in location DB/n 0(20262) parse_headers:
> flags=16384
> 
> Is there something missing in my script that is needed by does_uri_exist?
> 
> I really appreciate any help pointing me in the right direction
> 
> Thanks
> Francisco

> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list