[SR-Users] No music on hold with mohqueue

2017-10-23 Thread Fedor
I got in my kamailio.cfg:

loadmodule "mohqueue.so"

# --- music on hold moh 
modparam ("mohqueue", "db_url", "mysql://kamailio:PASSWORDHERE@localhost/
kamailio")
modparam ("mohqueue", "mohdir", "/etc/kamailio/moh")
modparam ("mohqueue", "moh_maxcalls", 3000)


Databases for mohqueue exist
rttproxy configured

fed@vps1:/etc/kamailio# ll /etc/kamailio/moh/
total 185424
drwxr-xr-x 2 kamailio kamailio4096 Oct  8 09:32 ./
drwxr-xr-x 3 root root4096 Oct  8 10:04 ../
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.0
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.1
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.10
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.11
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.12
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.13
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.14
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.15
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.16
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.17
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.18
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.19
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.2
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.20
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.3
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.4
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.5
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.6
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.7
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.8
-rw-r--r-- 1 kamailio kamailio 8627660 Oct  8 09:32 hold.9
-rw-r--r-- 1 kamailio kamailio 8627660 Jan  2  2017 hold.wav


rtpproxy configured, but no music on hold(srtp works fine)

Can anybody help me, please?
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Multi crashes in the same day

2017-10-23 Thread igor.potjevlesch
Hello Daniel,

 

Thank you for pinpoint.

Is this commit into branch 5 only?

 

Regards,

 

Igor.

 

De : Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Envoyé : mardi 3 octobre 2017 20:23
À : Kamailio (SER) - Users Mailing List ;
igor.potjevle...@gmail.com
Objet : Re: [SR-Users] Multi crashes in the same day

 

Hello,

likely you got hit by the issue fixed by:

  -
https://github.com/kamailio/kamailio/commit/25f2180999dafb807068313c4a329a16
3dd99f92

4.2 series is old and I expect this commit was not backported there.

Cheers,
Daniel

 

On 03.10.17 18:49, igor.potjevle...@gmail.com
  wrote:

Hello !

 

I have multi crashes on a Kamailio 4.2.8 instance.

Already 6 coredump today, same time with the same scenario. Below the output
of the last coredump:

 

(gdb) where

#0  0x003d6f6328a5 in raise () from /lib64/libc.so.6

#1  0x003d6f634085 in abort () from /lib64/libc.so.6

#2  0x0061aad2 in qm_debug_frag (qm=0x7f9a8a7aa010,
f=0x7f9a8aca5968) at mem/q_malloc.c:161

#3  0x0061bf1c in qm_malloc (qm=0x7f9a8a7aa010, size=24,
file=0x7131d0 ": re.c", func=0x71483e "subst_run", line=440) at
mem/q_malloc.c:388

#4  0x00505e2c in subst_run (se=0x7f9a8ac08b78, input=0x7f9a8aca5918
 "sip:0123456789@customer.local",
msg=0x7f9a8abfef38, count=0x0) at re.c:440

#5  0x00506fff in subst_str (input=0x7f9a8aca5918
 "sip:0123456789@customer.local",
msg=0x7f9a8abfef38, se=0x7f9a8ac08b78, count=0x0) at re.c:515

#6  0x7f9a87ff629d in subst_uri_f (msg=0x7f9a8abfef38,
subst=0x7f9a8ac08b78 "X\215\300\212\232\177", ignored=0x0) at textops.c:744

#7  0x0041d51b in do_action (h=0x7fffed0800d0, a=0x7f9a8ab64cc8,
msg=0x7f9a8abfef38) at action.c:1094

#8  0x00429ba3 in run_actions (h=0x7fffed0800d0, a=0x7f9a8ab64cc8,
msg=0x7f9a8abfef38) at action.c:1583

#9  0x0042a208 in run_actions_safe (h=0x7fffed081380,
a=0x7f9a8ab64cc8, msg=0x7f9a8abfef38) at action.c:1648

#10 0x00542994 in rval_get_int (h=0x7fffed081380,
msg=0x7f9a8abfef38, i=0x7fffed080890, rv=0x7f9a8ab64ef8, cache=0x0) at
rvalue.c:924

#11 0x00546bcc in rval_expr_eval_int (h=0x7fffed081380,
msg=0x7f9a8abfef38, res=0x7fffed080890, rve=0x7f9a8ab64ef0) at rvalue.c:1918

#12 0x0041cf77 in do_action (h=0x7fffed081380, a=0x7f9a8ab66a30,
msg=0x7f9a8abfef38) at action.c:1064

#13 0x00429ba3 in run_actions (h=0x7fffed081380, a=0x7f9a8ab66a30,
msg=0x7f9a8abfef38) at action.c:1583

#14 0x0041d3f6 in do_action (h=0x7fffed081380, a=0x7f9a8ab6b070,
msg=0x7f9a8abfef38) at action.c:1079

#15 0x00429ba3 in run_actions (h=0x7fffed081380, a=0x7f9a8ab607b8,
msg=0x7f9a8abfef38) at action.c:1583

#16 0x0042a2d0 in run_top_route (a=0x7f9a8ab607b8,
msg=0x7f9a8abfef38, c=0x7fffed081380) at action.c:1669

#17 0x7f9a891f6d0f in prepare_new_uac (t=0x7f9a6de86518,
i_req=0x7f9a8abfef38, branch=0, uri=0x7fffed0814d0, path=0x7fffed0814b0,
next_hop=0x7f9a8abff1a8, fsocket=0x0, 

snd_flags=..., fproto=0, flags=2, instance=0x7fffed0814a0,
ruid=0x7fffed081490, location_ua=0x7fffed081480) at t_fwd.c:410

#18 0x7f9a891faded in add_uac (t=0x7f9a6de86518, request=0x7f9a8abfef38,
uri=0x7f9a8abff1a8, next_hop=0x7f9a8abff1a8, path=0x7f9a8abff568, proxy=0x0,
fsocket=0x0, 

snd_flags=..., proto=0, flags=2, instance=0x7f9a8abff578,
ruid=0x7f9a8abff590, location_ua=0x7f9a8abff5a0) at t_fwd.c:855

#19 0x7f9a89201ddd in t_forward_nonack (t=0x7f9a6de86518,
p_msg=0x7f9a8abfef38, proxy=0x0, proto=0) at t_fwd.c:1723

#20 0x7f9a891ee374 in t_relay_to (p_msg=0x7f9a8abfef38, proxy=0x0,
proto=0, replicate=0) at t_funcs.c:355

#21 0x7f9a8922bd89 in _w_t_relay_to (p_msg=0x7f9a8abfef38, proxy=0x0,
force_proto=0) at tm.c:1517

#22 0x7f9a8922ceee in w_t_relay (p_msg=0x7f9a8abfef38, _foo=0x0,
_bar=0x0) at tm.c:1718

#23 0x0041d48d in do_action (h=0x7fffed082190, a=0x7f9a8a83e878,
msg=0x7f9a8abfef38) at action.c:1088

#24 0x00429ba3 in run_actions (h=0x7fffed082190, a=0x7f9a8a83e878,
msg=0x7f9a8abfef38) at action.c:1583

#25 0x0042a208 in run_actions_safe (h=0x7fffed0848f0,
a=0x7f9a8a83e878, msg=0x7f9a8abfef38) at action.c:1648

#26 0x00542994 in rval_get_int (h=0x7fffed0848f0,
msg=0x7f9a8abfef38, i=0x7fffed082668, rv=0x7f9a8a83eb60, cache=0x0) at
rvalue.c:924

#27 0x00546bcc in rval_expr_eval_int (h=0x7fffed0848f0,
msg=0x7f9a8abfef38, res=0x7fffed082668, rve=0x7f9a8a83eb58) at rvalue.c:1918

#28 0x00546fc2 in rval_expr_eval_int (h=0x7fffed0848f0,
msg=0x7f9a8abfef38, res=0x7fffed082af0, rve=0x7f9a8a83f280) at rvalue.c:1926

#29 0x0041cf77 in do_action (h=0x7fffed0848f0, a=0x7f9a8a83fbd0,
msg=0x7f9a8abfef38) at action.c:1064

#30 0x00429ba3 in run_actions (h=0x7fffed0848f0, a=0x7f9a8a838c88,
msg=0x7f9a8abfef38) at action.c:1583

#31 0x00419f13 in do_action (h=0x7fffed0848f0, 

Re: [SR-Users] [sr-dev] Planning Kamailio v5.0.4

2017-10-23 Thread M S
Hi,

There is a Kamailio sigfault issue #1277 that is also present in current
master branch. I would really appreciate if you can take a look at it
before next release, so i can upgrade my kamailio setup to v5.0 upon next
release.

Thank you.



On Mon, Oct 23, 2017 at 10:58 AM, Daniel-Constantin Mierla <
mico...@gmail.com> wrote:

> Hello,
>
> I am considering to release Kamailio v5.0.4 later this week, likely on
> Wednesday or Tuesday. If you are aware of any issue in branch 5.0 which
> is not yet reported on github.com/kamailio/kamailio issues tracker, then
> do it as soon as possible to have a chance to look at it.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
> ___
> Kamailio (SER) - Development Mailing List
> sr-...@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to check 4XX/5XX response in general.

2017-10-23 Thread Sebastian Damm
Hi,

you can use a regex match for that as well.

if ($rs =~ "^[45].*") {
# do something
}

HTH
Sebastian

On Mon, Oct 23, 2017 at 11:34 AM, vi...@advaitamtech.com
 wrote:
> Hi,
>
>
>
> Is there any way to catch all 4XX and 5XX SIP error codes rather then
> specifying individually ie. 404, 500, 400 etc in kamailio.
>
>
>
> Thanks,
>
> Vivek.
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] How to check 4XX/5XX response in general.

2017-10-23 Thread vi...@advaitamtech.com

Hi,
 
Is there any way to catch all 4XX and 5XX SIP error codes rather then 
specifying individually ie. 404, 500, 400 etc in kamailio.
 
Thanks,
Vivek.___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Planning Kamailio v5.0.4

2017-10-23 Thread Daniel-Constantin Mierla
Hello,

I am considering to release Kamailio v5.0.4 later this week, likely on
Wednesday or Tuesday. If you are aware of any issue in branch 5.0 which
is not yet reported on github.com/kamailio/kamailio issues tracker, then
do it as soon as possible to have a chance to look at it.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] shared dialogs

2017-10-23 Thread Charles Chance
Hello,

Just to note, I had been looking into a similar issue before going on
holiday. I believe it may be fixed but need to do some further testing
today/tomorrow before committing. The backtrace would still be useful to
know that your issue is the same thing.

Cheers,

Charles

On 23 Oct 2017 7:35 a.m., "Daniel-Constantin Mierla" 
wrote:

> Hello,
>
> can you grab and send the backtrace with gdb from corefile? The logs show
> that core was generated. While I don't use dmq that much, maybe it is
> something easy to fix.
> Cheers,
> Daniel
>
> On 18.10.17 22:58, : Paolo Visintin - Time-Net S.r.l. wrote:
>
> Hi Daniel,
> I have gone in deep and made more tests, the behaviour is this:
>
> kamailio.01 and kamailio.02 shares the same dialog database, for sync
> purpose.
> If call is handled by kamailio.01 I can see dialogs only in kamailio.01
> (kamcmd dlg.list)
> If call is handled by kamailio.01 and, in the meantime, I restart
> kamailio.02 I can see dialogs in both!
>
> So I suppose that there's a sync memory > DB and not a bi-directional
> sync. Only at startup kamailio fetch existing dialogs and store them in
> memory, right ?
>
> I tried another approach now, enabled DMQ sync with:
> modparam("dialog", "enable_dmq", 1)
> with separate port dedicated for DMQ messages
>
> Dialogs are synced, but when a call is hangupped kamailio crashes!
> 4(1570) INFO: tmx [t_var.c:527]: pv_get_tm_reply_code(): unsupported
> route_type 64 - code set to 0
> 22(1588) CRITICAL:  [core/pass_fd.c:277]: receive_fd(): EOF on 15
>  0(1549) ALERT:  [main.c:742]: handle_sigs(): child process 1570
> exited by a signal 11
>  0(1549) ALERT:  [main.c:745]: handle_sigs(): core was generated
>  0(1549) INFO:  [main.c:768]: handle_sigs(): terminating due to
> SIGCHLD
>  5(1571) INFO:  [main.c:823]: sig_usr(): signal 15 received
> ...
>  1(1567) INFO:  [main.c:823]: sig_usr(): signal 15 received
>  0(1549) CRITICAL:  [main.c:649]: sig_alarm_abort(): shutdown
> timeout triggered, dying
>
> My purpose is to share dialogs and usrloc data between kamailio instances
> (10 about) in order to manage shared dialogs.
>
> Cheers,
> Paolo
>
>
> 2017-10-18 18:06 GMT+02:00 Daniel-Constantin Mierla :
>
>> Hello,
>>
>> On 17.10.17 10:27, : Paolo Visintin - Time-Net S.r.l. wrote:
>>
>> Hi kamailio users,  I'm wondering if there's something already done with
>> shared dialog among more kamailio instances, in order to manage branches
>> initalized by another kamailio instance.
>>
>> ​A
>> ctually seems not possible (also with db mode) because kamailio is
>> looking into caller/callee_sock and if it's different does not manage
>>
>> in a "standard" failover environment (master / slave) with vIP and
>> keepalived and $fs = VIRTUAL_IP everything is working fine
>>
>> but in a distributed environment this could not happen as the relay is
>> managed by a kamailio proxy
>>
>>
>> I looked at the code and the dialog module just not sets the local socket
>> fields if there is no match, but loads them from db and all should be fine,
>> an existing socket will be used if there is a need to send BYE. What
>> exactly you encointered? There is a warning message when the local socket
>> is not matched, but it's about ignoring the socket field, not ignoring the
>> dialog from db.
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel-Constantin Mierlawww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
>> Kamailio World Conference - www.kamailioworld.com
>>
>>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Presence WARNING after publish and no NOTIFY

2017-10-23 Thread Yuriy Gorlichenko
Ok. So then this task should be closed. Thx fr reply)
Will do dialog state notification by other methods.

Is ther any plans to integrate sending pure text (not SIP) via websocket
proto to client?

2017-10-23 10:31 GMT+03:00 Daniel-Constantin Mierla :

> Hello,
>
> On 23.10.17 08:46, Yuriy Gorlichenko wrote:
>
> Hi
> Yes but i suppose the trouble in the
> pidf+xml (websockets based endpoint uses it meanwhile hardphones uses
> dialog-info+ xml
> As i understood it not accepts dialog states. Only presentity.
>
> am i right?
> If yes i will safe our time) if not, let me know - i will collect logs
> ASAP.
>
>
> Yes, dialog-info+xml is for dialog states and pidf+xml should be for user
> presence states, so they are different events and a publish for one will
> not trigger a notify for the other. It was more or less what I wanted to
> see in headers, if the subscribed events are the same, if expires values
> are ok, ...
>
> Cheers,
> Daniel
>
>
> On Oct 23, 2017 09:37, "Daniel-Constantin Mierla" 
> wrote:
>
>> Hello,
>>
>> can you grab the logs from kamailio as well as the sip traffic at the
>> same time? We need to see all the headers in these sip requests to be able
>> tot rack what operations have to be done.
>>
>> Cheers,
>> Daniel
>>
>> On 17.10.17 17:49, Yuriy Gorlichenko wrote:
>>
>> Hi use 5.0.1 with presence
>> for TCP/UDP endpoints presence works PERFECT
>> but for WS socket presence i see next (small cleaned log here with all
>> described  bellow https://pastebin.com/8a77ggj0 ):
>>
>> When WS endpoint subscribes - kamailio After kamailio sends 202 to
>> SUBSCRIBE message (see it on client) it sends fast NOTIFY correcly without
>> any trouble, and i see at the kamailio reply from WS endpoint - 200
>>
>> WS endpoint added to active_watchers table.
>>
>> But when Subscribed endpoint makes for example some call and presence
>> server sends PUBLISH i see:
>>
>> presence [presentity.c:426]: delete_presentity_if_dialog_id_exists():
>> Presentity already exists - deleting it
>>
>> At the logs and then presence server doesn't send NOTIFY to WS endpoint
>>
>> What is the issue of this? Can not understand why it happens. Can someone
>> to help me understand this?
>>
>> And the dump i see that kamailio send first NOTIFY form UDP port but then
>> translates it to tls for websocket and i see correct NOTIFY at the WS
>> endpoint
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlawww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
>> Kamailio World Conference - www.kamailioworld.com
>>
>>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Presence WARNING after publish and no NOTIFY

2017-10-23 Thread Daniel-Constantin Mierla
Hello,


On 23.10.17 08:46, Yuriy Gorlichenko wrote:
> Hi
> Yes but i suppose the trouble in the
> pidf+xml (websockets based endpoint uses it meanwhile hardphones uses
> dialog-info+ xml
> As i understood it not accepts dialog states. Only presentity.
>
> am i right? 
> If yes i will safe our time) if not, let me know - i will collect logs
> ASAP.

Yes, dialog-info+xml is for dialog states and pidf+xml should be for
user presence states, so they are different events and a publish for one
will not trigger a notify for the other. It was more or less what I
wanted to see in headers, if the subscribed events are the same, if
expires values are ok, ...

Cheers,
Daniel
>
> On Oct 23, 2017 09:37, "Daniel-Constantin Mierla"  > wrote:
>
> Hello,
>
> can you grab the logs from kamailio as well as the sip traffic at
> the same time? We need to see all the headers in these sip
> requests to be able tot rack what operations have to be done.
>
> Cheers,
> Daniel
>
>
> On 17.10.17 17:49, Yuriy Gorlichenko wrote:
>> Hi use 5.0.1 with presence
>> for TCP/UDP endpoints presence works PERFECT
>> but for WS socket presence i see next (small cleaned log here
>> with all described  bellow https://pastebin.com/8a77ggj0 ):
>>
>> When WS endpoint subscribes - kamailio After kamailio sends 202
>> to SUBSCRIBE message (see it on client) it sends fast NOTIFY
>> correcly without any trouble, and i see at the kamailio reply
>> from WS endpoint - 200
>>
>> WS endpoint added to active_watchers table.
>>
>> But when Subscribed endpoint makes for example some call and
>> presence server sends PUBLISH i see: 
>>
>> presence [presentity.c:426]:
>> delete_presentity_if_dialog_id_exists(): Presentity already
>> exists - deleting it
>>
>> At the logs and then presence server doesn't send NOTIFY to WS
>> endpoint
>>
>> What is the issue of this? Can not understand why it happens. Can
>> someone to help me understand this?
>>
>> And the dump i see that kamailio send first NOTIFY form UDP port
>> but then translates it to tls for websocket and i see correct
>> NOTIFY at the WS endpoint
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org 
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> 
>
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda  -- 
> www.linkedin.com/in/miconda 
> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com 
> 
> Kamailio World Conference - www.kamailioworld.com 
> 
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] MoS(QoS) measurement in Kamailio based IMS network

2017-10-23 Thread Daniel-Constantin Mierla
Hello,


On 11.10.17 01:53, Kranti Kumar wrote:
> Hi All,
>
> I am using Kamailio IMS VMimage which is provided by Franz. I am
> successfully established the call between the IMS clients.
>
> Here I would like to measure the MoS mean opnion score (QoS) of Calls
> (Voice quality). Can any one suggest me / guide me how to measure the
> same in this IMS network.
for voice you would need reports from rtpengine or rtpproxy, because
kamailio is not handling rtp (voice packets).

The see also ims_qos module, should be related in a way or another.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] how to bridge two landline users

2017-10-23 Thread Daniel-Constantin Mierla
Hello,


On 12.10.17 12:30, 赵国杰 wrote:
> Hello,
>     In a standard sip flow, the call goes like: sip user A -->
> kamailio --> pstn --> landline user B. However, when user A has a bad
> internet access, the audio is broken. So what I want is to let sip
> user A send a invite to kamailio first, then kamailio send invite to
> user A and B's landline number through pstn, then bridge the two call
> together. 
>     I understand this can be achieved by using FREESWITCH originate
> and bridge command. I've tried but there's no audio both ways, which
> really makes me feel stupid of myself. So I'm wondering if this can be
> done with kamailio? If so, how?
kamailio cannot bridge a call like freeswitch does, because kamailio
doesn't handle media stream.

The only option that you can do in kamailio to connect two phones is to
rely on REFER for doing a call transfer. See dialog module and dlg
bridge feature from there, maybe it is enough for what you want to achieve.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Testing for user=phone with siputils uri_param() doesn't work

2017-10-23 Thread Daniel-Constantin Mierla
Hello,


On 13.10.17 17:25, George Diamantopoulos wrote:
> Hello,
>
> In my script I've had to test for the user=phone parameter in URIs. I
> thought uri_param() from siputils would be handy for this operation on
> the RURI, so I did:
>
>     if ( !uri_param("user","phone") ) {
>     add_uri_param("user=phone");
>     }
>
> Unfortunately this wouldn't work (uri_param returns -1), and I end up
> with double user=phone params in the RURI.
>
> I was able to work around this by changing the test to:
>
>     if ( !($(ru{uri.uparam}) == "phone") ) {
>     add_uri_param("user=phone");
>     }
>
> But I wanted to ask if this is intentional or if I should file a bug
> or something. Thanks.
>
according to the docs, uri_param() should work for this case. Can you
paste the first line of the request that fails with uri_param() function
so I can look at the code and see if there is any issue there?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] uac_replace_from and header adulterations

2017-10-23 Thread Daniel-Constantin Mierla
Hello,


On 23.10.17 08:56, Alex Balashov wrote:
> Hi Daniel,
>
> On Mon, Oct 23, 2017 at 08:52:46AM +0200, Daniel-Constantin Mierla wrote:
>
>> what version of kamailio are you using in this case? Later versions of
>> kamailio should not set a broken header in that case (no header with
>> invalid chars). So the initial header is no longer stored, and you
>> don't get the bad request anymore.
> When was that change made? I am using some checkout of the 4.4 branch.
this commit in 4.4 branch: b38167923bd13abb6bbe4d58a57ed053faa5e68e

It ensures it doesn't get truncated or gets not printable chars inside it.

>> On the other hand, there is already an alternative mode to store the
>> initial values using dialog, see the parameters of uac module. This
>> should work at this moment for your situation.
> Thanks! I had forgot about that possibility.
>
Just for more clarification: if the UA is changing the URI in From/To
for requests within dialog, it makes it clear that it is not rfc2543
backward compatible, so having whatever uri value there should work.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] uac_replace_from and header adulterations

2017-10-23 Thread Daniel-Constantin Mierla
Hello,


On 13.10.17 21:53, Alex Balashov wrote:
> Hello,
>
> I've got a bizarre problem caused by bad UA behaviour:
>
>UA A ---> Kamailio (P) ---> UA B
>
> 1. UA A sends initial INVITE through P to B;
>
> 2. Kamailio (P) makes some modifications to the From header using
> uac_replace_from() and passes along to B.
>
> 3. B sends an in-dialog request (e.g. BYE or reinvite) to A through P;
> in doing so, it modifies the To (formerly From) value slightly,
> replacing the hostname portion in the To URI with a different value to
> the one that was received in the From header.
>
> 4. Kamailio relays this in-dialog request to A, but with an
> adulterated/clipped/truncated/grammatically invalid To header now.
>
> 5. A responds with 400 Bad Request due to invalid To header.
>
> I would not dispute that UA B should not be modifying the remote URI in
> this manner. But since it does, it gives rise to two questions:
>
> 1. Why does Kamailio not simply discard the modified To header and
> restore the original value stored in the Record-Route rider parameter?
>
> Is it because the Record-Route parameter does not contain the original
> header value, but rather some data complementary to the current header
> value? 
>
> Or is it because the UAC code takes a checksum of the original remote
> URI header value and stores it, and just checks it when restoring on
> principle? If so, what's the motive for that?
>
> 2. Wouldn't it be better behaviour to simply reject a request so
> malformed, rather than passing it on with a corrupt restored value? If
> Kamailio can detect that the header has been tampered with, why pass it
> on?
>
what version of kamailio are you using in this case? Later versions of
kamailio should not set a broken header in that case (no header with
invalid chars). So the initial header is no longer stored, and you don't
get the bad request anymore.

Anyhow, the implementation is not storing the initial value, but, iirc,
some XOR'ed value based on initial value, new value and a key. Maybe
this should be changed.

On the other hand, there is already an alternative mode to store the
initial values using dialog, see the parameters of uac module. This
should work at this moment for your situation.

Also, in many cases lately as devices are rfc3261 compliant I just
replace the headers for the initial request and for the requests within
dialog I do anonymous values, they should not be used for Caller ID and
dialog matching is done on tags (keeping the from/to uri unchanged is a
requirement to cope with rfc2543 devices).

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Presence WARNING after publish and no NOTIFY

2017-10-23 Thread Yuriy Gorlichenko
Hi
Yes but i suppose the trouble in the
pidf+xml (websockets based endpoint uses it meanwhile hardphones uses
dialog-info+ xml
As i understood it not accepts dialog states. Only presentity.

am i right?
If yes i will safe our time) if not, let me know - i will collect logs
ASAP.

On Oct 23, 2017 09:37, "Daniel-Constantin Mierla"  wrote:

> Hello,
>
> can you grab the logs from kamailio as well as the sip traffic at the same
> time? We need to see all the headers in these sip requests to be able tot
> rack what operations have to be done.
>
> Cheers,
> Daniel
>
> On 17.10.17 17:49, Yuriy Gorlichenko wrote:
>
> Hi use 5.0.1 with presence
> for TCP/UDP endpoints presence works PERFECT
> but for WS socket presence i see next (small cleaned log here with all
> described  bellow https://pastebin.com/8a77ggj0 ):
>
> When WS endpoint subscribes - kamailio After kamailio sends 202 to
> SUBSCRIBE message (see it on client) it sends fast NOTIFY correcly without
> any trouble, and i see at the kamailio reply from WS endpoint - 200
>
> WS endpoint added to active_watchers table.
>
> But when Subscribed endpoint makes for example some call and presence
> server sends PUBLISH i see:
>
> presence [presentity.c:426]: delete_presentity_if_dialog_id_exists():
> Presentity already exists - deleting it
>
> At the logs and then presence server doesn't send NOTIFY to WS endpoint
>
> What is the issue of this? Can not understand why it happens. Can someone
> to help me understand this?
>
> And the dump i see that kamailio send first NOTIFY form UDP port but then
> translates it to tls for websocket and i see correct NOTIFY at the WS
> endpoint
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Presence WARNING after publish and no NOTIFY

2017-10-23 Thread Daniel-Constantin Mierla
Hello,

can you grab the logs from kamailio as well as the sip traffic at the
same time? We need to see all the headers in these sip requests to be
able tot rack what operations have to be done.

Cheers,
Daniel


On 17.10.17 17:49, Yuriy Gorlichenko wrote:
> Hi use 5.0.1 with presence
> for TCP/UDP endpoints presence works PERFECT
> but for WS socket presence i see next (small cleaned log here with all
> described  bellow https://pastebin.com/8a77ggj0 ):
>
> When WS endpoint subscribes - kamailio After kamailio sends 202 to
> SUBSCRIBE message (see it on client) it sends fast NOTIFY correcly
> without any trouble, and i see at the kamailio reply from WS endpoint
> - 200
>
> WS endpoint added to active_watchers table.
>
> But when Subscribed endpoint makes for example some call and presence
> server sends PUBLISH i see: 
>
> presence [presentity.c:426]: delete_presentity_if_dialog_id_exists():
> Presentity already exists - deleting it
>
> At the logs and then presence server doesn't send NOTIFY to WS endpoint
>
> What is the issue of this? Can not understand why it happens. Can
> someone to help me understand this?
>
> And the dump i see that kamailio send first NOTIFY form UDP port but
> then translates it to tls for websocket and i see correct NOTIFY at
> the WS endpoint
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] shared dialogs

2017-10-23 Thread Daniel-Constantin Mierla
Hello,

can you grab and send the backtrace with gdb from corefile? The logs
show that core was generated. While I don't use dmq that much, maybe it
is something easy to fix.

Cheers,
Daniel

On 18.10.17 22:58, : Paolo Visintin - Time-Net S.r.l. wrote:
> Hi Daniel, 
> I have gone in deep and made more tests, the behaviour is this: 
>
> kamailio.01 and kamailio.02 shares the same dialog database, for sync
> purpose.
> If call is handled by kamailio.01 I can see dialogs only in
> kamailio.01 (kamcmd dlg.list)
> If call is handled by kamailio.01 and, in the meantime, I restart
> kamailio.02 I can see dialogs in both!
>
> So I suppose that there's a sync memory > DB and not a bi-directional
> sync. Only at startup kamailio fetch existing dialogs and store them
> in memory, right ?
>
> I tried another approach now, enabled DMQ sync with: 
> modparam("dialog", "enable_dmq", 1)
> with separate port dedicated for DMQ messages
>
> Dialogs are synced, but when a call is hangupped kamailio crashes! 
> 4(1570) INFO: tmx [t_var.c:527]: pv_get_tm_reply_code(): unsupported
> route_type 64 - code set to 0
> 22(1588) CRITICAL:  [core/pass_fd.c:277]: receive_fd(): EOF on 15
>  0(1549) ALERT:  [main.c:742]: handle_sigs(): child process 1570
> exited by a signal 11
>  0(1549) ALERT:  [main.c:745]: handle_sigs(): core was generated
>  0(1549) INFO:  [main.c:768]: handle_sigs(): terminating due to
> SIGCHLD
>  5(1571) INFO:  [main.c:823]: sig_usr(): signal 15 received
> ...
>  1(1567) INFO:  [main.c:823]: sig_usr(): signal 15 received
>  0(1549) CRITICAL:  [main.c:649]: sig_alarm_abort(): shutdown
> timeout triggered, dying
>
> My purpose is to share dialogs and usrloc data between kamailio
> instances (10 about) in order to manage shared dialogs.
>
> Cheers,
> Paolo
>
>
> 2017-10-18 18:06 GMT+02:00 Daniel-Constantin Mierla  >:
>
> Hello,
>
>
> On 17.10.17 10:27, : Paolo Visintin - Time-Net S.r.l. wrote:
>> Hi kamailio users,  I'm wondering if there's something already
>> done with shared dialog among more kamailio instances, in order
>> to manage branches initalized by another kamailio instance.
>>
>> ​A
>> ctually seems not possible (also with db mode) because kamailio
>> is looking into caller/callee_sock and if it's different does not
>> manage
>>
>> in a "standard" failover environment (master / slave) with vIP
>> and keepalived and $fs = VIRTUAL_IP everything is working fine
>>
>> but in a distributed environment this could not happen as the
>> relay is managed by a kamailio proxy
>>
>
> I looked at the code and the dialog module just not sets the local
> socket fields if there is no match, but loads them from db and all
> should be fine, an existing socket will be used if there is a need
> to send BYE. What exactly you encointered? There is a warning
> message when the local socket is not matched, but it's about
> ignoring the socket field, not ignoring the dialog from db.
>
> Cheers,
> Daniel
>
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda  -- 
> www.linkedin.com/in/miconda 
> Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com 
> 
> Kamailio World Conference - www.kamailioworld.com 
> 
>
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Help on Video Conference

2017-10-23 Thread Daniel-Constantin Mierla
Hello,

is imsdroid able to host a video conference itself? If not, you need a
mcu like freeswitch to host one.

Cheers,
Daniel


On 22.10.17 19:12, Kranti Kumar wrote:
> Hello ,
> I’m trying to build a testbed using the VMware image you kindly have
> shared here:
> https://www.kamailio.org/w/2016/02/kamailio-ims-getting-started-box/
>
> My configuration details:
> HSS - 10.0.0.9 (./hss.sh)
> PCSCF - 10.0.0.10 (kamailio -f /usr/local/etc/kamailio/kamailio-pcscf.cfg)
> ICSCF - 10.0.0.11(kamailio -f /usr/local/etc/kamailio/kamailio-icscf.cfg)
> SCSCF - 10.0.0.12 (kamailio -f /usr/local/etc/kamailio/kamailio-scscf.cfg)
> host machine: 10.0.0.5
>
> I am able to register mobile clients ( IMSdroid) and make voice/video
> calls between them successfully. Now I would like to make a conference
> call among 3 IMSdroid users but its failing.
> Could you please suggest me the way forward here. 
> I am thinking to integrate Application server (AS) to enable Video
> Conferences. Could you please guide me how to enable AS in this VM
> image and configuration details.
> Is there any possibility to do Video conference using this current
> setup(VM image). Could you please suggest me.
>
> Thank you so much in advance.
>
> Regards,
> -kranti
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users