[OpenSIPS-Devel] Adding User-Agent "blacklist" feature to pua_usrloc

Iñaki Baz Castillo ibc at aliax.net
Fri Dec 26 17:58:23 CET 2008


Hi, for now in order to avoid pua_usrloc generating PUBLISH for UA's
supporting presence I do the following test:

  ### PUA_USRLOC PUBLISH
  if $ua !~ "UAS_SUPPORTING_PRESENCE" {
      xlog("L_INFO","--- pua_set_publich for $fu ($ua)\n");
      pua_set_publish();
  }


Where:
  define(`UAS_SUPPORTING_PRESENCE',	`^(Twinkle/1|Snom|Linphone|eyeBeam|X-Lite|SIP
Communicator|SIPp|PJSUA)')


I think it would be useful to do it in a more ellegant way, perhaps by
having a text file containing User-Agent regular expressions loaded
during OpenSIPS startup (and hopefully also with a FIFO command).
Something like "permissions.allow" file.

Any tip about how to start with it? is something as
"permissions.allow" a good way to start? suggestions?

-- 
Iñaki Baz Castillo
<ibc at aliax.net>


More information about the Devel mailing list