[Serusers] onreply_route and EXEC module: SER-187

Jan Janak jan at iptel.org
Sat Dec 2 02:19:29 CET 2006


exec_msg could be extended to handle the first line of replies properly
and then the function could be called from onreply_route sections.

I created a patch which does this:

http://tracker.iptel.org/browse/SER-187

The patch will go into CVS after we create a branch for Ottendorf and
it will be included in the over-next release (the one after Ottendorf).

Thanks for the report.

   Jan.

Benito Caracuel wrote:
> Hello all,
> 
> I need to execute an exec_msg command inside onreply_route code buy SER doesn't permit this.
> 
> This is my ser.cfg:
> 
> route{
> 
> ......
> 
> if (method=="INVITE"){
>                         ..........
>                         t_relay();
> 			route(2);
> 			break;	
> 		};	
> 
> route[2]
> {
> 	t_on_reply("2");
> }
> 
> onreply_route[2] 
> {
> 	if (status=~"200"){
> 		if ( search("msrp:") ){
> 			exec_msg("printenv SRCIP > /tmp/200ok.txt; cat >> /tmp/200ok.txt; /bin/bash /usr/local/ser_snapshot/sbin/controlador2");
> 			replace_all_file("msrp:\/\/[0-9\.:\/;a-z]*\r","/tmp/pathmsrp200ok.txt");
> 		}
> 	}
> }
> 
> In onreply_route, I need to execute exec_msg to manipulate 200 ok, but SER doesn't permit it.
> 
> What can I execute exec_msg??
> 
> I try to probe this:
> 
> route[2]
> {
> 	t_on_reply("2");
> }
> 
> onreply_route[2] 
> {
> 	if (status=~"200"){
> 		if ( search("msrp:") ){
> 			t_on_failure("2");
> 		}
> 	}
> }
> 
> failure_route[2] {
> 	exec_msg("printenv SRCIP > /tmp/200ok.txt; cat >> /tmp/200ok.txt; /bin/bash /usr/local/ser_snapshot/sbin/controlador2");
> 	replace_all_file("msrp:\/\/[0-9\.:\/;a-z]*\r","/tmp/pathmsrp200ok.txt");
> 	t_relay();
> }
> 
> But never enter in failure route!!!
> 
> Thank you in advance for any help.
> 
> 
> 
> 
> _________________________________________________________________
> Busca desde cualquier página Web con una protección excepcional. Consigue la Barra de herramientas de Windows Live hoy mismo y GRATUITAMENTE.
> http://www.toolbar.live.com_______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
> 




More information about the sr-users mailing list