When I use get_body_part on a multipart body, it doesn't detect properly the ending of multipart headers:
For instance in:
```
--vvemeemm0wqr7ayc5h367f3v8e66mc9t
Content-Type: application/sdp
Content-Length: 479
v=0
o=- 3669362310 3669362310 IN IP4 192.168.2.4
[...]
```
"Content-Length: 479" is taken into get_body_part("application/sdp", "$var(sdp)");
I will try to provide more details later.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/564
## Environment
Kamailio 4.3.3
Ubuntu 14.04.1 x86_64
## Problem
I'm using `t_suspend()` and `t_continue()` for mobile push notification scenario. Before calling `t_suspend()` I set the `fr_timer` to 12 seconds and `t_on_failure()` to my custom failure route (e.g. `failure_route[MY_FAILURE_ROUTE]`). The scenario is fairly similar to [[SR-Users] Timeout after t_suspend and failure route][1], the only difference is I try to use `jsonrpc_notificaion()` to notify the user asynchronously in my custom failure route.
There are 2 different results depending on how it goes to the failure route:
1. Caller cancel the call before `fr_timer` expires
- `jsonrpc_notification` can successfully be called in failure route
2. The `fr_timer` did timeout after 12 seconds
- An error occurred while calling `jsonrpc_notification`:
- `jsonrpc_notification(): failed to write to io pipe: Bad file descriptor`
## Investigation
For the first case that perform normally, the IDs of Kamailio processes being used are the same for both **calling t_suspend()** and **entering failure route**, while in the second case the processes are different.
Following added some debug messages in Kamailio's `main.c` it showed that the process being used in the failure route of case 2 is `slow timer process`, and from `jsonrpc_mod.c`'s `child_init()` function, the rank of `slow timer process` is **-1** therefore it doesn't assign the `fd` to this process.
My workaround was just assigning the `fd` to each child during `child_init()` in `jsonrpc_mod.c` but that's definitely not a good way to go. I am appreciated if you can give me some advice to solve this problem correctly.
Cheers,
Ian
[1]: http://lists.sip-router.org/pipermail/sr-users/2015-March/087519.html
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/713
The sipcapture module works great when you send hepv3 packets over the UDP transport however if kamailio start listening those hepv3 packtes on TCP and sending those hepv3 on TCP it will concern about it.
**This is what Kamilio receives over TCP.**
> T 52.10.155.177:47283 -> 172.19.8.21:9060 [AP]
> HEP3.0...................
> .........
> ...........[.............
> W*y6...
> .
> ..h......
> .................OPTIONS sip:edge.rarevase.com;transport=tcp SIP/2.0.
> Via: SIP/2.0/TCP 172.19.16.130:53083;rport;branch=z9hG4bKPj66df463f-ca4b-4f98-ba17-722fe3fc4a92;alias.
> From: <sip:asterisk@172.19.16.130>;tag=86ebab1d-eb4e-4986-898d-c7392b6b747b.
> To: <sip:edge.rarevase.com>.
> Contact: <sip:asterisk@172.19.16.130:53083;transport=TCP>.
> Call-ID: ed24ab3c-4f42-4a9d-8e2d-9a3acd5b5b70.
> CSeq: 3809 OPTIONS.
> Max-Forwards: 70.
> User-Agent: Asterisk PBX 13.8.0.
> Content-Length: 0.
> .
>
> ##
> T 52.10.155.177:47283 -> 172.19.8.21:9060 [AP]
> HEP3.\...................
> .........
> ...................[.....
> W*y6...
> .
> ..|......
> .................SIP/2.0 200 OK.
> Via: SIP/2.0/TCP 172.19.16.130:53083;rport=53083;received=172.19.16.130;branch=z9hG4bKPj66df463f-ca4b-4f98-ba17-722fe3fc4a92;alias.
> From: <sip:asterisk@172.19.16.130>;tag=86ebab1d-eb4e-4986-898d-c7392b6b747b.
> To: <sip:edge.rarevase.com>;tag=24voZr.
> Call-ID: ed24ab3c-4f42-4a9d-8e2d-9a3acd5b5b70.
> CSeq: 3809 OPTIONS.
> Max-Forwards: 70.
> Content-Length: 0.
> Supported: path,gruu,outbound.
> Accept: */*.
> Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,INFO,UPDATE,SUBSCRIBE,NOTIFY,REFER,MESSAGE,REGISTER.
> .
>
**This are the logs on the Kamailio.**
`May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: INFO: <core> [parser/parse_fline.c:144]: parse_first_line(): ERROR:parse_first_line: method not followed by SP
May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: ERROR: <core> [parser/parse_fline.c:257]: parse_first_line(): parse_first_line: bad message (offset: 0)
May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: DEBUG: <core> [parser/msg_parser.c:604]: parse_msg(): parse_msg: invalid message
May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: ERROR: <core> [parser/msg_parser.c:690]: parse_msg(): ERROR: parse_msg: message=<HEP3#003<98>>
May 4 22:44:05 ip-172-19-8-21 /usr/sbin/kamailio[19285]: ERROR: <core> [receive.c:173]: receive_msg(): core parsing of SIP message failed (52.10.155.177:59607/2)`
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/599
The Vim plugin is very nice, and its use isn't restricted to machines where Kamailio is installed, as the config file can be edited via network (e.g.: using netrw plugin).
Currently the most common approach to retrieve a Vim plugin is to clone its GitHub repo and use some plugin manager, such as [pathogen](https://github.com/tpope/vim-pathogen).
But it clearly doesn't make sense to retrieve the complete Kamailio repo only to use the vim plugin; this probably caused the creation of [duplicates](https://github.com/eloycoto/vim-ser). I actually find that duplicate first, and then noticed on its README that there is an official (and newer) version here.
Do you find acceptable to move it to a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/763
hi,
in top level kamailio config file (kamailio.cfg) i have this defined
```
#!ifdef TRAFFIC_FILTER-ROLE
include_file "traffic-filter-role.cfg"
#!endif
...
####### Routing Logic ########
route
{
...
#!ifdef TRAFFIC_FILTER-ROLE
route(TRAFFIC_FILTER);
#!endif
...
}
```
and in "traffic-filter-role.cfg" i have
```
route[TRAFFIC_FILTER]
{
...
}
```
it seems that kamailio thinks that `TRAFFIC_FILTER-ROLE` and `TRAFFIC_FILTER` are the same.
```
0(8619) : <core> [cfg.y:3368]: yyerror_at(): parse error in config file traffic-filter-role.cfg, line 1, column 7: syntax error
0(8619) : <core> [cfg.y:3368]: yyerror_at(): parse error in config file traffic-filter-role.cfg, line 1, column 7: invalid route statement
0(8619) : <core> [cfg.y:3365]: yyerror_at(): parse error in config file traffic-filter-role.cfg, line 1, column 8-11:
ERROR: bad config file (3 errors)
0(8619) WARNING: <core> [ppcfg.c:221]: pp_ifdef_level_check(): different number of preprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1
```
if i change `TRAFFIC_FILTER-ROLE` to `TRAFFIC_FILTER_ROLE` then all is good.
is '-' character reserved in the syntax and kamailio assumes the string ended there ?
kamailio should either accept '-' has part of the defines or throw error when parsing the `TRAFFIC_FILTER-ROLE` and send something like 'invalid name in trydef' to the output
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/743
We are running Kamailio 4.4.2 as a sipcapture node and every now and then it crashes. This is what the backtrace says:
```
(gdb) bt
#0 get_str_fparam (dst=dst@entry=0x7ffe50aa0610, msg=msg@entry=0x7f105b8654b8, param=param@entry=0x1a) at sr_module.c:1650
#1 0x00007f1059213346 in w_report_capture (_m=0x7f105b8654b8, _table=0x7f105b8648b8 " \250q[\020\177", _corr=0x7f105b864938 "\230\237q[\020\177",
_data=0x1a <Address 0x1a out of bounds>) at sipcapture.c:1040
#2 0x000000000042b618 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b719640, msg=msg@entry=0x7f105b8654b8) at action.c:1060
#3 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=0x7f105b718530, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#4 0x000000000042bcf2 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b71a1e8, msg=msg@entry=0x7f105b8654b8) at action.c:1049
#5 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=0x7f105b71a1e8, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#6 0x000000000042bcf2 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b71a318, msg=msg@entry=0x7f105b8654b8) at action.c:1049
#7 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=0x7f105b71a318, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#8 0x000000000042bcf2 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b71a448, msg=msg@entry=0x7f105b8654b8) at action.c:1049
#9 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=0x7f105b71a448, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#10 0x000000000042bcf2 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b71a578, msg=msg@entry=0x7f105b8654b8) at action.c:1049
#11 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=0x7f105b71a578, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#12 0x000000000042bcf2 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b719888, msg=msg@entry=0x7f105b8654b8) at action.c:1049
#13 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=0x7f105b719888, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#14 0x000000000042bcf2 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b7199b8, msg=msg@entry=0x7f105b8654b8) at action.c:1049
#15 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=0x7f105b7199b8, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#16 0x000000000042bcf2 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b719ae8, msg=msg@entry=0x7f105b8654b8) at action.c:1049
#17 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=0x7f105b719ae8, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#18 0x000000000042bcf2 in do_action (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b719c18, msg=msg@entry=0x7f105b8654b8) at action.c:1049
#19 0x000000000042a10a in run_actions (h=h@entry=0x7ffe50aa3ab0, a=a@entry=0x7f105b6abc80, msg=msg@entry=0x7f105b8654b8) at action.c:1549
#20 0x00000000004375d0 in run_top_route (a=0x7f105b6abc80, msg=msg@entry=0x7f105b8654b8, c=c@entry=0x0) at action.c:1635
#21 0x0000000000504386 in receive_msg (
buf=buf@entry=0xa366b7 "PUBLISH sip:collector@109.68.96.98:5099 SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.178.32:5060;branch=z9hG4bK122ceb41cd4777873\r\nRoute: <sip:proxy.live.sipgate.de:5060;lr>\r\nMax-Forwards: 70\r\nFrom: \"2362760e6\" <"..., len=<optimized out>, len@entry=728, rcv_info=rcv_info@entry=0x7ffe50aa3e80) at receive.c:240
#22 0x00007f105920ce17 in parsing_hepv3_message (buf=<optimized out>, len=<optimized out>) at hep.c:498
#23 0x00007f105920e80d in hepv3_received (buf=<optimized out>, len=<optimized out>, ri=<optimized out>) at hep.c:230
#24 0x00000000005f6e17 in udp_rcv_loop () at udp_server.c:446
#25 0x00000000004b2625 in main_loop () at main.c:1600
#26 0x0000000000427e2b in main (argc=<optimized out>, argv=<optimized out>) at main.c:2616
(gdb)
```
Does anybody see anything already? We can provide more info if needed.
(And since it's the sipcapture module: @adubovikov)
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/723
Terminated all LM_-based statement messages with new line characters
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/758
-- Commit Summary --
* Code formatting changes.
* Terminate all LM_* statement messages with a new line.
-- File Changes --
M modules/sca/sca.c (567)
M modules/sca/sca.h (36)
M modules/sca/sca_appearance.c (2242)
M modules/sca/sca_appearance.h (187)
M modules/sca/sca_call_info.c (3555)
M modules/sca/sca_call_info.h (42)
M modules/sca/sca_common.h (7)
M modules/sca/sca_db.c (250)
M modules/sca/sca_db.h (71)
M modules/sca/sca_dialog.c (151)
M modules/sca/sca_dialog.h (18)
M modules/sca/sca_event.c (73)
M modules/sca/sca_event.h (16)
M modules/sca/sca_hash.c (450)
M modules/sca/sca_hash.h (78)
M modules/sca/sca_notify.c (597)
M modules/sca/sca_notify.h (6)
M modules/sca/sca_reply.c (54)
M modules/sca/sca_reply.h (2)
M modules/sca/sca_rpc.c (809)
M modules/sca/sca_rpc.h (44)
M modules/sca/sca_subscribe.c (2662)
M modules/sca/sca_subscribe.h (71)
M modules/sca/sca_util.c (718)
M modules/sca/sca_util.h (32)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/758.patchhttps://github.com/kamailio/kamailio/pull/758.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/758