Hi,
Kamailio is complaining about unexpected char [#015] in TO header of INVITE:
Jan 3 14:55:41 tpa-ar-openser01 /usr/sbin/kamailio[4782]: ERROR: <core> [parser/parse_to.c:626]: ERROR: parse_to : unexpected char [#015] in status 6: <<<sip:2057030997@72.31.12.161;tag=gK006cb08b>> .
Jan 3 14:55:41 tpa-ar-openser01 /usr/sbin/kamailio[4782]: ERROR: <core> [parser/msg_parser.c:180]: ERROR: get_hdr_field: bad to header
Jan 3 14:55:41 tpa-ar-openser01 /usr/sbin/kamailio[4782]: INFO: <core> [parser/msg_parser.c:353]: ERROR: bad header field [To: <sip:2057030997@]
Jan 3 14:55:41 tpa-ar-openser01 /usr/sbin/kamailio[4782]: ERROR: tm [t_lookup.c:1118]: ERROR: reply cannot be parsed
Here is the TO header for the same call in both text and hex format. I am unable to see any ^M char in this TO header.
To: <sip:2057030997@72.31.12.161;tag=gK006cb08b
546f3a203c7369703a323035373033303939374037322e33312e31322e3136313e3b7461673d674b30303663623038620d0a
Any help would be appreciated.
AS,
Hello,
as of now, no active MI reladed code should be in master branch -- the
internal library kmi and the mi_datagram, mi_fifo, mi_xmlrpc, mi_rpc and
pua_mi modules were removed.
Couple of modules still have some mi code disabled with ifdefs, they are
pending the port to RPC commands. These are:
- carrierroute
- ims_dialog
- mohqueue
- p_usrloc
- pdb
- rtpengine
- userblacklist
- utils
They should be updated in the next few days.
With MI code removed, the code is slimmer and the development effort is
reduced -- in the recent past there were various issue rising due to
usage of the old line-based MI commands.
>From now on, the RPC interface has to be used for interacting with
kamailio at runtime.
The tools:
- kamctl - was already migrated to use RPC via jsonrpcs module.
- kamcmd - was developed to use only RPC interface via ctl module.
- kamcli - is also working with RPC via jsonrpcs module
Helping with testing the RPC commands is very appreciated -- open an
issue on bug tracker whenever you discover a problem.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hello Vicente,
Thanks for your response,
In response to your query,
Yes i have Built ndb_redis module and i can see ndb_redis.so in /usr/local/lib64/kamailio/modules folder, I have installed hiredis depenency also,
I have also modified the kamailio.cfg file loadmodule and modparam list,
I feel like the way i am using the redis_cmd is wrong, I think i need to add it in route section of kamailio.cfg file, Can you please guide me regarding how to use redis db in order to update user information to DB on registration of each user.
Thanks & Regards
Hemanth
Message: 8
Date: Wed, 4 Jan 2017 14:41:42 +0530 (IST)
From: "hemanth(a)advaitamtech.com" <hemanth(a)advaitamtech.com>
To: sr-users(a)lists.sip-router.org
Subject: [SR-Users] Regarding usage of Redis Module in Kamailio core
Message-ID: <1483521102.18025940(a)apps.rackspace.com>
Content-Type: text/plain;charset=UTF-8
Hello,
I am using Kamailio as a SIP proxy,
I want to store Registered user information in Redis DB,
I am able to configure REDIS DB, But i am not able to run the redis command from
Kamailio core using the function
"redis_cmd("srvN","SET key 1", "r")"
I am getting undefined reference error as below
"/usr/local/src/kamailio-4.4/kamailio/receive.c:208: undefined reference to `redis_cmd'"
can anyone please help me to fix this issue
Thanks & Regards
Hemanth
------------------------------
Message: 9
Date: Wed, 4 Jan 2017 10:50:05 +0100
From: Vicente Hernando <vhernando(a)systemonenoc.com>
To: sr-users(a)lists.sip-router.org
Subject: Re: [SR-Users] Regarding usage of Redis Module in Kamailio
core
Message-ID: <b003d2aa-ddd0-574d-b9e3-9b91e44976f1(a)systemonenoc.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Hello Hemanth,
just a quick response, I would check if you compiled ndb_redis module
correctly (also if you have hiredis library dependency).
Also I would check if you loaded ndb_redis module in your configuration
file.
Regards,
Vicente.
On 01/04/2017 10:11 AM, hemanth(a)advaitamtech.com wrote:
> Hello,
>
> I am using Kamailio as a SIP proxy,
>
> I want to store Registered user information in Redis DB,
>
> I am able to configure REDIS DB, But i am not able to run the redis command from
>
> Kamailio core using the function
>
> "redis_cmd("srvN","SET key 1", "r")"
>
> I am getting undefined reference error as below
>
> "/usr/local/src/kamailio-4.4/kamailio/receive.c:208: undefined reference to `redis_cmd'"
>
> can anyone please help me to fix this issue
>
> Thanks & Regards
> Hemanth
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
------------------------------
Subject: Digest Footer
_______________________________________________
sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
------------------------------
End of sr-users Digest, Vol 140, Issue 3
****************************************
Hello,
I am using Kamailio as a SIP proxy,
I want to store Registered user information in Redis DB,
I am able to configure REDIS DB, But i am not able to run the redis command from
Kamailio core using the function
"redis_cmd("srvN","SET key 1", "r")"
I am getting undefined reference error as below
"/usr/local/src/kamailio-4.4/kamailio/receive.c:208: undefined reference to `redis_cmd'"
can anyone please help me to fix this issue
Thanks & Regards
Hemanth
Hello,
based on lib linking in Makefiles, the following modules still use MI,
categorized by their state from my point of view. Hopefully some other
people will help with those listed in 2) to 6).
1) to be removed
- mi_datagram
- mi_fifo
- mi_rpc
- mi_xmlrpc
- pua_mi
2) rpc commands implemented
- dialog - others modules depend on some mi callback from it (qos and sst)
- qos - this looks ready to wipe out the mi code, but didn't get the
time not analyze properly as I don't use it usually
3) some rpc commands implemented and the rest should not be very complex
- carrierroute - I implemented the dump rpc command, but it was
reported that it has issues, so it needs follow up.
4) rpc commands have to be implemented, expecting not to be very complex
- cplc
- imc
5) expecting some degree of complexity, but they are important modules
- rtpengine
- rtpproxy
6) not familiar with the mi commands in these modules, so not able to
assert what to expect
- ims_dialog - some rpc commands are implemented, not sure if the rest
of MI are used/usefull
- mohqueue - it doesn't seem complex to implement rpc commands at
first sight, but the indentation style didn't allowed a fast analyze on
a quick look
- p_usrloc - several mi commands
- sst - uses some callback for MI from dialog module. qos has
something similar with rpc alternative already implemented
- userblacklist - several mi commands
- utils - there are few mi commands related to some forwarding rules:
https://www.kamailio.org/docs/modules/devel/modules/utils.html#idp21741924
The 1) to 5) should be done in a way or another, before of after freeze
of 5.0.0. But 6) would require the devs of the modules (or the MI parts)
to help if they want those commands via RPC.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hi,
I want to use Kamailio as SIP loadbalancer and NAT helper in front of
freeswitch boxes. Main tasks here are:
1. load balancing SIP requests to freeswitch boxes
2. fixing contact information during registrations and invites for nat'ed
clients (kamailio is not registrar)
3. fixing sdp (or proxying rtp via rtpproxy) for nat'ed clients
4. security (check SIP messages, pike, etc)
5. outbound proxy for freeswitch boxes
The main question here is about nat pinning. Acctording to module doc (
http://kamailio.org/docs/modules/4.4.x/modules/nathelper.html) I need
nathelper module and usrloc module.
So I can proxy REGISTER requests to freeswitch boxes and in onreply_route
check for REGISTER statuses:
1. if no success we use pike to limit bruteforce attacks
2. if success I need to save contact to usrloc db table
But there is one issue. Multiple registration are allowed on freeswitch
boxes and in replies (freeswitch -> kamailio) I see more than one Contact
header.
Is it an issue or kamailio will handle it without problems?
Or I need to save Contact header from request to hash table and retreive it
in onreply_route? But I do not know how to save it in usrloc db table then.
I thin this is more sophisticated approach.
I appreciate your advice.
Thank you in advance.
--
С уважением,
Владислав Захожай
Request to all - Please help we are BADLY stuck in this asterisk 11.13 and
Kamailio 4.1 integration provided with Elastix MT
Our Configuration is like this:
Asterisk IP - 10x.3x.6x.236 port 5080
Kamailio IP - 10x.3x.6x.236 port 5060
Please see our kamailio.cfg attached.
Issue 1:
Issue is REGISTER messages sent by asterisk are not responded by kamailio
asterisk is constantly doing a re-transmit on REGISTER messages.
Retransmitting #1 (NAT) to 10x.3x.6x.236:5060:
REGISTER sip:ims.airtel.in SIP/2.0
Via: SIP/2.0/UDP 10x.3x.6x.236:5080;branch=z9hG4bK40ac1ed8;rport
Max-Forwards: 70
From: <sip:+91224400@ims.airtel.in>;tag=as565ef860
To: <sip:+91224400@ims.airtel.in>
Call-ID: 7dd361ec25cb07344ea9df526e89ca8a(a)10x.3x.6x.236
CSeq: 182 REGISTER
User-Agent: Asterisk PBX 11.13.0
Expires: 120
Contact: <sip:+91224400@10x.3x.6x.236:5080>
Content-Length: 0
Issue 2:
We are not able to see any log messages in /var/log/kamailio.log. We have
done all kind of changes suggested on online blogs
Why does kamailio not have a pre-set configuration as it is mostly used as
sip proxy?
Manoj K. Gupta
Hi all,
I'm using Kamailio to forward calls between 2 Service Providers and I need
to rewrite the From header "domain" URI.
Example:
From: "+18888888888" <sip:+18888888888@sip.sp1.com> to
From: "+18888888888" <sip:+18888888888@*sip.sp2.com <http://sip.sp2.com>*>
*Call flow:*
Phone A --- > SP1 ---> sip ----> (kamailio) SP2 --(LOCATION)-> Phone B
When Phone A calls SP2 PhoneB, it contains original sip domain from sp1. (
sip.sp1.com) hence user in SP2 can see call comes from SP1. I would like to
rewrite the From domain field in this conditions:
a) Calls comes from "sip.sp1.com" AND
b) Call is being routed to PhoneB.
Right now Im using the following code to find user and send call to B.
#!ifdef WITH_ALIASDB
# search in DB-based aliases
xlog("L_INFO","alias_db_lookup: Call received. $rU\n");
if(alias_db_lookup("dbaliases")) {
route(SIPOUT);
}
#!endif
I found this in documentation:
$fd - From URI domain
if($hdr(From)=~"sip.sp1\.com") {
...}
But not sure where is the best place to overwrite the From URI domain
header.
Thanks
Request to all - Please help we are BADLY stuck in this asterisk 11.13 and
Kamailio 4.1 integration provided with Elastix MT
Our Configuration is like this:
Asterisk IP - 10x.3x.6x.236 port 5080
Kamailio IP - 10x.3x.6x.236 port 5060
Please see our kamailio.cfg attached.
Issue 1:
Issue is REGISTER messages sent by asterisk are not responded by kamailio
asterisk is constantly doing a re-transmit on REGISTER messages.
Retransmitting #1 (NAT) to 10x.3x.6x.236:5060:
REGISTER sip:ims.airtel.in SIP/2.0
Via: SIP/2.0/UDP 10x.3x.6x.236:5080;branch=z9hG4bK40ac1ed8;rport
Max-Forwards: 70
From: <sip:+91224400@ims.airtel.in>;tag=as565ef860
To: <sip:+91224400@ims.airtel.in>
Call-ID: 7dd361ec25cb07344ea9df526e89ca8a(a)10x.3x.6x.236
CSeq: 182 REGISTER
User-Agent: Asterisk PBX 11.13.0
Expires: 120
Contact: <sip:+91224400@10x.3x.6x.236:5080>
Content-Length: 0
Issue 2:
We are not able to see any log messages in /var/log/kamailio.log. We have
done all kind of changes suggested on online blogs
Why does kamailio not have a pre-set configuration as it is mostly used as
sip proxy?
Manoj K. Gupta
Hello,
I propose to freeze the development of v5.0.0 on January 4, 2017.
Hopefully it is just in time for getting the frozen version in next
Debian stable.
Meanwhile, I hope we can get rid of mi code to have a proper fresh start
with cleaned up code in 5.0.0. The big code tree restructuring was
already done, config files in embedded languages is there as well (it
needs more exports, but that's only about available time to fill some
structures, not new feature development).
If anyone wants to make other proposals, reply to mailing lists and
let's discuss.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com