test/th-uri.cfg
6be43c4e
 
76f8a73f
 debug=9          # debug level (cmd line: -dddddddddd)
7ed9a751
 #fork=yes          # (cmd. line: -D)
 fork=no
46931a4d
 log_stderror=yes  # (cmd line: -E)
 #log_stderror=no   # (cmd line: -E)
6be43c4e
 
 
48dbd113
 children=2
46931a4d
 check_via=no      # (cmd. line: -v)
b2dec9c6
 dns=off           # (cmd. line: -r)
46931a4d
 rev_dns=off       # (cmd. line: -R)
c7b8fb63
 port=5070
 listen=193.175.132.142
6be43c4e
 # for more info: sip_router -h
 
 #modules
33032483
 loadmodule "modules/print/print.so"
0498ceb9
 loadmodule "modules/textops/textops.so"
ea104825
 loadmodule "modules/maxfwd/maxfwd.so"
0498ceb9
 loadmodule "modules/sl/sl.so"
c7b8fb63
 loadmodule "modules/tm/tm.so"
 loadmodule "modules/im/im.so"
 loadmodule "modules/sms/sms.so"
6be43c4e
 
 
c7b8fb63
 modparam("sms","modems","Falcom [d=/dev/ttyS1;b=9600;p=9254;m=new;l=2;r=1] ")
 modparam("sms","networks","D1[c=491710765000;m=10]")
 modparam("sms","links","Falcom[D1] ")
006a62a3
 #modparam("sms","domain","hope.fokus.gmd.de")
c7b8fb63
 modparam("sms","max_sms_parts",3)
 modparam("sms","use_contact",1)
 modparam("sms","sms_report_type",2)
7ed9a751
 
2f6ca7a8
 route{
46931a4d
 	if ( !mf_process_maxfwd_header("10") )
 	{
 		sl_send_reply("483","To Many Hops");
 		drop();
 	};
340bddb4
 
c7b8fb63
 	if (uri=~"sip:(\+[0-9]+@)?fesarius\.fokus\.gmd\.de"
 	  | uri=~"sip:(\+[0-9]+@)?193\.175\.132\.142")
46931a4d
 	{
33032483
 		if (method=="MESSAGE")
 		{
 			log("MESSAGE received -> sending as sms\n");
92b6f40f
 			if (sms_send_msg_to_net("D1"))
33032483
 			{
006a62a3
 				sl_send_reply("200","Accepted");
33032483
 			}else{
 				sl_send_reply("502","Bad gateway");
 			};
 		}else{
 			log("NON_Message request received for sms gateway->dropt!\n");
 			sl_send_reply("501","Not implemented");
 		};
 		break;
c7b8fb63
 	};
33032483
 
25b470bf
 
c7b8fb63
 	sl_send_reply("502","Not Implemented");
 	#forward(uri:host,uri:port);
6be43c4e
 }