[OpenSIPS-Devel] Reply INVITE

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Mar 16 09:39:00 CET 2016


Hi ,

Maybe you deal with INVITE retransmissions and your script gets also 
triggered for the retransmissions.

Try placing a t_newtran() (actually switching in stateful mode and 
absorbing eventual retransmissions) first thing in the "if INVITE" block

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 15.03.2016 19:45, Anderson Catao wrote:
> Hello !
>
> I'm having a problem that this disturbing me a lot and I have no idea how
> can I solve this. I'm using my opensips as redirect server and some INVITE
> that the server receives some times it doesn't answer and the most time its
> works perfect... When Its occur I the server run my redirect script twice
> and it must not occur, because every time that I run my script I need to pay
> for that....
>
> Opensips server: 192.168.1.100
> Request device: 192.168.1.101
> Opensips.cfg:
>
> if (is_method("INVITE")) {
> 		# create dialog with timeout
> 		if ( !create_dialog("B") ) {
> 			send_reply("500","Internal Server Error");
> 			exit;
> 		}
> 		
>
> 			if ($tU == $rU)#
> 			{
> 			 setflag(ACC_DO); # do accounting
> 			 exec_dset("/usr/local/opensips_proxy/sbin/qryNumber $tU $Au $ci $rU");
> 			 sl_send_reply("302", "Moved Temporarily"); #
> 			 exit;
> 			} else {
> 			 sl_send_reply("302", "Moved Temporarily"); #
> 			 exit;
> 			}
>
> 	}
>
>
>
> Wireshark:
> <http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7602043/wireshark.png>
>
> Opensips log debug 6:
>
>




More information about the Devel mailing list