[OpenSIPS-Users] is_registered function

Alexey Kazantsev kurgan-rus at inbox.ru
Mon Oct 26 13:49:32 EST 2020


Hi list,
 
OpenSIPS 2.4.8
 
is it possible to use is_registered() finction
if the registered users are saved by mid_registrar module,
and forwarded further to the main registrar server?
 
mid_registrar saves users’ location well, to the «location» table,
‘opensipsctl fifo ul_dump’ shows the list of registered users.
 
I’m trying to drop (ignore) all INVITEs to the external OpenSIPS interface
except 1) from registered users, 2) from VoIP providers SIP trunks.
 
Here’s the construction:
 
* 
# initial INVITE
* 
if(is_method("INVITE"))
* 
{
* 
# invite neither from VoIP ISP, nor from registered user -> drop
* 
if(!is_myself("$si") && $Rp == 5060) {
* 
if(!is_registered("location", "$fU") || !check_source_address("1")) exit;
* 
}
* 
 
* 
...
 
But the result is that _all_ invites are dropped, even from providers’ IP addresses
and from registered users.
 
I also checked logs and found there such an ERROR:
 
    ERROR:core:parse_uri: bad uri, state 0 parsed: <grz1> (4) / <grz106> (6)
    ERROR:registrar:extract_aor: failed to parse Address of Record
    ERROR:registrar:msg_aor_parse: failed to extract address of record!
    ERROR:registrar:is_registered: failed to parse!
 
So, what is the reason of unsuccessful call passing from registered users and white listed IPs,
and why the ERROR occurs? (users have sip accounts like grz1XX, it’s also strange that grz1
is in logs).
-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20201026/e3aafd45/attachment.html>


More information about the Users mailing list