Re: [SR-Users] One way video using Kamailio, WebRTC, and Asterisk

2018-01-04 Thread Daniel-Constantin Mierla
Hello,


On 23.12.17 21:05, Wilkins, Steve wrote:
>
> First I want to give Denys a huge shout-out for all of the help he has
> given me.  It is wonderful that boards like this exists and people are
> so willing to help a newbie learn.
>
>  
>
> I am on what I am hoping is my last major issue with WebRTCóWebRTC
> calls (using tryit-jssip Chrome or Firefox).
>
>  
>
> I am using Kamailio 5, and Asterisk 15 (pjsip).
>
> I am making calls between two WebRTC clients  - Client1, and Client2
> (using tryit-jssip)
>
>  
>
> Problem:  If Client1 calls Client2, and Client2  ‘ANSWERS’, I only
> have audio/video on Client1.  Client2 gets no audio/video, but is
> connected.  If I switch things up and call Client1 from Client2, the
> same thing happens (Client2 has audio/video and Client1 does not); I
> can only get audio/video on the calling laptop; the called laptop has
> no audio/video, but is connected.  I see no errors in any of the logs.
>
>  
>
> I am hoping that someone out there has seen this behavior before and
> has an idea as to the cause and possible solution.
>
>  
>
Are the clients behind the NAT?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 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] Is it possible to inject variables into transaction scope

2018-01-04 Thread Daniel-Constantin Mierla
Hello,

the variables attached to a transaction are the avps and xavps, but at
this moment you cannot add one if the transaction is not active (under
processing by config interpreter) at that moment. It would be possible
if you want to write some C code: search the transaction by its id, then
you can add avp/xavp as you can access the lists inside the transaction
structure.

Without C code, a solution for now will be to store the value in a hash
table using a key like "transactionid:varname", then when the processing
of the transaction is resumed, then you can check in hash table and
fetch the value from there if exists. The transaction id is unique for a
lot more than the lifetime of the transaction, if you set auto expire
for the htable for a value that matches the transaction lifetime (see tm
parameters), then all should be safe.

Cheers,
Daniel


On 25.12.17 18:00, voipspace voipspace wrote:
>  
> Hi
>  
> Say I am in a event_route[xhttp:request], which is outside of any
> transaction scope.
>  
> I have a transaction id that I am about to resume with t_continue.
>  
> From here within event_route[xhttp:request] can avp variable be set so
> they would be accessable in the resumed transaction
>  
> regards
>  
>  
>
>
> ___
> 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 - 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] kamailio-5.0.5 active/passive pcs/cluster with rtpengine - how to fix calls after failover

2018-01-04 Thread Daniel-Constantin Mierla
Hello,

are kamailio and rtpenigine on same system?

Cheers,
Daniel


On 04.01.18 12:21, Karsten Horsmann wrote:
> Hello List,
>
> and also an happy new year to everyone.
>
> I use CentOS 7.4.x with kamailio 5.0.5 and rtpengine on a
> pacemaker/corosync cluster
> in front of an internal kamailio siprouter and media-services.
>
> If i did an "pcs node standby" to failover my frontend-kamailio
> (udp/tcp 5060, udp/tcp 5061-tls and tcp websocket-secure) i noticed
> the following scenarios:
>
> 1) Plain RTP: just stocks a few seconds and flows. Everything fine.
> 2) SDES/RTP: silence - but REINVITE manually in my client brings audio
> back. Need improvement.
> 3) DTLS/RTP WebRTC: silence - all clients shows an active call. I know
> that there is NO way to recover this call - because of the temporay
> DTLS certificate due the rtpengine start-up.
>
>
> So i thought - for scenario1) i dont need anything to do. Works nice.
> For scenario2) i need something to "remember its SDES/RTP calls and
> send them an REINVITE"
> And for scenario3) i should just hangup all WebRTC calls - IMHO the
> best for that.
>
> How can i fire-up these tasks to get an "clean-up" or "reinvite" after
> an failover?
>
>
> scenario legend:
> 1) unencrypted call
> 2) TLS/SDES encrypted call
> 3) DTÖS WebRTC encrypted call
>
> -- 
> Kind Regards
> *Karsten Horsmann*
>
>
> ___
> 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 - 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] Kamailio fail to start with db_mongodb and ndb_mongodb modules

2018-01-04 Thread Abdul Basit
Hi Daniel,

Thank you for your reply.

I tested libmongoc with debian package available with repo. Then I moved to
compile from source. result was same.

But i will try it again with fresh installation and will post here.


--
regards,

abdul basit

On 2 January 2018 at 16:38, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> the issue happens inside mongoc library. Have you tried with the default
> one from Debian, without compiling it from sources?
>
> Cheers,
> Daniel
>
> On 01.01.18 16:51, Abdul Basit wrote:
>
> Hi,
>
> My last email was help for admin review.
>
> Sharing logs through pastebin https://pastebin.com/6HhdYLJK
>
> Interesting part will start from line 983 where it start initializing
> ndb_mongodb.
>
>
>
> On 1 January 2018 at 20:32, Abdul Basit  wrote:
>
>> Hi,
>>
>> I enabled but kamailio didn't generate any dump file
>> To enable code dump followed https://www.kamailio.org/dokuw
>> iki/doku.php/troubleshooting:corefiles
>>
>> I also un-commented lines in /etc/init.d/kamailio script
>>
>> if test "$DUMP_CORE" = "yes" ; then
>> # set proper ulimit
>> ulimit -c unlimited
>>
>> # directory for the core dump files
>> COREDIR=/tmp/corefiles
>> [ -d $COREDIR ] || mkdir -p $COREDIR
>> chmod 777 $COREDIR
>> echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
>> fi
>>
>>
>> I think reason is that kamailio process didn't exit after crash and keep
>> on restarting. each time with new PID.
>>
>> However, debug file is attached. I hope this will help.
>>
>>
>> --
>> regards,
>>
>> abdul basit
>>
>> On 29 December 2017 at 20:11, M S  wrote:
>>
>>> Hi,
>>>
>>> Enable core dump and provide backtrace of sigfault. See this for more
>>> info,
>>>
>>> https://sourceware.org/gdb/onlinedocs/gdb/Backtrace.html
>>>
>>> Thank you.
>>>
>>>
>>>
>>> On Fri, Dec 29, 2017 at 12:25 PM, Abdul Basit 
>>> wrote:
>>>
 Adding further from https://stackoverflow.com/ques
 tions/2549214/interpreting-segfault-messages

 error 6 means, fault is

 *  bit 2 == 1 means kernel, 1 means user-mode
 *  bit 4 == 1 means fault was an instruction fetch


 That looks like kamailio is trying to invoke for db connection where
 libmongo-c don't like to be.

 --
 regards,

 abdul basit


 On 29 December 2017 at 15:39, Abdul Basit  wrote:

> Hi,
>
> I am trying to setup mongo db as database engine for kamailio as
> described at
> 
> http://www.kamailio.org/wiki/tutorials/kamailio-and-mongodb
> and
> https://telerain.com/kamailio
>
> OS: Debian GNU/Linux 8.10 (jessie)
> MongoDB server version: 3.4.10
> mongo-c-driver-1.9.0.tar.gz compiled with
> ./configure --disable-static --disable-silent-rules
> --enable-debug-symbols --enable-ssl=no --enable-sasl=yes
> --with-libbson=bundled --enable-optimizations 
> --disable-automatic-init-and-c
> leanup
>
> version: kamailio 5.0.4 (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 20:45:44 Dec 27 2017 with gcc 4.9.2
>
> include_modules= utils app_lua db_postgres json evapi db_mongodb
> ndb_mongodb
>
> Kamailio is crashing with segfault as soon as it try to load libmongo-c
>
> Dec 28 04:44:14 sipserver systemd[1]: Starting Kamailio (OpenSER) -
> the Open Source SIP Server...
> Dec 28 04:44:14 sipserver kamailio: INFO: 
> [core/sctp_core.c:75]: sctp_core_check_support(): SCTP API not enabled - 
> if
> you want to use it, load sctp module
> Dec 28 04:44:14 sipserver kamailio: INFO: 
> [core/tcp_main.c:4671]: init_tcp(): using epoll_lt as the io watch method
> (auto detected)
> Dec 28 04:44:14 sipserver kamailio[11685]: Listening on
> Dec 28 04:44:14 sipserver kamailio[11685]: udp: 127.0.0.1:5060
> Dec 28 04:44:14 sipserver kamailio[11685]: udp: 192.168.10.20:5060
> Dec 28 04:44:14 sipserver kamailio[11685]: tcp: 127.0.0.1:5060
> Dec 28 04:44:14 sipserver kamailio[11685]: tcp: 192.168.10.20:5060
> Dec 28 04:44:14 sipserver kamailio[11685]: Aliases:
> Dec 28 04:44:14 sipserver kamailio[11685]: tcp: localhost:5060
> Dec 28 04:44:14 sipserver kamailio[11685]: udp: localhost:5060
> Dec 28 04:44:14 sipserver /usr/local/sbin/kamailio[11687]: INFO: rr
> [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe
> module is 

[SR-Users] kamailio-5.0.5 active/passive pcs/cluster with rtpengine - how to fix calls after failover

2018-01-04 Thread Karsten Horsmann
Hello List,

and also an happy new year to everyone.

I use CentOS 7.4.x with kamailio 5.0.5 and rtpengine on a
pacemaker/corosync cluster
in front of an internal kamailio siprouter and media-services.

If i did an "pcs node standby" to failover my frontend-kamailio (udp/tcp
5060, udp/tcp 5061-tls and tcp websocket-secure) i noticed the following
scenarios:

1) Plain RTP: just stocks a few seconds and flows. Everything fine.
2) SDES/RTP: silence - but REINVITE manually in my client brings audio
back. Need improvement.
3) DTLS/RTP WebRTC: silence - all clients shows an active call. I know that
there is NO way to recover this call - because of the temporay DTLS
certificate due the rtpengine start-up.


So i thought - for scenario1) i dont need anything to do. Works nice.
For scenario2) i need something to "remember its SDES/RTP calls and send
them an REINVITE"
And for scenario3) i should just hangup all WebRTC calls - IMHO the best
for that.

How can i fire-up these tasks to get an "clean-up" or "reinvite" after an
failover?


scenario legend:
1) unencrypted call
2) TLS/SDES encrypted call
3) DTÖS WebRTC encrypted call

-- 
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] Kami as NAT traversal + FS as media

2018-01-04 Thread Daniel-Constantin Mierla
Hello,


On 25.12.17 10:16, Yu Boot wrote:
> Hello. I want to implement the following scheme:
>
> Kami takes inbound call, replces SPD for correct NAT trversal and
> forward that call to FS. Kami should NOT be in RTP stream. Is it
> possible? Any advices?
>
Kamailio should not touch the SDP if it is not going to do the RTP
relaying with rtpengine or rtpproxy. Just leave it untouch, freeswitch
will handle what is needed in this regard.

What you have to do is to fix the signaling for nat traversal, which may
mean to use path module for handling registrations as well as doing
set_contact_alias() as well as handle_ruri_alias(), so you can route
requests within dialog.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - 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] Critical Error

2018-01-04 Thread Daniel-Constantin Mierla
Hello,

thanks for writing to conclude this discussion thread, for the archive
it is good to have the message pointing to the solution or if the issue
was elsewhere.

Cheers,
Daniel


On 02.01.18 18:10, Nicolas Breuer wrote:
> Hello the list,
>
> Just to inform you that the issue was solved.
>
> The error in Kamailio was caused by a wrong signaling from our upstream.
>
>
>
> -Message d'origine-
> De : sr-users [mailto:sr-users-boun...@lists.kamailio.org] De la part de 
> Nicolas Breuer
> Envoyé : samedi 30 décembre 2017 17:32
> À : sr-users@lists.kamailio.org
> Objet : Re: [SR-Users] Critical Error
>
> Hi,
>
> Can I help to find the cause ?
>
>
>> Le 28 déc. 2017 à 18:32, Daniel Tryba  a écrit :
>>
>>> On Thu, Dec 28, 2017 at 04:21:28PM +, Nicolas Breuer wrote:
>>>
>>> I see this :
>>>
>>>
>>> SIP/2.0 183 Session Progress.
>>> CSeq: 1258951486 INVITE.
>>> Require: 100rel.
>>>
>>> SIP/2.0 180 Ringing.
>>> CSeq: 1258951486 INVITE.
>>> Require: 100rel.
>>>
>>> PRACK sip:3222430244@80.84.31.129:5060 SIP/2.0.
>>> CSeq: 1258951487 PRACK.
>>> Indeed after the PRACK there is no ? 18x ? packets.
>> You misinterpreted:
>>> I looked at the code and this log happens when a PRACK is received, 
>>> but there was no 183 (or other 1xx) response. Can you check the sip 
>>> traffic and see what packets are sent around?
>> A PRACK is a PRovisional ACKnowlegde to messages that don't need any 
>> responses in plain old SIP. So the PRACK is a correct new message in 
>> response to the 18X received (with req rel100).
>>
>> I'm not seeing these errors in dialog on 4.4.6 setups where upstream 
>> demands PRACK.
>>
>>
>> ___
>> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - 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] Kamailio Remote User Registration

2018-01-04 Thread Daniel-Constantin Mierla
Hello,

it is not clear to me where you got stuck ... normally uac remote
registration is done at startup. If you want to do it when an incoming
register is processed, then you can enable (or disable) it via RPC, you
can use jsonrpc_exec() from jsonrpcs module:

 -
https://www.kamailio.org/docs/modules/stable/modules/jsonrpcs.html#jsonrpcs.f.jsonrpc_exec

To help you more, you have to provide more details about what exactly
happens with what you try. Eventually grab the pcap of the sip traffic
as well as you can run with debug=3 and look at syslog messages.

Cheers,
Daniel

On 03.01.18 10:59, hildah.ochi...@deutschebahn.com wrote:
>
> Dear Kamailio experts,
>
> I would like to able to register one kamailio (localuser) in another
> another kamailio (remoteuser) when the jitsi sip
> account "localuser@localdomain" is online. Using the UAC module for
> remote registration the uacreg table's l_username and
> l_domain attributes are set to refer to the local kamailio while the
> r_username and r_domain attributes refer to the remote
> kamailio. I  would appreciate your advice on the missing piece of the
> puzzle.
>
> Following is my configuration of the "local" kamailio. The "remote"
> kamailio.cfg is unchanged.
>
> /etc/kamailio/kamailio.cfg
>
> loadmodule "db_text.so"
> loadmodule "uac.so"
>
> modparam("uac", "reg_timer_interval", 30)
> modparam("uac", "reg_retry_interval", 60)
> modparam("uac", "reg_contact_addr","xx.xx.xx.xx:5060")
> modparam("uac", "reg_db_table", "uacreg")
> modparam("uac", "reg_db_url", "text:///etc/kamailio/dbtext")
>
>
> /etc/kamailio/dbtext/uacreg
>
> l_uuid(string) l_username(string) l_domain(string) r_username(string)
> r_domain(string) realm(string) auth_username(string)
> auth_password(string) auth_proxy(string) expires(int) flags(int)
> reg_delay(int)
> :localuser:localdomain:remoteuser:remotedomain:remoteuser360:4:30
>
>
> Thanks
> Hildah
>
>
> ___
> 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 - 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] parsing of SIP message failed

2018-01-04 Thread Daniel-Constantin Mierla
Hello,


On 03.01.18 12:33, Suresh Talasaniya wrote:
> Hi,
>
> *I consistently receive the following 3 errors (see below) over and
> over when a call is being collected.*
*what do you mean by "when a call is being collected"? What exactly are
you doing in kamailio.cfg for this operation>

The message is an HTTP response, Kamailio can act only as HTTP server,
therefore receiving only HTTP requests. Kamailio cannot act as an HTTP
proxy.

Cheers,
Daniel

*
>
>
> ERROR:  [core/parser/parse_fline.c:257]: parse_first_line():
> parse_first_line: bad message (offset: 22)
>
> ERROR:  [core/parser/msg_parser.c:671]: parse_msg(): ERROR:
> parse_msg: message= SIP/2.0/TLS x.x.x.x:42173#015#012Sec-WebSocket-Protocol:
> sip#015#012Upgrade: websocket#015#012Connection:
> upgrade#015#012Sec-WebSocket-Accept:
> qrLTSNMA7oAO8YXGaUhf3Ru26X0=#015#012Content-Length: 0#015#012#015#012>
>
> Any assistance would be appreciated.
>
> Thank you.
>
> -- 
> Regards,
> Suresh Talasaniya. 
> Contact : +91-9724264776
> Skype : suresh.talsaniya
>
>
> ___
> 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 - 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] t_relay dying ?

2018-01-04 Thread Daniel-Constantin Mierla
Hello,

if one side of the call is breaking the contact, then a workaround in
kamailio is to use htable to store the contact address per
callid+from/to tag. I encountered couple of times such situation and the
condition in the config file is like:

  - if the r-uri of ACK (BYE, etc...) matches "myself", then check to
see if there is a record in an htable corresponding to callid and
to-tag, if yes, use it

Contact for caller is set in htable as INVITE is received and for callee
when then 200ok is received.

If dialog module is used, then the contact from the dialog structure can
be used. With 5.1 or newer, dialog offers a dedicated function for this:

  -
https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.f.dlg_set_ruri

For older versions, the address has to be taken from $dlg(...) variable,
with some conditions to detect if it is the caller or callee side.

Cheers,
Daniel


On 03.01.18 16:16, Sebastian Damm wrote:
> Hi Jean,
>
> as pointed out earlier, the ACK is probably broken. Every packet after
> the 200 OK should have the contact of the 200 OK in the Request URI.
> Your example packet carries probably the original request URI, which
> is most certainly wrong, exept if you use some topology hiding.
>
> This is something you can't fix but the voip provider has to fix. They
> apparently can't handle proxied SIP connections.
>
> Regards,
> Sebastian
>
>
>
>
> ___
> 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 - 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