Hi All,
If I want to allow only one series of numbers to register and discard all other request, is it possible to implement using ser?
For example: I want to allow only 3xxx series phones to get registered and discard all others.
I tried this
If (method==REGISTER && uri=~^sip:3[0-9]*@) {
Save(location);
Break;
}
Else {
Sl_send_reply(401,Unauthorized);
Break;
};
This doesnt seem to be working. 483 error is returned.
Appreciate your help in this regard.
Regards, Suvendu.
________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony
Your condition is not good because you have to look into To header URI. The request URI in REGISTER is the address of server. The user which registers is in URI from To header.
If you use unstable, Andrei introduced variables to access To URI (commit on the 19th of October), but for stable you have to use search() function from textops module.
Salutari, Ramona
Suvendu Sethi wrote:
Hi All,
If I want to allow only one series of numbers to register and discard all other request, is it possible to implement using ser?
For example: I want to allow only 3xxx series phones to get registered and discard all others.
I tried this…
If (method==REGISTER && uri=~”^sip:3[0-9]*@”) {
Save(“location”);
Break;
}
Else {
Sl_send_reply(“401”,”Unauthorized”); Break;
};
This doesn’t seem to be working. 483 error is returned.
Appreciate your help in this regard.
Regards, Suvendu.
Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Thanks Ramona for your input. Just after sending my earlier mail I started using Search but that didn't work either...
if (method=="REGISTER") { if (Search("(f|From):3[0-9]{3}@")) { Save("location"); break; };
Any clue?
Another Question-
Is there any way to re-invite called party if he/she disconnects the phone. If caller disconnects it should disconnect but shouldn't be the case for called party. I know Aspect VoIP controller supports this but not sure about SER.
Many thanks.
Regards, Suvendu.
--- Elena Ramona Modroiu ramona@voice-system.ro wrote:
Your condition is not good because you have to look into To header URI. The request URI in REGISTER is the address of server. The user which registers is in URI from To header.
If you use unstable, Andrei introduced variables to access To URI (commit on the 19th of October), but for stable you have to use search() function from textops module.
Salutari, Ramona
Suvendu Sethi wrote:
Hi All,
If I want to allow only one series of numbers to register and discard all other request, is it
possible
to implement using ser?
For example: I want to allow only 3xxx series
phones
to get registered and discard all others.
I tried this
If (method==REGISTER && uri=~^sip:3[0-9]*@) {
Save(location);
Break;
}
Else {
Sl_send_reply(401,Unauthorized); Break;
};
This doesnt seem to be working. 483 error is returned.
Appreciate your help in this regard.
Regards, Suvendu.
Yahoo! India Matrimony: Find your life partner
online
Go to: http://yahoo.shaadi.com/india-matrimony
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony