Re: [SR-Users] Kamailio NAT AWS EC2

2018-03-27 Thread Benjamin Marty
Hi Arsen,

Thanks to clean up that understanding block :)

I still have a (little?) issue in my Installation. I installed the Kamailio
with standard configuration and enabled "WITH_NAT".

If I now register two clients (both Zoiper) they try to do the RTP P2P to
each other. But I want to process the RTP on the Server. What Parameter do
I have to change?

Thanks

Benjamin

2018-03-27 8:07 GMT+02:00 Arsen :

> Hi Benjamin,
>
> Yes, Kamailio is a SIP proxy and does not deal with RTP, so rptproxy is
> the tool to handle media traffic in your case.
> rtpproxy is not the only choice, you also can check rtpengine.
> https://github.com/sipwise/rtpengine
>
>
> Regards,
>
>
> Arsen Semionov
> www.eurolan.info
> cell: +442035198881 <+44%2020%203519%208881>
>
> On Tue, Mar 27, 2018 at 8:54 AM, Benjamin Marty 
> wrote:
>
>> Hi,
>>
>> I am new to Kamailio and coming a bit from the Asterisk side.
>>
>> My goal is to set up a bunch of users on a Kamailio Instance on AWS EC2 and 
>> get them able to call each other and talk to each other over the Internet 
>> without P2P media stream.
>>
>> Is rtpproxy the tool that enables that? As far my knowledge is right 
>> Kamailio isn't able to do any sort of RTP handling.
>>
>>
>> Regards,
>>
>> Benjamin
>>
>>
>> ___
>> 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
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] NOTIFY message without XML part

2018-03-27 Thread denislav . tsonev
Hello,

I use kamailio 5.1.1 with default configuration for PRESENCE:

Route:

#!ifdef WITH_PRESENCE
if (!t_newtran()) {
sl_reply_error();
exit;
}

if(is_method("PUBLISH")) {
handle_publish();
t_release();
} else if(is_method("SUBSCRIBE")) {
handle_subscribe();
t_release();
}
exit;
#!endif

and modparams:

#!ifdef WITH_PRESENCE
# - presence params -
modparam("presence", "db_url", DBURL)

# - presence_xml params -
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
#!endif

I use and GRANSTREAM phones.

When I make subscribe from soft sip client (Micro sip) to the 
grandstreams, all NOTIFY messages are without XML. 

Subscriptions between two soft sip clients like Zoiper and Micro SIP works 
perfectly. Is this related to GRANDSTREAM phones - configuration or so... 
or is necessary to modify kamailio configuration and if Yes, please 
provide some hitns how to change kamailio config?

Thanks in advance.

Best regards.


Denislav Raychev Tsonev  |  Integration and Infrastructure Engineer |  
Musala Soft JSC 
www.musala.com  |  t: +359 2 969 58 21   |  m: +359 878 270 965   |  f: 
+359 2 969 58 22 
World Trade Center, 36 Dragan Tsankov blvd., Sofia 1057, Bulgaria 







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


[SR-Users] Kamailio NAT AWS EC2

2018-03-27 Thread Ilie Soltanici
Hi,

First of all, check if SIP Traffic is going through your SIP Server, not
directly between Endpoints. To do this check if Record-route parameter is
set in configuration file:

record_route();


https://www.kamailio.org/docs/modules/5.1.x/modules/rr.html

Also, be sure that in SDP body you have External IP of your
Kamailio/RTPproxy. If Kamailio is behind NAT you may need to use
fix_nated_sdp function from nathelper module:

https://www.kamailio.org/docs/modules/5.1.x/modules/nathelper.html#nathelper.f.fix_nated_sdp

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


Re: [SR-Users] Kamailio NAT AWS EC2

2018-03-27 Thread Arsen
Since you are on Amazon AWS, make sure that you advertise the instance
public IP address in the listen parameter

listen=udp:private_ip:5060 advertise public_ip:5060

according to the default kamailio cfg rtpproxy will be applied if an INVITE
request passes nat_uac_test("19")
https://kamailio.org/docs/modules/5.1.x/modules/nathelper.html#nathelper.f.nat_uac_test

make sure that rtpproxy is installed and running, you also need to set
public IP address in the rtpproxy startup options.


Regards,



Arsen Semionov
www.eurolan.info
cell: +442035198881

On Tue, Mar 27, 2018 at 10:45 AM, Benjamin Marty 
wrote:

> Hi Arsen,
>
> Thanks to clean up that understanding block :)
>
> I still have a (little?) issue in my Installation. I installed the
> Kamailio with standard configuration and enabled "WITH_NAT".
>
> If I now register two clients (both Zoiper) they try to do the RTP P2P to
> each other. But I want to process the RTP on the Server. What Parameter do
> I have to change?
>
> Thanks
>
> Benjamin
>
> 2018-03-27 8:07 GMT+02:00 Arsen :
>
>> Hi Benjamin,
>>
>> Yes, Kamailio is a SIP proxy and does not deal with RTP, so rptproxy is
>> the tool to handle media traffic in your case.
>> rtpproxy is not the only choice, you also can check rtpengine.
>> https://github.com/sipwise/rtpengine
>>
>>
>> Regards,
>>
>>
>> Arsen Semionov
>> www.eurolan.info
>> cell: +442035198881 <+44%2020%203519%208881>
>>
>> On Tue, Mar 27, 2018 at 8:54 AM, Benjamin Marty > > wrote:
>>
>>> Hi,
>>>
>>> I am new to Kamailio and coming a bit from the Asterisk side.
>>>
>>> My goal is to set up a bunch of users on a Kamailio Instance on AWS EC2 and 
>>> get them able to call each other and talk to each other over the Internet 
>>> without P2P media stream.
>>>
>>> Is rtpproxy the tool that enables that? As far my knowledge is right 
>>> Kamailio isn't able to do any sort of RTP handling.
>>>
>>>
>>> Regards,
>>>
>>> Benjamin
>>>
>>>
>>> ___
>>> 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
>>
>>
>
> ___
> 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] topos_redis and session-timer timeouts

2018-03-27 Thread Daniel Tryba
I was testing topos with a mysql backend and all was fine. But since the
purpose of this machine doesn't require a complete mysqlserver I tried
the redis backend. With redis the calls will drop after some timeout
(somewhere < 450 seconds (session timer set to 900)).

Config:
# topos
modparam("ndb_redis", "server", "name=srv2;addr=127.0.0.1;port=6379;db=2")
modparam("topos", "storage", "redis")
modparam("topos_redis", "serverid", "srv2")

#modparam("topos", "storage", "db")
#modparam("topos", "db_url", DBURL)

modparam("topos", "mask_callid", 0)
modparam("topos", "sanity_checks", 0)
modparam("topos", "branch_expire", 180)
modparam("topos", "dialog_expire", 10800)
modparam("topos", "clean_interval", 60)

The call will end on the first session-time firing with a "404 Not here"

Debug contains:

Mar 27 12:20:56 kam kamailio[11649]: DEBUG: topos_redis 
[topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for 
[d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:20:56 kam kamailio[11649]: DEBUG: ndb_redis [redis_client.c:878]: 
redisc_exec_argv(): rsrv->ctxRedis = 0x55a7c8da8500
Mar 27 12:20:56 kam kamailio[11649]: DEBUG: topos_redis 
[topos_redis_storage.c:980]: tps_redis_load_dialog(): hmap with key 
[d:z:atpsh-5aba19b2-2d7f-2] not found


This records was inserted/updated:

Mar 27 12:17:10 kam kamailio[11647]: DEBUG: topos_redis 
[topos_redis_storage.c:253]: tps_redis_insert_dialog(): inserted dialog record 
for [d:z:atpsh-5aba19b2-2d7f-2] with argc 26
Mar 27 12:17:10 kam kamailio[11647]: DEBUG: topos_redis 
[topos_redis_storage.c:282]: tps_redis_insert_dialog(): expire set on dialog 
record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 3
Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis 
[topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for 
[d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis 
[topos_redis_storage.c:1293]: tps_redis_update_dialog(): updated dialog record 
for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis 
[topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for 
[d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis 
[topos_redis_storage.c:1293]: tps_redis_update_dialog(): updated dialog record 
for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis 
[topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for 
[d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis 
[topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record for 
[d:z:atpsh-5aba19b2-2d7f-2]
Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis 
[topos_redis_storage.c:1381]: tps_redis_end_dialog(): updated on end the dialog 
record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis 
[topos_redis_storage.c:1412]: tps_redis_end_dialog(): expire set on branch 
record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 3


It looks like the last update/expire sets the timeout to 180s, so the
not found is reasonably expected. But why is it that these records
aren't deleted in the mysql backend?

   00 00 03 04 00 06 00 00 00 00 00 00 00 00 08 00  
0010   45 00 00 6d 0a 52 40 00 40 06 32 37 7f 00 00 01  E..m.R@.@.27
0020   7f 00 00 01 b1 0c 18 eb c4 68 f0 3b 93 17 20 b0  .h.;.. .
0030   80 18 03 d6 fe 61 00 00 01 01 08 0a 00 08 50 67  .aPg
0040   00 08 50 67 2a 33 0d 0a 24 36 0d 0a 45 58 50 49  ..Pg*3..$6..EXPI
0050   52 45 0d 0a 24 32 35 0d 0a 64 3a 7a 3a 61 74 70  RE..$25..d:z:atp
0060   73 68 2d 35 61 62 61 31 39 62 32 2d 32 64 37 66  sh-5aba19b2-2d7f
0070   2d 32 0d 0a 24 33 0d 0a 31 38 30 0d 0a   -2..$3..180..

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


Re: [SR-Users] topos_redis and session-timer timeouts

2018-03-27 Thread Daniel Tryba
On Tue, Mar 27, 2018 at 01:23:40PM +0200, Daniel Tryba wrote:
> I was testing topos with a mysql backend and all was fine.

Forgot to mention it is version 5.1.2.

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


[SR-Users] Kamailio Call monitoring

2018-03-27 Thread Tomi Hakkarainen
Hi you all,
I have set up Kamailio and RTPProxy in front of Asterisk.
Currently successfully able to route calls from two differrent SIP-Trunk 
providers terminated to Kamailio and RTPProxy.
I would like to get a view of calls currently running through Kamailio?
I should be able to see some details about the call like the calling called 
numbers and the time call has been active.

I’m not sure if Siremis would provide such view. Also looked Homer and also not 
sure it has something like that. Still those provide much more like for 
troubleshooting. 

If anyone has idea how that would be possible to accomplish or know that there 
already is such implementation I would be interested.

Tomi


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


Re: [SR-Users] Kamailio Call monitoring

2018-03-27 Thread Alex Balashov
Your best bet is to use the dialog module and then interrogate the live
dialog list via the JSONRPC-S API.

On Tue, Mar 27, 2018 at 02:31:10PM +0300, Tomi Hakkarainen wrote:

> Hi you all,
> I have set up Kamailio and RTPProxy in front of Asterisk.
> Currently successfully able to route calls from two differrent SIP-Trunk 
> providers terminated to Kamailio and RTPProxy.
> I would like to get a view of calls currently running through Kamailio?
> I should be able to see some details about the call like the calling called 
> numbers and the time call has been active.
> 
> I’m not sure if Siremis would provide such view. Also looked Homer and also 
> not sure it has something like that. Still those provide much more like for 
> troubleshooting. 
> 
> If anyone has idea how that would be possible to accomplish or know that 
> there already is such implementation I would be interested.
> 
> Tomi
> 
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] Kamailio Call monitoring

2018-03-27 Thread Tomi Hakkarainen
Thanks Alex,

will look into those next !

Tomi

> On 27 Mar 2018, at 14.34, Alex Balashov  wrote:
> 
> Your best bet is to use the dialog module and then interrogate the live
> dialog list via the JSONRPC-S API.
> 
> On Tue, Mar 27, 2018 at 02:31:10PM +0300, Tomi Hakkarainen wrote:
> 
>> Hi you all,
>> I have set up Kamailio and RTPProxy in front of Asterisk.
>> Currently successfully able to route calls from two differrent SIP-Trunk 
>> providers terminated to Kamailio and RTPProxy.
>> I would like to get a view of calls currently running through Kamailio?
>> I should be able to see some details about the call like the calling called 
>> numbers and the time call has been active.
>> 
>> I’m not sure if Siremis would provide such view. Also looked Homer and also 
>> not sure it has something like that. Still those provide much more like for 
>> troubleshooting. 
>> 
>> If anyone has idea how that would be possible to accomplish or know that 
>> there already is such implementation I would be interested.
>> 
>> Tomi
>> 
>> 
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> 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] Kamailio send 2 Invite request for Client behind NAT

2018-03-27 Thread amit Kumar
Hi All,

Kamailio send 2 Invite request for Client behind NAT. due to this reason
for one request,Client respond with 486 Busy here. we only want to send 1
INVITE request.

Following are the AOR for client at kamailio.if field(ip port) in CONTACT
and RECEIVED differ then kamailio send 2 INVITE request. Please advice if
there is any way to send only ONE INVITE*.*

 AOR:: 123
Contact:: sip:123@*192.168.230.124:45672
* Q=1
Expires:: 894
Callid:: 003A8EC4-12351@192.168.230.124
Cseq:: 2
User-agent:: SIPPER for 3CX Phone
Received:: sip:*204.192.206.208
: 45672 *
State:: CS_NEW
Flags:: 0
Cflag:: 192
Socket:: udp:172.12.120.88:5060
Methods:: 4294967295
Ruid:: uloc-5aba112d-7fce-5
Reg-Id:: 0
Last-Keepalive:: 1522144583
Last-Modified:: 1522144583

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


Re: [SR-Users] Kamailio Call monitoring

2018-03-27 Thread Daniel Tryba
On Tue, Mar 27, 2018 at 02:31:10PM +0300, Tomi Hakkarainen wrote:
> I would like to get a view of calls currently running through Kamailio?
> I should be able to see some details about the call like the calling called 
> numbers and the time call has been active.
> 
> I???m not sure if Siremis would provide such view. Also looked Homer and also 
> not sure it has something like that. Still those provide much more like for 
> troubleshooting. 
> 
> If anyone has idea how that would be possible to accomplish or know that 
> there already is such implementation I would be interested.

You can use the dialog module to accomplish this. It stores the info you
are looking for (either in memory or in a database).


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


Re: [SR-Users] topos_redis and session-timer timeouts

2018-03-27 Thread Daniel Tryba
On Tue, Mar 27, 2018 at 01:23:40PM +0200, Daniel Tryba wrote:
> Mar 27 12:17:10 kam kamailio[11647]: DEBUG: topos_redis 
> [topos_redis_storage.c:253]: tps_redis_insert_dialog(): inserted dialog 
> record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 26
> Mar 27 12:17:10 kam kamailio[11647]: DEBUG: topos_redis 
> [topos_redis_storage.c:282]: tps_redis_insert_dialog(): expire set on dialog 
> record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 3
> Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis 
> [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record 
> for [d:z:atpsh-5aba19b2-2d7f-2]
> Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis 
> [topos_redis_storage.c:1293]: tps_redis_update_dialog(): updated dialog 
> record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
> Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis 
> [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record 
> for [d:z:atpsh-5aba19b2-2d7f-2]
> Mar 27 12:17:11 kam kamailio[11648]: DEBUG: topos_redis 
> [topos_redis_storage.c:1293]: tps_redis_update_dialog(): updated dialog 
> record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
> Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis 
> [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record 
> for [d:z:atpsh-5aba19b2-2d7f-2]
> Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis 
> [topos_redis_storage.c:962]: tps_redis_load_dialog(): loading dialog record 
> for [d:z:atpsh-5aba19b2-2d7f-2]
> Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis 
> [topos_redis_storage.c:1381]: tps_redis_end_dialog(): updated on end the 
> dialog record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 6
> Mar 27 12:17:11 kam kamailio[11650]: DEBUG: topos_redis 
> [topos_redis_storage.c:1412]: tps_redis_end_dialog(): expire set on branch 
> record for [d:z:atpsh-5aba19b2-2d7f-2] with argc 3


The last update to the dialog updates the key to expire in branch_expire
seconds (default 180), in topos_redis_storage.c tps_redis_end_dialog()
The timeout is set to
/* dialog ended -- keep it for branch lifetime only */
lval = (unsigned long)_tps_api.get_branch_expire();
if(lval==0) {
return 0;
}

I'm confused why:
-the dialog ended at the start of the call
-the dialog timeout isn't set to the dialog_expire value but to the 
branch_expire value


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


[SR-Users] kamailio 5.0.6 try to using dialog module - dont starts dialog counting

2018-03-27 Thread Karsten Horsmann
Hello,

i try to get dialog-infos to see how many calls are running on my kamailio.
But i can not figure out what steps are necessary to get this running.

loading the module and the dependencies - check.
set and dlg_flag via module param - check.

MUST i use a DB?! Or what is missing?


 kamctl stats | grep dialog
"dialog:active_dialogs = 0",
"dialog:early_dialogs = 0",
"dialog:expired_dialogs = 0",
"dialog:failed_dialogs = 0",
"dialog:processed_dialogs = 0",

the dialog snippets (grep out ouf my config):

#!define DLG_FLAG 8

loadmodule "dialog.so"
modparam("dialog", "dlg_flag", DLG_FLAG)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "rr_param", "did")
modparam("dialog", "profiles_with_value", "active_calls; inbound_calls;
outbound_calls")
modparam("dialog", "send_bye", 1)
modparam("dialog", "enable_stats", 1)
modparam("dialog", "dlg_extra_hdrs", "Hint: inactivity timeout\r\n") #
Added to requests generated locally by the module (e.g. BYE)
modparam("dialog", "track_cseq_updates", 1)


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


Re: [SR-Users] To tags in 407 challenges

2018-03-27 Thread Emmanuel BUU


Le 2018-03-26 à 22:49, Alex Balashov a écrit :

On Mon, Mar 26, 2018 at 10:27:35PM +0200, Henning Westerholt wrote:


I would think this is normal UAC/UAS behavior for SIP request handling:

RFC 3261, sect. 8.2.6.2:
"However, if the To
header field in the request did not contain a tag, the URI in the To
header field in the response MUST equal the URI in the To header
field; additionally, the UAS MUST add a tag to the To header field in
the response (with the exception of the 100 (Trying) response, in
which a tag MAY be present). This serves to identify the UAS that is
responding, possibly resulting in a component of a dialog ID. "

Honestly, in ten years of doing SIP, this is the first time I am
confronting this question. I was accustomed to the notion that To tags
are only added to a reply when it is desirable to form an early dialog
(in the case of a non-100 1xx reply). But the passage you quote seems to
settle it.

An additional question!
Does  second authenticated INVITE sent by UAC should also mention this 
to tag and the called UA should also accept it as part of the dialog id ?


Or does the second authenticated INVITE open a new dialog ?

Emmanuel

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


Re: [SR-Users] kamailio 5.0.6 try to using dialog module - dont starts dialog counting

2018-03-27 Thread Daniel Tryba
On Tue, Mar 27, 2018 at 03:27:27PM +0200, Karsten Horsmann wrote:
> loading the module and the dependencies - check.
> set and dlg_flag via module param - check.
> 
> MUST i use a DB?! Or what is missing?
> 
> 
>  kamctl stats | grep dialog
> "dialog:active_dialogs = 0",
> "dialog:early_dialogs = 0",
> "dialog:expired_dialogs = 0",
> "dialog:failed_dialogs = 0",
> "dialog:processed_dialogs = 0",
> 
> the dialog snippets (grep out ouf my config):
> 
> #!define DLG_FLAG 8
...
> modparam("dialog", "track_cseq_updates", 1)

You need to set a profile for the dialogs you want to register with
set_dlg_profile


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


Re: [SR-Users] kamailio 5.0.6 try to using dialog module - dont starts dialog counting

2018-03-27 Thread Karsten Horsmann
Hello Daniel,

yeap after a few moments later ;) i found this nice thread
https://lists.kamailio.org/pipermail/sr-users/2012-July/073919.html

and i must set "dlg_manage();" near the setflag(FLT_ACC) stuff and
modparam("dialog", "db_mode", 0)

so now it counts "dialogs" - and you are right, there are not attached to
any of my profiles at this moment.

Seems to be a "must have" the  modparam("dialog", "db_mode", WHATEVER)  - 0
in my case.

2018-03-27 15:49 GMT+02:00 Daniel Tryba :

> On Tue, Mar 27, 2018 at 03:27:27PM +0200, Karsten Horsmann wrote:
> > loading the module and the dependencies - check.
> > set and dlg_flag via module param - check.
> >
> > MUST i use a DB?! Or what is missing?
> >
> >
> >  kamctl stats | grep dialog
> > "dialog:active_dialogs = 0",
> > "dialog:early_dialogs = 0",
> > "dialog:expired_dialogs = 0",
> > "dialog:failed_dialogs = 0",
> > "dialog:processed_dialogs = 0",
> >
> > the dialog snippets (grep out ouf my config):
> >
> > #!define DLG_FLAG 8
> ...
> > modparam("dialog", "track_cseq_updates", 1)
>
> You need to set a profile for the dialogs you want to register with
> set_dlg_profile
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>



-- 
Mit freundlichen Grüßen
*Karsten Horsmann*
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Missing exit function on KEMI?

2018-03-27 Thread Enrico Bandiera
Hello, I'm trying to use the KSR.x.exit() function in a KEMI python script
but at runtime i get this error:

KSR.x.exit()
AttributeError: 'module' object has no attribute 'exit'

It seems that the exit function is missing even though it is documented.

My kamailio version is: kamailio 5.2.0-dev4 (x86_64/linux)  (it's a nightly)

Any idea on what I can do?

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


Re: [SR-Users] Terminate dialog from another dialog

2018-03-27 Thread Joel Serrano
Update:

I have been testing and I think the way to go is taking advantage of the
events generated by the dialog module (start/end/failed)...

I don't know if this is a bug, but shouldn't the $dlg(to_tag) be available
in the event_route[dialog:start] ??

I can access $dlg(callid), $dlg(from_tag) but not the $dlg(to_tag) and all
3 are needed to search and terminate an existing dialog. For now i'm using
$tt, but I'm wondering if this is correct or not? Let me know if I should
move this topic to github...

Thanks!
Joel.






On Sun, Mar 25, 2018 at 4:57 PM, Joel Serrano  wrote:

> Hi guys,
>
> I'm trying to set kamailio to not allow simultaneous calls from the same
> user, but if a second call comes in, the behavior desired is to process
> that second call and terminate the previous (already active) one.
>
> Say you have call A that creates dialog A.
>
> Then you have call B come in, creates dialog B.
>
> Can I save some info from dialog (call) A in a htable for example, then
> check that htable for the needed info from dialog (call) B and terminate
> dialog (call) A if it exists?
>
> I think using dlg_get() and dlg_bye() would do the trick but not 100% sure
> how they work..
>
>
> The example in the docs seems exactly the case:
>
> dlg_get --> "Search and set current dialog based on Call-ID, From-Tag and
> To-Tag parameters"
>
> if(dlg_get("abcdef", "123", "456"))
> {
> dlg_bye("all");
> }
>
> After the dlg_get() and dlg_bye() what happens to call B? Does the route
> continue running or does it end? Will it automatically switch back to the
> current dialog or do you have to manually switch back running dlg_get()
> again? (Sorry if I'm not explaining myself correctly, let me know if it
> sounds confusing)
>
> Does anyone have experience with these two functions?
>
>
> Thanks,
> Joel.
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Regular Expression Syntax

2018-03-27 Thread Duarte Rocha
Greetings,

I'm having some trouble with the syntax used in the {re.subst,expression}
method. What i want to do is add a prefix to a capture group.

I can make it work like that  /^[0-9]+/prefix$tU/ but this solution is far
from perfect since i may not need the entire $tU.

I would like to use it like this  /^[0-9]+/prefix\1/ in order to not limit
my regex to Kamailio only.  When i do it like this the regex result is only
"prefix".

What's the correct syntax to add a prefix using the capture group ?

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


Re: [SR-Users] Dispatcher Routing Failure

2018-03-27 Thread Daniel W. Graham
I'm seeing dispatcher:dst-down event route getting hit but no prior failed sip 
requests that I see in packet capture.

Any thoughts on what could be happing?

-dan

From: sr-users  On Behalf Of Daniel W. 
Graham
Sent: Friday, March 23, 2018 12:40 PM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] Dispatcher Routing Failure

What constitutes a 'failed request' in dispatcher module, in which a gateway is 
marked inactive?

>From documentation -
ds_ping_interval
With this parameter you can define the interval for sending a request to a 
gateway marked as inactive upon a failed request routing to it.

ds_probing_threshold
If you want to set a gateway into inactive mode, there can be a specific number 
of failed requests until it will change from "active" to "inactive".

Thanks,

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


Re: [SR-Users] kamailio 5.0.6 try to using dialog module - dont starts dialog counting

2018-03-27 Thread Tomi Hakkarainen
Hi Karsten,

Why is the dlg_flag set to 8
What is the purpose of that on the modparam?

I did not find from the documentation the meaning or did not understand :)

Tomi

> On 27 Mar 2018, at 17.10, Karsten Horsmann  wrote:
> 
> Hello Daniel,
> 
> yeap after a few moments later ;) i found this nice thread 
> https://lists.kamailio.org/pipermail/sr-users/2012-July/073919.html 
> 
> 
> and i must set "dlg_manage();" near the setflag(FLT_ACC) stuff and 
> modparam("dialog", "db_mode", 0)
> 
> so now it counts "dialogs" - and you are right, there are not attached to any 
> of my profiles at this moment.
> 
> Seems to be a "must have" the  modparam("dialog", "db_mode", WHATEVER)  - 0 
> in my case.
> 
> 2018-03-27 15:49 GMT+02:00 Daniel Tryba  >:
> On Tue, Mar 27, 2018 at 03:27:27PM +0200, Karsten Horsmann wrote:
> > loading the module and the dependencies - check.
> > set and dlg_flag via module param - check.
> >
> > MUST i use a DB?! Or what is missing?
> >
> >
> >  kamctl stats | grep dialog
> > "dialog:active_dialogs = 0",
> > "dialog:early_dialogs = 0",
> > "dialog:expired_dialogs = 0",
> > "dialog:failed_dialogs = 0",
> > "dialog:processed_dialogs = 0",
> >
> > the dialog snippets (grep out ouf my config):
> >
> > #!define DLG_FLAG 8
> ...
> > modparam("dialog", "track_cseq_updates", 1)
> 
> You need to set a profile for the dialogs you want to register with
> set_dlg_profile
> 
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org 
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
> 
> 
> 
> 
> -- 
> Mit freundlichen Grüßen
> *Karsten Horsmann*
> ___
> 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


Re: [SR-Users] Regular Expression Syntax

2018-03-27 Thread Daniel Tryba
On Tue, Mar 27, 2018 at 04:54:01PM +0100, Duarte Rocha wrote:
> I can make it work like that  /^[0-9]+/prefix$tU/ but this solution is far
> from perfect since i may not need the entire $tU.
> 
> I would like to use it like this  /^[0-9]+/prefix\1/ in order to not limit
> my regex to Kamailio only.  When i do it like this the regex result is only
> "prefix".
> 
> What's the correct syntax to add a prefix using the capture group ?

Kamailio is no different from any other regexp I ever used, an example
of how I normalize $fU (I'm not going to claim this the most efficient
example :)

$var(fU)=$fU;
$var(fU)=$(var(fU){re.subst,/^\+(.*)/00\1/});
$var(fU)=$(var(fU){re.subst,/^0([1-9].*)/0031\1/});
$var(fU)=$(var(fU){re.subst,/[^0-9]//});
$var(fU)=$(var(fU){re.subst,/^00(.*)/+\1/});


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


Re: [SR-Users] Dispatcher Routing Failure

2018-03-27 Thread Daniel W. Graham
Sorry, let me clarify my last statement -

I'm seeing dispatcher:dst-down event route getting hit even though all sip 
requests are answered by dispatcher destination. Those requests resulting in 
503 error (maybe others, not confirmed yet) appear to be triggering the 
dispatcher:dst-down event route.

So looking for the criteria that dispatcher module uses to determine a 'failed 
request'.

Any thoughts?

-dan

From: sr-users  On Behalf Of Daniel W. 
Graham
Sent: Tuesday, March 27, 2018 12:04 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Dispatcher Routing Failure

I'm seeing dispatcher:dst-down event route getting hit but no prior failed sip 
requests that I see in packet capture.

Any thoughts on what could be happing?

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Friday, March 23, 2018 12:40 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: [SR-Users] Dispatcher Routing Failure

What constitutes a 'failed request' in dispatcher module, in which a gateway is 
marked inactive?

>From documentation -
ds_ping_interval
With this parameter you can define the interval for sending a request to a 
gateway marked as inactive upon a failed request routing to it.

ds_probing_threshold
If you want to set a gateway into inactive mode, there can be a specific number 
of failed requests until it will change from "active" to "inactive".

Thanks,

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


Re: [SR-Users] Dispatcher Routing Failure

2018-03-27 Thread Daniel W. Graham
Enough time spent and was able to answer my question.

Failure_route controls the condition(s), however what I was not seeing was a 
500 response sent from another off network peer which was triggering the event 
route per the failure route config criteria.

-dan

From: sr-users  On Behalf Of Daniel W. 
Graham
Sent: Tuesday, March 27, 2018 12:15 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Dispatcher Routing Failure

Sorry, let me clarify my last statement -

I'm seeing dispatcher:dst-down event route getting hit even though all sip 
requests are answered by dispatcher destination. Those requests resulting in 
503 error (maybe others, not confirmed yet) appear to be triggering the 
dispatcher:dst-down event route.

So looking for the criteria that dispatcher module uses to determine a 'failed 
request'.

Any thoughts?

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Tuesday, March 27, 2018 12:04 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: [SR-Users] Dispatcher Routing Failure

I'm seeing dispatcher:dst-down event route getting hit but no prior failed sip 
requests that I see in packet capture.

Any thoughts on what could be happing?

-dan

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Daniel W. Graham
Sent: Friday, March 23, 2018 12:40 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: [SR-Users] Dispatcher Routing Failure

What constitutes a 'failed request' in dispatcher module, in which a gateway is 
marked inactive?

>From documentation -
ds_ping_interval
With this parameter you can define the interval for sending a request to a 
gateway marked as inactive upon a failed request routing to it.

ds_probing_threshold
If you want to set a gateway into inactive mode, there can be a specific number 
of failed requests until it will change from "active" to "inactive".

Thanks,

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


[SR-Users] Removing a cipher

2018-03-27 Thread Wilkins, Steve
Hello all,

I am using Kamailio 5 and am trying to remove the Diffie-Hellman ciphers but 
have had no luck.  I have researched it and have not seen any articles yet 
where anyone has had any luck.  I need to be able to connect from webrtc port 
443.  Has anyone had any luck with the cipher-list?

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


Re: [SR-Users] Dispatcher Routing Failure

2018-03-27 Thread David Villasmil
Take a look at

3.25. ds_ping_reply_codes(string)

This parameter defines the valid response codes, which are accepted as a
valid reply to the PING-Method. It is a list separated by colons, whery you
may define either a single code (e.g. "code=202" would accept 202 as an
additional, valid response) or a class of responses, you want to accept
(e.g. "class=2" would accept everything from 200 to 299 as valid response).
This parameter can be modified via ser config framework.
Default value is “” (only 200 OK is accepted).

Example 1.26. Set the “ds_ping_reply_codes” parameter

... modparam("dispatcher", "ds_ping_reply_codes",
"class=2;code=403;code=488;class=3") ...

Default i think is 500 but you might have some other codes enabled.

On Tue, Mar 27, 2018, 18:30 Daniel W. Graham  wrote:

> Enough time spent and was able to answer my question.
>
>
>
> Failure_route controls the condition(s), however what I was not seeing was
> a 500 response sent from another off network peer which was triggering the
> event route per the failure route config criteria.
>
>
>
> -dan
>
>
>
> *From:* sr-users  * On Behalf Of *Daniel
> W. Graham
>
> *Sent:* Tuesday, March 27, 2018 12:15 PM
>
>
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Dispatcher Routing Failure
>
>
>
> Sorry, let me clarify my last statement –
>
>
>
> I’m seeing dispatcher:dst-down event route getting hit even though all sip
> requests are answered by dispatcher destination. Those requests resulting
> in 503 error (maybe others, not confirmed yet) appear to be triggering the
> dispatcher:dst-down event route.
>
>
>
> So looking for the criteria that dispatcher module uses to determine a
> ‘failed request’.
>
>
>
> Any thoughts?
>
>
>
> -dan
>
>
>
> *From:* sr-users  *On Behalf Of *Daniel
> W. Graham
> *Sent:* Tuesday, March 27, 2018 12:04 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Dispatcher Routing Failure
>
>
>
> I’m seeing dispatcher:dst-down event route getting hit but no prior failed
> sip requests that I see in packet capture.
>
>
>
> Any thoughts on what could be happing?
>
>
>
> -dan
>
>
>
> *From:* sr-users  *On Behalf Of *Daniel
> W. Graham
> *Sent:* Friday, March 23, 2018 12:40 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* [SR-Users] Dispatcher Routing Failure
>
>
>
> What constitutes a ‘failed request’ in dispatcher module, in which a
> gateway is marked inactive?
>
>
>
> From documentation –
>
> ds_ping_interval
>
> With this parameter you can define the interval for sending a request to a
> gateway marked as inactive upon a *failed request routing to it*.
>
>
>
> ds_probing_threshold
>
> If you want to set a gateway into inactive mode, there can be a specific
> number of *failed requests* until it will change from "active" to
> "inactive".
>
>
>
> Thanks,
>
>
>
> -dan
> ___
> 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


Re: [SR-Users] Terminate dialog from another dialog

2018-03-27 Thread Joel Serrano
Update 2:

Unfortunately dlg_get() can't be used in event_route so I don't know how I
can use dlg_bye() on a different dialog (not the current one)  :(

This bit of code does the job, but I don't know if it's really messy:


...bcalls is the name of the htable, for each dialog I save the callid,
from_tag and to_tag (needed params for dialog termination)..


event_route[dialog:start] {
  if ($sht(bcalls=>$fU::callid) != $null) {
jsonrpc_exec('{"jsonrpc": "2.0","method": "dlg.terminate_dlg","params":
["$sht(bcalls=>$fU::callid)", "$sht(bcalls=>$fU::from_tag)",
"$sht(bcalls=>$fU::to_tag)"],"id": 1}');   < This is what I think is
messy...
xlog("L_NOTICE", "User check: Previous call terminated:
$jsonrpl(body)\n");
$sht(bcalls=>$fU::callid) = $dlg(callid);
$sht(bcalls=>$fU::from_tag) = $dlg(from_tag);
$sht(bcalls=>$fU::to_tag) = $tt;
xlog("L_NOTICE", "User check: Updated call-info for $fU in htable\n");
  } else {
$sht(bcalls=>$fU::callid) = $dlg(callid);
$sht(bcalls=>$fU::from_tag) = $dlg(from_tag);
$sht(bcalls=>$fU::to_tag) = $tt;
xlog("L_NOTICE", "User check: Added call-info for $fU to htable\n");
  }
}


Any comments???

On Tue, Mar 27, 2018 at 8:23 AM, Joel Serrano  wrote:

> Update:
>
> I have been testing and I think the way to go is taking advantage of the
> events generated by the dialog module (start/end/failed)...
>
> I don't know if this is a bug, but shouldn't the $dlg(to_tag) be available
> in the event_route[dialog:start] ??
>
> I can access $dlg(callid), $dlg(from_tag) but not the $dlg(to_tag) and all
> 3 are needed to search and terminate an existing dialog. For now i'm using
> $tt, but I'm wondering if this is correct or not? Let me know if I should
> move this topic to github...
>
> Thanks!
> Joel.
>
>
>
>
>
>
> On Sun, Mar 25, 2018 at 4:57 PM, Joel Serrano  wrote:
>
>> Hi guys,
>>
>> I'm trying to set kamailio to not allow simultaneous calls from the same
>> user, but if a second call comes in, the behavior desired is to process
>> that second call and terminate the previous (already active) one.
>>
>> Say you have call A that creates dialog A.
>>
>> Then you have call B come in, creates dialog B.
>>
>> Can I save some info from dialog (call) A in a htable for example, then
>> check that htable for the needed info from dialog (call) B and terminate
>> dialog (call) A if it exists?
>>
>> I think using dlg_get() and dlg_bye() would do the trick but not 100%
>> sure how they work..
>>
>>
>> The example in the docs seems exactly the case:
>>
>> dlg_get --> "Search and set current dialog based on Call-ID, From-Tag
>> and To-Tag parameters"
>>
>> if(dlg_get("abcdef", "123", "456"))
>> {
>> dlg_bye("all");
>> }
>>
>> After the dlg_get() and dlg_bye() what happens to call B? Does the route
>> continue running or does it end? Will it automatically switch back to the
>> current dialog or do you have to manually switch back running dlg_get()
>> again? (Sorry if I'm not explaining myself correctly, let me know if it
>> sounds confusing)
>>
>> Does anyone have experience with these two functions?
>>
>>
>> Thanks,
>> Joel.
>>
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio with media server

2018-03-27 Thread Atux Atux
Any suggestions, please? At least how do i register to a sip trunk and
route the DIDs to extensions?

On Tue, Mar 27, 2018 at 9:03 AM, Atux Atux  wrote:

> Hi. At the moment i am trying to learn Kamailio and it is in a test lab
> only. My intention is to move my PBX to Kamailio if possible and have:
> -a connection with the carriers (SIP)
> -Registration of the extensions (users)
> -Route DIDs between the carriers and the extensions
> -Offers PBX services (voicemails, announcements to the extensions)
> -have as less hardware implication as possible. If possible have
> everything in a single machine/vm
>
>
> On Mon, Mar 26, 2018 at 11:40 PM, Mack Hendricks  wrote:
>
>> Hey Atux,
>>
>> Can you give a little more detail on your use case?  Are you looking for
>> Kamailio to:
>>
>> - route requests to a media server for playing announcements
>> - proxy requests between your endpoints and your media server(s)
>> - distribute calls to your carriers based on some logic
>>
>> The answer may be all three - this will help us point you in the right
>> direction.
>>
>> *Mack Hendricks / Head of Support / dOpenSource*
>> web: http://dopensource.com
>> support: +888-907-2085
>> dSIPRouter  - GUI focused on implementing
>> Kamailio to provide SIP Trunking and PBX Hosting Services
>>
>> On Mar 26, 2018, at 9:45 AM, Atux Atux  wrote:
>>
>> Hi. New to the area of Kamailio.
>> i am did install in debian kamailio with rtpproxy and i have created 3
>> users 1000-10002 (one for each jitsi user) they talk nice between them.
>> I have followed this tutorial http://kb.asipto.com/kamailio:
>> skype-like-service-in-less-than-one-hour and in less than 5 minutes i
>> had my accounts registered.
>> i would like to have a media server so the users could hears
>> announcements and stuff. At the end i would like to have kamailio as a test
>> lab PBX where i could connect my SIP trunk providers and my users to route
>> calls.
>>
>>
>> Is there any guide on how to setup a media server and the services,
>> please?
>>
>> ___
>> 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
>>
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio with media server

2018-03-27 Thread Michael Young
Atux,

 

Kamailio is not a PBX and will not replace your PBX. It can do some of the 
things you might expect from a PBX, but what you really want is Kamailio and a 
PBX integrated together. You may wish to review a presentation such as this 
one: 

 

https://www.slideshare.net/fredposner/using-asterisk-and-kamailio-for-reliable-scalable-and-secure-communication-solutions
 

 

or a how-to such as this one: 

 

http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb

 

Michael

 

From: sr-users  On Behalf Of Atux Atux
Sent: Tuesday, March 27, 2018 12:16 PM
To: Mack Hendricks ; Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] kamailio with media server

 

Any suggestions, please? At least how do i register to a sip trunk and route 
the DIDs to extensions?

 

On Tue, Mar 27, 2018 at 9:03 AM, Atux Atux mailto:atuxn...@gmail.com> > wrote:

Hi. At the moment i am trying to learn Kamailio and it is in a test lab only. 
My intention is to move my PBX to Kamailio if possible and have:

-a connection with the carriers (SIP)

-Registration of the extensions (users)

-Route DIDs between the carriers and the extensions

-Offers PBX services (voicemails, announcements to the extensions) 

-have as less hardware implication as possible. If possible have everything in 
a single machine/vm

 

 

On Mon, Mar 26, 2018 at 11:40 PM, Mack Hendricks mailto:a...@goflyball.com> > wrote:

Hey Atux,

 

Can you give a little more detail on your use case?  Are you looking for 
Kamailio to:

 

- route requests to a media server for playing announcements 

- proxy requests between your endpoints and your media server(s)

- distribute calls to your carriers based on some logic

 

The answer may be all three - this will help us point you in the right 
direction.

 

Mack Hendricks / Head of Support / dOpenSource

web: http://dopensource.com

support: +888-907-2085

dSIPRouter   - GUI focused on implementing Kamailio to 
provide SIP Trunking and PBX Hosting Services





On Mar 26, 2018, at 9:45 AM, Atux Atux mailto:atuxn...@gmail.com> > wrote:

 

Hi. New to the area of Kamailio.

i am did install in debian kamailio with rtpproxy and i have created 3 users 
1000-10002 (one for each jitsi user) they talk nice between them.

I have followed this tutorial 
http://kb.asipto.com/kamailio:skype-like-service-in-less-than-one-hour and in 
less than 5 minutes i had my accounts registered.

i would like to have a media server so the users could hears announcements and 
stuff. At the end i would like to have kamailio as a test lab PBX where i could 
connect my SIP trunk providers and my users to route calls.



Is there any guide on how to setup a media server and the services, please?

___
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

 

 

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


Re: [SR-Users] To tags in 407 challenges

2018-03-27 Thread Henning Westerholt
Am Dienstag, 27. März 2018, 15:30:01 CEST schrieb Emmanuel BUU:
> [..]
> > Honestly, in ten years of doing SIP, this is the first time I am
> > confronting this question. I was accustomed to the notion that To tags
> > are only added to a reply when it is desirable to form an early dialog
> > (in the case of a non-100 1xx reply). But the passage you quote seems to
> > settle it.
> 
> An additional question!
> Does  second authenticated INVITE sent by UAC should also mention this
> to tag and the called UA should also accept it as part of the dialog id ?
> 
> Or does the second authenticated INVITE open a new dialog ?

Hello Emmanuel,

the first dialog is created at the second successful INVITE. The second INVITE 
is just a re-send of the first INVITE with the authentication credentials. To 
quote from RFC 3261, section 12.1:


Creation of a Dialog
Dialogs are created through the generation of non-failure responses
to requests with specific methods.  Within this specification, only
2xx and 101-199 responses with a To tag, where the request was
INVITE, will establish a dialog.  A dialog established by a non-final
response to a request is in the "early" state and it is called an
early dialog.


You will find a good example for a sessions establishment including 
authentication and two proxies in RFC 3665, section 3.2.

Best regards,

Henning

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


Re: [SR-Users] kamailio 5.0.6 try to using dialog module - dont starts dialog counting

2018-03-27 Thread Henning Westerholt
Am Dienstag, 27. März 2018, 18:05:25 CEST schrieb Tomi Hakkarainen:
> Why is the dlg_flag set to 8
> What is the purpose of that on the modparam?
> 
> I did not find from the documentation the meaning or did not understand :)

Hello Tomi,

there are two ways of actually tell the dialog module to track a certain 
dialog:

1. call dlg_manage() in cfg
2. set the dlg_flag with setflag() in the cfg before transaction creation

For compatibility reasons you need to set the dlg_flag currently, even if you 
don't use it and only use dlg_manage().

Best regards,

Henning

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


Re: [SR-Users] Terminate dialog from another dialog

2018-03-27 Thread Henning Westerholt
Am Montag, 26. März 2018, 01:57:31 CEST schrieb Joel Serrano:
> I'm trying to set kamailio to not allow simultaneous calls from the same
> user, but if a second call comes in, the behavior desired is to process
> that second call and terminate the previous (already active) one.
> 
> Say you have call A that creates dialog A.
> 
> Then you have call B come in, creates dialog B.
> 
> Can I save some info from dialog (call) A in a htable for example, then
> check that htable for the needed info from dialog (call) B and terminate
> dialog (call) A if it exists?
> 
> I think using dlg_get() and dlg_bye() would do the trick but not 100% sure
> how they work..
> 
> 
> The example in the docs seems exactly the case:
> 
> dlg_get --> "Search and set current dialog based on Call-ID, From-Tag and
> To-Tag parameters"
> 
> if(dlg_get("abcdef", "123", "456"))
> {
> dlg_bye("all");
> }
> 
> After the dlg_get() and dlg_bye() what happens to call B? Does the route
> continue running or does it end? Will it automatically switch back to the
> current dialog or do you have to manually switch back running dlg_get()
> again? (Sorry if I'm not explaining myself correctly, let me know if it
> sounds confusing)

Hello Joel,

you coult track the number of current dialogs per user with the dialog 
profiles function.

Have a look to the set_dlg_profile and get_profile_size function in the 
module. Its also explained generally in the top of the module docs. You could 
store the dialog information for the termination also in a htable, as you 
already mentioned. Then call dlg_bye() for the first call.

If you would reverse your logic, like not allowing the second call setup if 
there is already one call, it would be much easier only with the two dialog 
functions mentioned above.

Best regards,

Henning

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


Re: [SR-Users] kamailio 5.0.6 try to using dialog module - dont starts dialog counting

2018-03-27 Thread Tomi Hakkarainen
Thank you Henning

I think it is clear to me now.

Tomi

> On 27 Mar 2018, at 22.33, Henning Westerholt  wrote:
> 
> Am Dienstag, 27. März 2018, 18:05:25 CEST schrieb Tomi Hakkarainen:
>> Why is the dlg_flag set to 8
>> What is the purpose of that on the modparam?
>> 
>> I did not find from the documentation the meaning or did not understand :)
> 
> Hello Tomi,
> 
> there are two ways of actually tell the dialog module to track a certain 
> dialog:
> 
> 1. call dlg_manage() in cfg
> 2. set the dlg_flag with setflag() in the cfg before transaction creation
> 
> For compatibility reasons you need to set the dlg_flag currently, even if you 
> don't use it and only use dlg_manage().
> 
> Best regards,
> 
> Henning


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


Re: [SR-Users] Terminate dialog from another dialog

2018-03-27 Thread Joel Serrano
Hi Henning,

On Tue, Mar 27, 2018 at 12:50 PM, Henning Westerholt  wrote:
>
> Am Montag, 26. März 2018, 01:57:31 CEST schrieb Joel Serrano:
> > I'm trying to set kamailio to not allow simultaneous calls from the same
> > user, but if a second call comes in, the behavior desired is to process
> > that second call and terminate the previous (already active) one.
> >
> > Say you have call A that creates dialog A.
> >
> > Then you have call B come in, creates dialog B.
> >
> > Can I save some info from dialog (call) A in a htable for example, then
> > check that htable for the needed info from dialog (call) B and terminate
> > dialog (call) A if it exists?
> >
> > I think using dlg_get() and dlg_bye() would do the trick but not 100% sure
> > how they work..
> >
> >
> > The example in the docs seems exactly the case:
> >
> > dlg_get --> "Search and set current dialog based on Call-ID, From-Tag and
> > To-Tag parameters"
> >
> > if(dlg_get("abcdef", "123", "456"))
> > {
> > dlg_bye("all");
> > }
> >
> > After the dlg_get() and dlg_bye() what happens to call B? Does the route
> > continue running or does it end? Will it automatically switch back to the
> > current dialog or do you have to manually switch back running dlg_get()
> > again? (Sorry if I'm not explaining myself correctly, let me know if it
> > sounds confusing)
>
> Hello Joel,
>
> you coult track the number of current dialogs per user with the dialog
> profiles function.
>
> Have a look to the set_dlg_profile and get_profile_size function in the
> module. Its also explained generally in the top of the module docs. You could
> store the dialog information for the termination also in a htable, as you
> already mentioned. Then call dlg_bye() for the first call.

Problem is I need to allow current call, and hangup earlier one. This
is because of the design, the users are joining conferences really,
not placing calls, so it makes more sense like this:

- User-A joins conference-A from device-A
- User-A joins conference-B from device-B
- Kamailio must allow User-A on conf-B and terminate dialog of User-A on conf-A.

>
> If you would reverse your logic, like not allowing the second call setup if
> there is already one call, it would be much easier only with the two dialog
> functions mentioned above.
>
> Best regards,
>
> Henning

I ended up using the RPC command dlg.end_dlg instead of the
dlg.terminate_dlg as I can add an extra param "custom headers" which
is useful.

In case anyone else is curious (NOTE: Read my Update and Update2
emails in this thread to better understand where this piece of code
comes from):

event_route[dialog:start] {

...
if ($sht(bcalls=>$fU::callid) != $null) {
jsonrpc_exec('{"jsonrpc": "2.0","method":
"dlg.end_dlg","params": [$sht(bcalls=>$fU::h_entry),
$sht(bcalls=>$fU::h_id), "X-Reason: MAX_ACTIVE_CHANNELS\r\n"],"id":
1}');
if ($jsonrpl(code)==200) {
xlog("L_INFO", "User check: previous active
call terminated, current call added to cache - M=$rm R=$ru ID=$ci\n");
} else {
xlog("L_INFO", "User check: couldn't terminate
previous call, updated cache with current call - M=$rm R=$ru
ID=$ci\n");
}
} else {
xlog("L_INFO", "User check: Call OK, added to cache -
M=$rm R=$ru ID=$ci\n");
}
$sht(bcalls=>$fU::h_id) = $dlg(h_id);
$sht(bcalls=>$fU::h_entry) = $dlg(h_entry);
$sht(bcalls=>$fU::callid) = $dlg(callid);
...

}


The part I still don't like is the jsonrpc_exec(), but I don't know
other ways of doing it, and I don't know really if there is a
performance hit doing it like this rather than using some function,
for now, it's working ;)


Cheers,
Joel.

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


[SR-Users] kamailio & vmware

2018-03-27 Thread Jean Cérien
Hello
We are running a kamailio 5.0 on a VMWARE / VSPHERE 6.0 vm, with a couple
of asterisk running on 2 physical hosts.

Audio goes straight to the asterisk, no rtpengine / rtpproxy. I actually
have no audio issues, but communication between the asterisk & kamailio for
sip sometime fails - I get a few 408. I cant tell if this is network
related or virtualisation related.

Anyone has advice on kamailio on a VM, when it only handles sip  ?

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


Re: [SR-Users] kamailio & vmware

2018-03-27 Thread Alberto Llamas
Hi Jean,

It might be something else. We do have an entire virtualized environment on
Vmware with Asterisk, kamailios and another VoIP component without any
issue with thousands of customers using it.


Regards,

On Tue, Mar 27, 2018 at 4:48 PM, Jean Cérien  wrote:

>
> Hello
> We are running a kamailio 5.0 on a VMWARE / VSPHERE 6.0 vm, with a couple
> of asterisk running on 2 physical hosts.
>
> Audio goes straight to the asterisk, no rtpengine / rtpproxy. I actually
> have no audio issues, but communication between the asterisk & kamailio for
> sip sometime fails - I get a few 408. I cant tell if this is network
> related or virtualisation related.
>
> Anyone has advice on kamailio on a VM, when it only handles sip  ?
>
> Rgds
> J.
>
>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Alberto Llamas
Telecommunications Engineer
dCAP | KPAC | SSCA



*"Internet is all about share"*
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio & vmware

2018-03-27 Thread Fred Posner

On 3/27/18 5:48 PM, Jean Cérien wrote:


Hello
We are running a kamailio 5.0 on a VMWARE / VSPHERE 6.0 vm, with a 
couple of asterisk running on 2 physical hosts.


Audio goes straight to the asterisk, no rtpengine / rtpproxy. I actually 
have no audio issues, but communication between the asterisk & kamailio 
for sip sometime fails - I get a few 408. I cant tell if this is network 
related or virtualisation related.


Anyone has advice on kamailio on a VM, when it only handles sip  ?

Rgds
J.

ESX/VMware has been great for me with kamailio, even with RTP and high 
volume.


--fred

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


Re: [SR-Users] kamailio & vmware

2018-03-27 Thread Jean Cérien
Many thanks for this quick feedback. Is that your own hardware, or
something hosted ?

J.

On Tue, Mar 27, 2018 at 6:06 PM, Fred Posner  wrote:

> On 3/27/18 5:48 PM, Jean Cérien wrote:
>
>>
>> Hello
>> We are running a kamailio 5.0 on a VMWARE / VSPHERE 6.0 vm, with a couple
>> of asterisk running on 2 physical hosts.
>>
>> Audio goes straight to the asterisk, no rtpengine / rtpproxy. I actually
>> have no audio issues, but communication between the asterisk & kamailio for
>> sip sometime fails - I get a few 408. I cant tell if this is network
>> related or virtualisation related.
>>
>> Anyone has advice on kamailio on a VM, when it only handles sip  ?
>>
>> Rgds
>> J.
>>
>> ESX/VMware has been great for me with kamailio, even with RTP and high
> volume.
>
> --fred
>
>
> ___
> 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


Re: [SR-Users] Bug in evrexec module?

2018-03-27 Thread Skip Morse
Hi Daniel,

Thanks for the quick response. I've tested a build with the latest 5.1 and that 
works. I'll test and use the workaround until a new rpm version comes out.

Thanks!
-Skip

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, March 23, 2018 12:52 AM
To: Kamailio (SER) - Users Mailing List ; Skip 
Morse 
Subject: Re: [SR-Users] Bug in evrexec module?


Hello,

can you try with the latest git branch 5.1? I just pushed a patch to fix it, a 
wrong function was used to search the route block for the stage of modparam 
evaluation.

An workaround could be putting the modparam after the definition of 
event_route, but with the pushed patch, it is not needed.

Cheers,
Daniel

On 22.03.18 21:54, Skip Morse wrote:

Hi all, anyone try the evrexec module yet? When I try, Kamailio fails to start 
and I'm getting an error that it can't find the event route I'm specifying in 
the modparam, but I started with trying the example from the docs. I think it 
might be a bug
https://www.kamailio.org/docs/modules/5.1.x/modules/evrexec.html

Here's what I tried:
modparam("evrexec", "exec", "name=evrexec:timer;wait=1000;workers=1;")

event_route[evrexec:timer] {
  $var(x) = 0;
  while(1) {
xlog("$$var(x) is $var(x)\n");
$var(x) = $var(x) + 1;
sleep("600");
  }
}

Here's the log:
0(1765) ERROR: evrexec [evrexec_mod.c:232]: evrexec_param(): event route not 
found: evrexec:timer
0(1765) CRITICAL:  [core/cfg.y:3450]: yyerror_at(): parse error in config 
file /etc/kamailio/kamailio.cfg, line 136, column 70: Can't set module parameter
ERROR: bad config file (1 errors)

Version info:
kamailio -V
version: kamailio 5.1.2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, 
USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, 
TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, 
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 06:41:34 Mar  9 2018 with gcc 4.8.5

Thoughts?
Thanks,
-Skip




___

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 - April 16-18, 2018, Berlin - 
www.asipto.com

Kamailio World Conference - May 14-16, 2018 - 
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] [sr-dev] is t_flush_flags() really needed?

2018-03-27 Thread Daniel-Constantin Mierla


On 27.03.18 07:40, Juha Heinanen wrote:
> Juha Heinanen writes:
>
>> While testing xflags, i noticed that a regular flag that I set AFTER
>> calling t_newtrans() stays set in onreply_route even when I do not
>> call t_flush_flags().
> I made the same test with xflags and they do require t_flush_xflags()
> call if an xflag is set after t_newtrans();  So the behavior is not the
> same with flags and xflags.
>
> This is confusing.  The flags should behave the same way and I would
> prefer the flags way in order to avoid the flush call.
>
> I added sr-dev to this thread since it now deals also the new feature.
>
Afaik, flags after t_newtran() were supposed not to be moved to
transaction if t_flush_flags(), that being the purpose of the later
function. Are you doing any other tm operations between creating the new
transaction and relaying the request or end of script execution?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


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