|
@@ -1,12 +1,12 @@
|
|
|
-debug=9 # debug level (cmd line: -dddddddddd)
|
|
|
+debug=3 # debug level (cmd line: -dddddddddd)
|
|
|
check_via=yes # (cmd. line: -v)
|
|
|
dns=on # (cmd. line: -r)
|
|
|
rev_dns=yes # (cmd. line: -R)
|
|
|
-fork=no # (cmd. line: -D)
|
|
|
-#children=5
|
|
|
+fork=yes # (cmd. line: -D)
|
|
|
+children=4
|
|
|
log_stderror=yes # (cmd line: -E)
|
|
|
#port=5080
|
|
|
-#listen=192.168.99.100
|
|
|
+listen=127.0.0.1
|
|
|
loop_checks=1
|
|
|
# for more info: sip_router -h
|
|
|
|
|
@@ -16,35 +16,58 @@ loadmodule "modules/tm/tm.so"
|
|
|
|
|
|
route{
|
|
|
#rewritehost("iptel.org");
|
|
|
- log("trying forward to uri");
|
|
|
# forward(uri:host,uri:port);
|
|
|
# forward(127.0.0.1, 5090);
|
|
|
- log("after forward");
|
|
|
+# sethost("127.0.0.1");
|
|
|
+# setport("5090");
|
|
|
|
|
|
if ( t_lookup_request()) {
|
|
|
if ( method=="ACK" ) {
|
|
|
log("SER: ACK received -> t_release\n");
|
|
|
- t_forward("iptel.org", "5060" );
|
|
|
- t_release();
|
|
|
+ if (! t_forward("127.0.0.1", "5090" )) {
|
|
|
+ log("SER: WARNING: bad forward\n");
|
|
|
+ };
|
|
|
+ if (! t_release()) {
|
|
|
+ log("SER: WARNING: bad t_release\n");
|
|
|
+ };
|
|
|
} else {
|
|
|
- t_retransmit_reply();
|
|
|
+ if (! t_retransmit_reply()) {
|
|
|
+ log("SER: WARNING: bad t_retransmit_reply\n");
|
|
|
+ };
|
|
|
log("SER: yet another annoying retranmission\n");
|
|
|
};
|
|
|
} else {
|
|
|
- t_add_transaction();
|
|
|
+ if (! t_add_transaction()){
|
|
|
+ log("SER: ERROR: t_add_transaction\n");
|
|
|
+ };
|
|
|
if (method=="CANCEL") {
|
|
|
log("SER: new CANCEL\n");
|
|
|
# XXX ... it wants me to put status code in ""
|
|
|
- t_send_reply( "200", "glad to cancel");
|
|
|
+ if (! t_send_reply( "200", "glad to cancel")){
|
|
|
+ log("SER:ERROR: t_send_reply\n");
|
|
|
+ };
|
|
|
} else {
|
|
|
log("SER: new transaction\n");
|
|
|
- t_send_reply("100", "trying -- your call is important to us");
|
|
|
+ if (! t_send_reply("100", "trying -- your call is important to us")
|
|
|
+ ){
|
|
|
+ log("SER: ERROR: t_send_reply (100)\n");
|
|
|
+ };
|
|
|
};
|
|
|
#rewritehost("iptel.org");
|
|
|
# XXX ... it wants me to put port nr in ""
|
|
|
#t_forward("benetnash.fokus.gmd.de", "5080" );
|
|
|
- #t_forward("iptel.org", "5060" );
|
|
|
- t_forward_uri();
|
|
|
+ if (method=="BYE") {
|
|
|
+ log("SER: BYE received, HACK: forwarding to client\n");
|
|
|
+ if (! t_forward("127.0.0.1", "5000")){
|
|
|
+ log("SER:ERROR: t_forward (..., 5000)\n");
|
|
|
+ };
|
|
|
+
|
|
|
+ }else{
|
|
|
+ if (! t_forward("127.0.0.1", "5090" )){
|
|
|
+ log("SER:ERROR: t_forward (..., 5090)\n");
|
|
|
+ };
|
|
|
+ };
|
|
|
+ #t_forward_uri();
|
|
|
# XXX ... it doesn't like default port numbers
|
|
|
# t_forward("fox.iptel.org" );
|
|
|
# XXX t_forward_uri ... not done yet
|