Hi All,
I have a architecture of pjsip,kamailio,freeswitch and one external server.
When kamailio is receiving "407"-proxy authentication required from the external server it sends to freeswitch and received "407" from freeswitch.But when replying back to kamailio the freeswitch is adding some extra headers in that "407".
Now I need to send the message from kamailio to pjsip the same thing received from external server.So I need to replace the message received from external server with the message received from freeswitch at kamailio.
I am using redis db to store the message.Can anybody help me how to configure the kamailio so that it will replace the message with freeswitch message and send the original message received before i.e. from external server.
Any suggestion will be highly appreciated.
Thanks,
Narayan
+91-9035438928
Hello,
I am considering to release Kamailio v5.0.1 sometime next week, likely
on Wednesday, April 5, 2017. Should anyone be aware of issues not listed
yet on bug tracker, report them there as soon as possible to try to fix.
Soon after, we should release a new version from branch 4.4 and the last
one from branch 4.3.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
I am using the avpops module to read from a mysql database to look for CFWD information for the call. When a call is placed, it appears the command avp_db_load attempts to read the file but all values come back as NULL. There are no messages in the log and of course the call does not process correctly.
We are using a config that is exactly the same on a 4.3.4 version of kamailio using cento 6.7, with a local version of mysql Ver 14.14 Distrib 5.1.73, that works perfectly. When moving the code to kamailio 4.4.4 on Debian 8, Jessie, mysql Ver 14.14 Distrib 5.5.53 the avp_db_load returns no information.
Here is the snippet of the code we are using. Since I am not used to troubleshooting kamailio, please let me know what other information you need.
Thanks,
Kevin
Code snippet:
#!ifdef WITH_CFWD
xlog ("$TF Call to $rU made it into WITH_CFWD in route[LOCATION] block\n");
# Call forwarding is enabled, so lets do a lookup to pull all AVP's for possible call forwarding types/destinations
# Below line should load all AVP's into memory from DB for the username portion of the TO: field from table usr_preferences
xlog("script should load from DB usr_preferences next");
avp_db_load("$tU","s/usr_preferences");
# This line i simple want to print to log when the avp load is complete and what the values are (for debug purposes only and should typically be commented out)
xlog("DB load should be complete");
xlog("SCRIPT: $TF Call Forwarding Unconditional set to $avp(Unconditional)\n");
xlog("SCRIPT: $TF Call Forwarding NoAnswer set to $avp(NoAnswer)\n");
xlog("SCRIPT: $TF Call Forwarding Busy set to $avp(Busy)\n");
avp_print();
# Check to see if the AVP's are set and if so put them in log for logging purposes
if(is_avp_set("$avp(Unconditional)"))
xlog("SCRIPT: $TF Call Forwarding Unconditional set to $avp(Unconditional)\n");
if(is_avp_set("$avp(NoAnswer)"))
xlog("SCRIPT: $TF Call Forwarding NoAnswer set to $avp(NoAnswer)\n");
if(is_avp_set("$avp(Busy)"))
xlog("SCRIPT: $TF Call Forwarding Busy set to $avp(Busy)\n");
t_set_fr(16000, 15000); # set fr invite timeout to 16s and no response at all to 15s to meet the specs for call fowarding no answer ringtime
# If Call fowarding Unconditional is set, we need to change the dialed number and sent it off to the original users trunk from subscriber table
# Check to see if unconditional is set
if(is_avp_set("$avp(Unconditional)"))
# Shove this call into route [PSTN_CFWD] Block
route("PSTN_CFWD");
Here is the syslog for the same snippet:
09:29 2017 Call to 15703771055 made it into WITH_CFWD in route[LOCATION] block
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: script should load from DB usr_preferences next
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: DB load should be complete
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT: Wed Mar 29 14:09:29 2017 Call Forwarding Unconditional set to <null>
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT: Wed Mar 29 14:09:29 2017 Call Forwarding NoAnswer set to <null>
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT: Wed Mar 29 14:09:29 2017 Call Forwarding Busy set to <null>
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: INFO: avpops [avpops_impl.c:1473]: ops_print_avp(): p=0x7f440ed86f90, flags=0x0113
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: INFO: avpops [avpops_impl.c:1477]: ops_print_avp(): #011#011#011name=<direction>
Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: INFO: avpops [avpops_impl.c:1485]: ops_print_avp(): #011#011#011val_str=<INCOMING / 8>
Hi,
A second update for people who started to look at this issue.
I have identified the real cause of the problem by looking more in the kamailio log with the debug traces. I discover that it is related to the load of the properties table in the htable.
I have the following entries in my mysql db :
+-------+----------------+---------------------------------------------------------+------------+----------+
| id | key_name | key_value | value_type | key_type |
+-------+----------------+---------------------------------------------------------+------------+----------+
| 0 | VERSION | 120104-1734 | 0 | 0 |
| 1 | mmm-retry | 408=Y;502=Y;503=Y | 0 | 0 |
| 2 | mgcf-retry | 408=Y;502=Y;503=Y | 0 | 0 |
| 3 | max-mmm-retry | 2 | 0 | 0 |
| 4 | max-mgcf-retry | 2 | 0 | 0 |
| 5 | target-uri | mgcf=10.10.10.10;mmm-legacy=20.20.20.10;mmm=20.20.20.20 | 0 | 0 |
| 6 | pike-status | 503 Service Overload | 0 | 0 |
| 7 | mgcf-path | 99 | 0 | 0 |
| 16 | mmm-nodeid | OPMMMS1VSE01=1;OPMMMS1VSE02=2 | 0 | 0 |
| 17 | mmm-node-path | 1=1;2=2 | 0 | 0 |
+-------+----------------+---------------------------------------------------------+------------+----------+
In the kamailio.cfg, the << modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;") >> command causes the load of the above table in the htable.
In the log we can see, that the load is done in the alphabetic order of the key_name and it fails to load the last entry "VERSION" :
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: DEBUG: <core> [db_val.c:169]: db_str2val(): converting BLOB [VERSION]
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: DEBUG: <core> [db_val.c:169]: db_str2val(): converting BLOB [120104-1734]
Mar 21 10:25:28 localhost /usr/sbin/kamailio[5784]: ERROR: htable [ht_db.c:276]: ht_db_load_table(): key type must be string (type=6)
If I add a new entry named "WWWWW", then the failure occurs on this entry that is the last alphabetic entry :
| 10000 | WWWWW | toto | 0 | 0 |
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: DEBUG: <core> [db_val.c:169]: db_str2val(): converting BLOB [WWWWW]
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: DEBUG: <core> [db_val.c:74]: db_str2val(): converting INT [0]
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: DEBUG: <core> [db_val.c:169]: db_str2val(): converting BLOB [toto]
Mar 21 10:28:45 localhost /usr/sbin/kamailio[5817]: ERROR: htable [ht_db.c:276]: ht_db_load_table(): key type must be string (type=6)
Attached the kamailio log for each test.
I hope this help.
Have anyone an idea of this problem ?
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick
Envoyé : mardi 21 mars 2017 09:41
À : Kamailio users (sr-users(a)lists.sip-router.org) <sr-users(a)lists.sip-router.org>
Objet : RE: ht_db_load_table(): key type must be string (type=6)
Hi,
There was a mistake in the file attached ; the short kamailio.cfg file (that makes kamailio to start) was not the correct one; attached the correct one.
Have anyone an idea of this problem ?
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick
Envoyé : lundi 20 mars 2017 17:58
À : Kamailio users (sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>) <sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>>
Objet : RE: ht_db_load_table(): key type must be string (type=6)
Hi,
To figure out what causes this issue, I work to shorten my kamailio.cfg to contains loadmodule/modparam instructions for the htable module only.
My first attempt (see kamailio.cfg.ok) shows that the problem doesn't occur.
In the second attempt (see kamailio.cfg.ko) I add instructions previously removed from the original .cfg file. I have determined that, depending on the instructions that follows the "modparam("htable", "fetch_rows", 1000)" line, the "key type must be string (type=6)" error occurs or not.
In this ko file, if I comment out the following sequence, the error occurs :
modparam("htable", "fetch_rows", 1000)
#!!ifdef FIXED_ROUTING
#modparam("htable", "htable", "mbxrangeHash=>size=4;dbtable=mbxrange;")
#!!else
#modparam("htable", "htable", "abpqHash=>size=12;dbtable=abpq;")
#modparam("htable", "htable", "zabpqHash=>size=12;dbtable=zabpq;")
#!!endif
modparam("htable", "htable", "propertiesHash=>size=4;dbtable=properties;")
I hope my explanation is clearn and there are people who can help me on this problem that causes kamailio to not start.
Cordialement
Patrick GINHOUX
De : Ginhoux, Patrick
Envoyé : vendredi 17 mars 2017 15:46
À : Kamailio users (sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>) <sr-users(a)lists.sip-router.org<mailto:sr-users@lists.sip-router.org>>
Objet : ht_db_load_table(): key type must be string (type=6)
Hi,
Now the kamailio installation is completed, I try to start kamailio but got an error on a modparam line.
By looking at the kamailio.cfg (with debug mode) it looks like the instruction is not correct :
modparam("htable", "fetch_rows", 1000)
[root@vm-vse02-siprouter1 ~]# systemctl status kamailio.service -l
kamailio.service - SYSV: Kamailio is a fast, reliable and flexible SIP Server.
Loaded: loaded (/etc/rc.d/init.d/kamailio)
Active: failed (Result: exit-code) since Fri 2017-03-17 15:38:13 CET; 17s ago
Process: 1526 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: pike [pike.c:99]: pike_init(): PIKE - initializing
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: pike [ip_tree.c:81]: init_lock_set(): probing 256 set size
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: cfgutils [cfgutils.c:767]: mod_init(): no hash_file given, disable hash functionality
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: ERROR: htable [ht_db.c:276]: ht_db_load_table(): key type must be string (type=6)
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: ERROR: <core> [core/sr_module.c:968]: init_mod(): Error while initializing module htable (/usr/lib64/kamailio/modules/htable.so)
Mar 17 15:38:13 vm-vse02-siprouter1 /usr/sbin/kamailio[1539]: INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Mar 17 15:38:13 vm-vse02-siprouter1 kamailio[1526]: Starting kamailio:
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: kamailio.service: control process exited, code=exited status=1
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Mar 17 15:38:13 vm-vse02-siprouter1 systemd[1]: Unit kamailio.service entered failed state.
[root@vm-vse02-siprouter1 ~]#
modparam("htable", "fetch_rows", "1000")
[root@vm-vse02-siprouter1 ~]# systemctl status kamailio.service -l
kamailio.service - SYSV: Kamailio is a fast, reliable and flexible SIP Server.
Loaded: loaded (/etc/rc.d/init.d/kamailio)
Active: failed (Result: exit-code) since Fri 2017-03-17 15:26:21 CET; 3s ago
Process: 1452 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)
Mar 17 15:26:20 vm-vse02-siprouter1 systemd[1]: Starting SYSV: Kamailio is a fast, reliable and flexible SIP Server....
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: Not starting : invalid configuration file!
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) ERROR: <core> [core/modparam.c:141]: set_mod_param_regex(): parameter <fetch_rows> of type <1> not found in module <htable>
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) CRITICAL: <core> [core/cfg.y:3404]: yyerror_at(): parse error in config file //etc/kamailio/kamailio.cfg, line 308, column 41: Can't set module parameter
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) WARNING: <core> [core/cfg.y:3378]: warn_at(): warning in config file //etc/kamailio/kamailio.cfg, line 971, column 6-13: constant value in if(...)
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: ERROR: bad config file (1 errors)
Mar 17 15:26:21 vm-vse02-siprouter1 kamailio[1452]: 0(1460) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: kamailio.service: control process exited, code=exited status=1
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: Failed to start SYSV: Kamailio is a fast, reliable and flexible SIP Server..
Mar 17 15:26:21 vm-vse02-siprouter1 systemd[1]: Unit kamailio.service entered failed state.
[root@vm-vse02-siprouter1 ~]#
The documentation shows that fetch_rows is an integer :
fetch_rows (integer)
How many rows to fetch at once from database.
Default value is 100.
Example 1.12. Set fetch_rows parameter
...
modparam("htable", "fetch_rows", 1000)
So how to explain the first error.
Have you any thoughts on this case ?
Cordialement
Patrick GINHOUX
Hi there,
This e-mail is going to be lengthy and I hope you will not get
frustrated (like I am, for different reasons described later) by
reading it all from the beginning to the end since I have just warned
you :P
You have absolutely no need for reading the entire post unless you are
crazy enough read about what I do for fun in given circumstances.
Basically, I would like Kamailio and Asterisk to run on the same box
in such a way that
A.)Asterisk listens on eth0 (on 10.1.1.15/24 with ProxyARP enabled)
for incoming SIP register requests from VoIP-ATAs
B.)Kamailio listens on five IP addresses on dummyN which has
10.1.1.1N/32 (N=0-4, so dummy0 has 10.1.1.10/32, for example) making
five SIP+RTP sessions to the same remote host to appear as if they are
from five different hosts - so that a single instance of Asterisk
running on debian may be registered (through Kamailio) on the same
remote host by using five different accounts and source IP addresses.
I know Asterisk alone cannot do this (even by running multiple
instances of it) and that there have to be five instances of both
SIP-Proxy and RTP-Proxy so that the source address can be literally
spoofed.
Should be simple, but so far cannot find good sources of reference. I
need your advice.
Thanks in advance.
<< Backgrounds - read only if you are curious >>
The so-called frustration is when your needs are not realized due to
technological limitations.
I have years worth of frustration on the VoIP setup at home and that's
totally NOT your fault.
Written below for those who happen to be curious should sound
interesting, so here is the situation I'm facing;
I'm in Japan and our infrastructure is well within the definition of
NGN which in my case includes a low-latency VoIP to replace the
traditional PSTN.
(NTT will end ISDN in 2020, copper-line PSTN in 2025, as announced so far.)
The service is provided by NTT (former state-run telecom) of Japan and
works on FTTH which carries:
a.)PPPoE for those who wish to get IPv4&IPv6 connectivity - which for
the most part is so that users get to choose their favorite ISP.
b.)WAN-reachable IPv6 traffic
c.)WAN-unreachable IPv4 for SIP based services (address blocks
reserved and announced by AS9595)
Given the fact that b.) and c.) are only applicable (optionally and
respectively) to those who signed up for the native-IPv6 (we call it
IPoE, oddly) service and to those who signed up for the VoIP service,
it's essentially an L2 transport service for PPPoE to your ISP - very
much like the way we had our phone-line and ISP (dial-up) separately
signed up for in the old days (hence I call it the access-line
service).
I've made a switch over to VoIP-based PSTN from the copper-line in
April 2011 after seeing that copper-line PSTN served no better in case
of emergency like 3.11 when people want to call others to see if their
loved one are okay - on the evening through the night of March 11
2011, our traditional PSTN stayed at its capacity limits while
VoIP-based means of communication (incl. Skype, surprisingly) stayed
intact. That was the wake-up call.
Now, upon signing up for the VoIP service, the user receives a box so
called HGW (stands for Home Gateway) which is very much a SIP+RTP UA
on its WAN side and SIP+RTP server on LAN side (up to 5 UAs may
register if the UA supports "sip session-timer"). And this HGW is
being the pain that drove me to writing this e-mail - it only allows
one SIP-register per IP address. Further, looking into the specs
requirements for HGW published by NTT (=there's a centralized
documentation for it since the designs and manufacturing of HGW is
split across several companies), there's a part which basically says:
"One SIP register to HGW from a UA on LAN should be able to handle
(but not limited to) one data session. An UA on HGW's LAN side may
support multiple-data session per SIP register(optional)." - which to
me reasonably explains why my HGW only allows one SIP-register per IP
address. My gyess is that the unwritten assumption here is "one sip
register"="one physical phone", which is quite understandable.
Regarding the fact that NTT optionally provides services like:
1.)additional phone numbers
2.)multi-data sessions(RTP for voice, for example)
...on one trunk. This, and also in accordance with the technical
specs. requirements for HGW above means supporting multiple RTP
sessions either terminated or originated by an Asterisk box which sits
on the HGW's LAN side requires that a single instance of Asterisk on a
debian box somehow uses multiple IP addresses (with or without the use
of other software). The simplest way of doing this (to me) seemd like
running five instances of RTP(proxy)+SIP(proxy) which will each listen
on one of five IP addresses, to which the Asterisk instance in
question could establish one session of SIP+RTP each. The idea seemed
simple enough, but there did not seem like good selections of software
years ago. I have once given up on the implementation years ago,
altered the NTT-supplied HGW with a third-party product (NVR500 by
YAMAHA which on its LAN behaves as a MGCP+RTP server) in order to
maximize the stability of the phone system. This was due to the fact
that the x86-box I was using was hardware-unstable and that the HGW's
behavior was something I did not like dealing with (recently solved).
I've decided to make a come-back to Asterisk recently since I recently
started using hylafax running on a RasPi with RS232 modem hooked up to
it but with missing support for CID since the Japanese equivalent of
CID (we call it Number-Display) does not follow the Bellcore standards
and the modem I use only supports Bellcore standards- going VoIP again
and running iaxmodem could solve this issue.
--------------------------------------------
Tahiro Hashizume
Department of Electrical and Electronic Engineering at Tokyo Denki University
5 Senju-Asahi-cho Adachi-ku Tokyo, JP1208551 Japan
--------------------------------------------
Hi all,
I have problem when use module pusher on Kazoo.
The user after receive call from pusher can not receive the Cancel message
if have another people pick up this phone.
I trace log and debug on Kamailio and see the Freeswitch sent Cancel
message but Kamailio reply 481 - Call leg/transaction does not exist.
The configure on Kamailio: default.cfg
=======================================================
*route[PREPARE_INITIAL_REQUESTS]*
*{*
* if (is_method("CANCEL")) {*
* if(t_lookup_cancel()) xlog("L_INFO","$ci|log|========
t_lookup_cancel()");*
* xlog("L_INFO","$rm from $fu (IP:$si:$sp) ---CAPTURED IN
MAIN---\n");*
* if (t_check_trans()) {*
* xlog("L_INFO","$rm from $fu (IP:$si:$sp) ---CHECK TRANS
TRUE---\n");*
* //xlog("L_INFO",
"$ci|log|====================================");*
* route(RELAY);*
* } else {*
* xlog("L_INFO","$rm from $fu (IP:$si:$sp) ---CHECK TRANS
FALSE---\n");*
* sl_send_reply("481", "Call leg/transaction does not exist");*
* }*
* exit();*
* } else if (is_method("ACK")) {*
* if (t_check_trans()) {*
* route(RELAY);*
* }*
* exit();*
* }*
=======================================================
As I read on
http://kamailio.org/docs/modules/4.3.x/modules/tm.html#tm.f.t_check_trans
Kamailio see the cancel message not same the transaction INVITE message.
INVITE message:
------------------------------------------------------------------------
INVITE sip:100@quydang.htk.cvoice SIP/2.0
Via: SIP/2.0/UDP 192.168.1.77:11000;rport;branch=z9hG4bKK9jyp8mXUZHgS
Route: <sip:192.168.1.77:5060>
Max-Forwards: 49
From: "02 quy" <sip:102@quydang.htk.cvoice>;tag=04K2SappeyDtj
To: <sip:100@quydang.htk.cvoice>
Call-ID: 19fa9228-ef95-11e6-b473-1f645951fd7b
CSeq: 103030653 INVITE
Contact: <sip:mod_sofia@192.168.1.77:11000>
User-Agent: Anttel
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog,
line-seize, call-info, sla, include-session-description, presence.winfo,
message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 247
X-AUTH-IP: 192.168.1.141
X-AUTH-PORT: 64799
X-KAZOO-AOR: sip:100@quydang.htk.cvoice
X-KAZOO-PUSHER-Token-Proxy: sip:192.168.1.77:5060
X-KAZOO-PUSHER-Token-ID:
803F0D6610AC5979C6F0513A3A4BE62E0BAF1530DC7A98C2C0DC13D784585FBE
X-KAZOO-PUSHER-Token-Type: apple
X-KAZOO-PUSHER-Token-App: com.htkinc
X-FS-Support: update_display,send_info
Remote-Party-ID: "02 quy" <sip:102@quydang.htk.cvoice
>;party=calling;screen=yes;privacy=off
v=0
o=FreeSWITCH 1486708670 1486708671 IN IP4 192.168.1.77
s=FreeSWITCH
c=IN IP4 192.168.1.77
t=0 0
m=audio 24764 RTP/AVP 0 8 101 13
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
------------------------------------------------------------------------
CANCEL message:
------------------------------------------------------------------------
CANCEL sip:100@quydang.htk.cvoice SIP/2.0
Via: SIP/2.0/UDP 192.168.1.77:11000;rport;branch=z9hG4bKK9jyp8mXUZHgS
Route: <sip:192.168.1.77:5060>
Max-Forwards: 49
From: "02 quy" <sip:102@quydang.htk.cvoice>;tag=04K2SappeyDtj
To: <sip:100@quydang.htk.cvoice>
Call-ID: 19fa9228-ef95-11e6-b473-1f645951fd7b
CSeq: 103030653 CANCEL
Reason: SIP;cause=200;text="Call completed elsewhere"
Content-Length: 0
------------------------------------------------------------------------
How can I know it same transaction ? We have any idea to solve this problem
?
Thank for advice !
Regards,
Hai Bui
--
Hai Bui
VoIP engineer, Cvoice team, HTK-HCM Office
Mobile: +84-165-618-9876
Hello guys,
the merged https://github.com/kamailio/kamailio/pull/995 is not available
on 5.0 and I'm wondering if/when it will be added to 5.0?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
ᐧ
Hello
I am new with kamailio, and trying to add prefix to Request URI ($rU).
I use branch_route, for $rU=”prefix”+$rU, i got two time prefix adding => prefix_prefix_original$rU
This is my code small code:
request_route {
if (is_method("INVITE")) {
$var(ip1)="51.254.245.58";
$var(port1)="33";
if(!t_is_set("branch_route")) route(FWD);
xlog("L_ALERT","Route FWD is executed from ip:$si to ip:$rd \n");
}
exit;
}
route[FWD] {
t_on_branch("CHECK");
t_relay();
}
branch_route[CHECK] {
$rd=$var(ip1);
$rU=$var(port1)+$rU;
xlog("L_ALERT","dst rewrited: $rU \n");
}
LOG FILES :
Mar 28 19:34:45 ns3033789 systemd[1]: Started LSB: Start the Kamailio SIP proxy server.
Mar 28 19:34:54 ns3033789 /usr/sbin/kamailio[2859]: ALERT: <script>: dst rewrited: 3322508983432
Mar 28 19:34:54 ns3033789 /usr/sbin/kamailio[2859]: ALERT: <script>: Route FWD is executed from ip:51.254.245.57 to ip:5.135.177.203
Mar 28 19:34:54 ns3033789 /usr/sbin/kamailio[2859]: ALERT: <script>: dst rewrited: 333322508983432
Mar 28 19:34:54 ns3033789 /usr/sbin/kamailio[2859]: ALERT: <script>: Route FWD is executed from ip:5.135.177.203 to ip:51.254.245.58
Mar 28 19:35:01 ns3033789 CRON[2915]: (root) CMD (/usr/local/rtm/bin/rtm 8 > /dev/null 2> /dev/null)
^C
root@ns3033789:~#
May someone advise me
Thank you in advance
Hi,
I'm trying some logging via UDP, using log_custom module.
I've noticed that the logs are always sent through the first interface in
the config "listen=" rows.
Now, is there a way to listen on that interface, in order to log_udp() on
it, without being able to send/receive any SIP on it? (i.e. disabling SIP
capability and use it only for logging via UDP)
Thank you,
Stefan
Hello guys,
I have in my apt the nightly build repo, which i use fairly regularly for
testing.
Today i tried installing kamailio 5 and got the following:
# apt-get install -y kamailio
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
libdbd-mysql-perl libdbi-perl libev4 libevent-2.0-5 libjansson4
libmysqlclient18 libsctp1 libterm-readkey-perl libunistring0 mysql-client
mysql-client-5.5
mysql-common
Use 'apt-get autoremove' to remove them.
Suggested packages:
kamailio-berkeley-modules kamailio-carrierroute-modules
kamailio-cpl-modules kamailio-dbg kamailio-ldap-modules
kamailio-lua-modules kamailio-mysql-modules
kamailio-perl-modules kamailio-postgres-modules kamailio-presence-modules
kamailio-python-modules kamailio-radius-modules kamailio-snmpstats-modules
kamailio-tls-modules kamailio-unixodbc-modules kamailio-xml-modules
kamailio-xmpp-modules
The following NEW packages will be installed:
kamailio
0 upgraded, 1 newly installed, 0 to remove and 42 not upgraded.
Need to get 0 B/5304 kB of archives.
After this operation, 24.5 MB of additional disk space will be used.
Selecting previously unselected package kamailio.
(Reading database ... 37888 files and directories currently installed.)
Preparing to unpack .../kamailio_5.0.0+0~20170322012605.24+jessie_amd64.deb
...
Unpacking kamailio (5.0.0+0~20170322012605.24+jessie) ...
Processing triggers for systemd (215-17+deb8u4) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up kamailio (5.0.0+0~20170322012605.24+jessie) ...
Job for kamailio.service failed. See 'systemctl status kamailio.service'
and 'journalctl -xn' for details.
invoke-rc.d: initscript kamailio, action "start" failed.
dpkg: error processing package kamailio (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (215-17+deb8u4) ...
Errors were encountered while processing:
kamailio
[master 5dad0af] committing changes in /etc after apt run
16 files changed, 2992 insertions(+)
create mode 100644 default/kamailio
create mode 100755 init.d/kamailio
create mode 100644 kamailio/dictionary.kamailio
create mode 100644 kamailio/kamailio-advanced.cfg
create mode 100644 kamailio/kamailio-basic.cfg
create mode 100644 kamailio/kamailio.cfg
create mode 100644 kamailio/kamctlrc
create mode 120000 rc0.d/K02kamailio
create mode 120000 rc1.d/K02kamailio
create mode 120000 rc2.d/S03kamailio
create mode 120000 rc3.d/S03kamailio
create mode 120000 rc4.d/S03kamailio
create mode 120000 rc5.d/S03kamailio
create mode 120000 rc6.d/K02kamailio
create mode 120000 systemd/system/multi-user.target.wants/kamailio.service
Counting objects: 1321, done.
Compressing objects: 100% (749/749), done.
Writing objects: 100% (1321/1321), done.
Total 1321 (delta 127), reused 1320 (delta 126)
E: Sub-process /usr/bin/dpkg returned an error code (1)
Checking up:
root@homer-dev ~/homer-docker# systemctl status kamailio.service
* kamailio.service - Kamailio (OpenSER) - the Open Source SIP Server
Loaded: loaded (/lib/systemd/system/kamailio.service; enabled)
Active: failed (Result: exit-code) since Mon 2017-03-27 16:58:09 UTC; 7s
ago
Mar 27 16:58:09 homer-dev kamailio[9438]: ERROR: <core> [core/cfg.y:3264]:
yyparse(): cfg. parser: failed to find command t_precheck_trans (params 0)
Mar 27 16:58:09 homer-dev kamailio[9438]: CRITICAL: <core>
[core/cfg.y:3404]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 479,...oadmodule?
Mar 27 16:58:09 homer-dev kamailio[9438]: ERROR: <core> [core/cfg.y:3264]:
yyparse(): cfg. parser: failed to find command t_check_trans (params 0)
Mar 27 16:58:09 homer-dev kamailio[9438]: CRITICAL: <core>
[core/cfg.y:3404]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 480,...oadmodule?
Mar 27 16:58:09 homer-dev kamailio[9438]: ERROR: <core> [core/cfg.y:3264]:
yyparse(): cfg. parser: failed to find command t_check_trans (params 0)
Mar 27 16:58:09 homer-dev kamailio[9438]: CRITICAL: <core>
[core/cfg.y:3404]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 483,...oadmodule?
Mar 27 16:58:09 homer-dev systemd[1]: kamailio.service: control process
exited, code=exited status=255
Mar 27 16:58:09 homer-dev systemd[1]: Failed to start Kamailio (OpenSER) -
the Open Source SIP Server.
Mar 27 16:58:09 homer-dev systemd[1]: Unit kamailio.service entered failed
state.
Mar 27 16:58:09 homer-dev kamailio[9438]: ERROR: bad config file (46 errors)
Hint: Some lines were ellipsized, use -l to show in full.
All modules are there, the problem is the startup script can't find where
the modules are installed? If i just un-comment the "mpath" in the config
file, kamailio starts normally.
/* set paths to location of modules */
# mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"
I'm not 100% sure "mpath" was set before, but i don't remember having to
set that up in the near past...
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337 <+34%20669%2044%2083%2037>
ᐧ