[OpenSIPS-Devel] Control INVITE using variable
Anderson Catao
andersoncatao at hotmail.com
Mon Mar 14 16:03:03 CET 2016
Hello guys !
I'm trying to solve a problem but I'dont know how can I do this in opensips.
I have my opensips.cfg very standard... and I'm using opensips as a redirect
server. My problem at the moment is:
When I receive one call I use the INVITE request to do my redirect however
after I made my first redirect its sens to continue asking for INVITE so it
is doing a lot of request in my redirect script.
<http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7602013/1.png>
What I want to do is:
Just check my redirect number script (external)
"/usr/local/opensips_proxy/sbin/qryNumber $tU" once ... and if I receive
more one request for some INVITE for example from the same call-id I do all
the process without running redirect number script. Below is my opensips.cfg
part of INVITE
# account only INVITEs
if (is_method("INVITE")) {
# create dialog with timeout
if ( !create_dialog("B") ) {
send_reply("500","Internal Server Error");
exit;
}
setflag(ACC_DO); # do accounting
exec_dset("/usr/local/opensips_proxy/sbin/qryNumber $tU");
sl_send_reply("302", "Moved Temporarily");
}
There is any variable that I use to control if is the first INVITE using
"if"...
Tks !!
--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Control-INVITE-using-variable-tp7602013.html
Sent from the OpenSIPS - Devel mailing list archive at Nabble.com.
More information about the Devel
mailing list