Hi Raymond,
try this in failure route:
failure_route[x] {
log(1,"--inside failure route\n");
if (t_check_status("(404)|(487)")) {
log(1,"--status is 404 or 487\n");
avp_db_delete("$from","s:/inuse"); # no need to load before
}
exit;
}
watch the log messages and the mysql queries in the logs.
regards,
bogdan
Raymond Chen wrote:
HI Andrei,
Finally get the avp_check working, we have not problem adding a entry using
avp_db_store now. But how to catch SIP 404 not found message and
avp_db_delete the entry in database? We've tried
if (t_check_status("404|487")) {
if (avp_db_load("$from","s:inuse/inuse")) {
avp_db_delete("$from","s:/inuse");
}
exit();
}
In failure_route, but it doesn't seem to catch the 404 status message. Any
idea?
Thanks
Ray
-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 06, 2005 1:32 AM
To: Raymond Chen
Cc: [email protected]
Subject: Re: [Devel] how to prevent concurrent calls per subscriber?
Hi Raymond,
this is a runtime error. it means that you try to check via "avp_check"
two avps which have different types of values (int and string).
my guess is that the problem is around :
avp_write("s:inuse","$intinuse");
if (avp_check("s:limit","gt/$intinuse/g")) {
avp_write will actually write the "s:inuse" string into $intinuse AVP
and not copy the value (not sure which is the intention).
Use avp_print() before each "avp_check" to see the values (use debug=6).
regards,
bogdan
_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users