mirror of https://github.com/sipwise/kamailio.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
debug=9 # 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
|
|
log_stderror=yes # (cmd line: -E)
|
|
#port=5080
|
|
#listen=192.168.99.100
|
|
loop_checks=1
|
|
# for more info: sip_router -h
|
|
|
|
#modules
|
|
loadmodule "modules/print/print.so"
|
|
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");
|
|
|
|
if ( t_lookup_request()) {
|
|
print("\nFOUND REQUEST\n");
|
|
if ( method=="ACK" ) {
|
|
log("SER: ACK received -> t_release\n");
|
|
t_release();
|
|
} else {
|
|
t_retransmit_reply();
|
|
log("SER: yet another annoying retranmission\n");
|
|
};
|
|
} else {
|
|
print("\nbefore add transaction\n");
|
|
t_add_transaction();
|
|
print("\nafter 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");
|
|
} else {
|
|
print("\nELSE if method\n");
|
|
log("SER: new transaction\n");
|
|
t_send_reply("100", "trying -- your call is important to us");
|
|
};
|
|
print("\nbefore rewrite host\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" );
|
|
print("\nbefore forward uri\n");
|
|
t_forward_uri();
|
|
# XXX ... it doesn't like default port numbers
|
|
# t_forward("fox.iptel.org" );
|
|
# XXX t_forward_uri ... not done yet
|
|
};
|
|
|
|
}
|