瀏覽代碼

units: tlcust0001 - updates with explicit listen on loopback

Daniel-Constantin Mierla 4 年之前
父節點
當前提交
59618d1fac
共有 2 個文件被更改,包括 11 次插入7 次删除
  1. 3 1
      units/tlcust0001/kamailio-tlcust0001.cfg
  2. 8 6
      units/tlcust0001/tlcust0001.sh

+ 3 - 1
units/tlcust0001/kamailio-tlcust0001.cfg

@@ -15,6 +15,8 @@ log_prefix="{$mt $hdr(CSeq) $ci} "
 /* number of SIP routing processes */
 children=2
 
+listen=udp:127.0.0.1:5060
+
 log_engine_type="udp"
 log_engine_data="127.0.0.1:24680"
 
@@ -51,6 +53,6 @@ loadmodule "counters.so"
 request_route {
 	xlog("===== xlog message - R-URI is $ru\n");
 	log_udp("===== logcustom message - R-URI is $ru\n");
-	sl_send_reply("200", "ok");
+	sl_send_reply("200", "Received");
 	exit;
 }

+ 8 - 6
units/tlcust0001/tlcust0001.sh

@@ -4,14 +4,16 @@
 . ../../libs/utils
 
 
-echo "--- start nc -ulp 24680 | tee /tmp/kamailio-tlcust0001.netcat &"
-nc -ulp 24680 | tee /tmp/kamailio-tlcust0001.netcat &
+echo "--- start nc -u -l -p 24680 | tee /tmp/kamailio-tlcust0001.netcat &"
+rm -f /tmp/kamailio-tlcust0001.netcat
+nc -u -l -p 24680 | tee /tmp/kamailio-tlcust0001.netcat &
+sleep 1
 echo "--- start kamailio -f ./kamailio-tlcust0001.cfg"
 ${KAMBIN} -P ${KAMPID} -w ${KAMRUN} -Y ${KAMRUN} -f ./kamailio-tlcust0001.cfg -a no 2>&1 | tee /tmp/kamailio-tlcust0001.log &
 ret=$?
-sleep 1
+sleep 2
 echo "--- run sipsak -s sip:[email protected]"
-sipsak -s sip:[email protected]
+sipsak -vvv -s sip:[email protected]:5060
 sleep 1
 kill_pidfile ${KAMPID}
 sleep 1
@@ -21,9 +23,9 @@ echo
 echo "--- output files"
 echo
 ls -l /tmp
-echo "---"
+echo "--- /tmp/kamailio-tlcust0001.netcat"
 cat /tmp/kamailio-tlcust0001.netcat
-echo "---"
+echo "--- /tmp/kamailio-tlcust0001.log"
 cat /tmp/kamailio-tlcust0001.log
 echo "---"
 echo "--- grep output"