Re: [SR-Users] How to understad that user is de-registrating

2016-06-24 Thread Alexandru Covalschi
Thanks for the info guys, I've fixed my config to suit the correct logic. Thanks again! 2016-06-23 8:40 GMT+03:00 Daniel-Constantin Mierla : > Hello, > > On 19/06/16 19:41, Alexandru Covalschi wrote: > > Hello list, > > I need to send to an external API events when user is registrated and > de-re

Re: [SR-Users] How to understad that user is de-registrating

2016-06-22 Thread Daniel-Constantin Mierla
Hello, On 19/06/16 19:41, Alexandru Covalschi wrote: > Hello list, > > I need to send to an external API events when user is registrated and > de-registrated. > As far as I understand standart behaviour is as follows: > > If user is not registered, he sends REGISTER and he is registrated (I > can

Re: [SR-Users] How to understad that user is de-registrating

2016-06-22 Thread Daniel-Constantin Mierla
Hello, $expires(min) can be used to see if there is an unregistration going on: - https://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#expires_key_-_expires_values It is more safe to use this variable because expire value can be either as Expires header or as parameter in Contact head

Re: [SR-Users] How to understad that user is de-registrating

2016-06-19 Thread SamyGo
Hi Alexandru, The Expire header in Register can be your clue here. if it is greater than 0 means its a registration attempt. If the value is 0 then it is un-register request. This is how you can catch this. if(is_method("REGISTER") ) { if($hdr(Expire) == 0) { // Un-Registering User $fU } els