How to prevent calls when registration fails

austin
2011-05-06
2013-05-09
  • austin
    austin
    2011-05-06

    I have opensips v.1.6.4-tls running with a mysql backend… users register; calls placed; etc… what do I need to do to prevent calls from being made to and from phones that fail the registration process?  At this point, all phones can make and take calls regardless of registration status. 

    Thank you

     
  • Anca Vamanu
    Anca Vamanu
    2011-05-06

    Hi,

    You can check is the user is registered with  "registered" function from registrar module. Call  registered("location", "$fU")  - or maybe $fu if you use multiple domains. http://www.opensips.org/html/docs/modules/devel/registrar.html#id292998

    Regards,
    Anca Vamanu
    OpenSIPS Developer

     
  • austin
    austin
    2011-05-06

    That's just what I need.  Thank you.

    A

     
  • austin
    austin
    2011-05-06

    I guess I spoke too soon.  I thought I knew what to do this, but I guess I'm not sure.  I am editing the opensips.cfg file and seeing no different behavior.  Can you point me in the direction of an example of how to write this? 

    Thank you for your help
    A