Re: [SR-Users] Kamailio Asterisk SIP Registration Forwarding - Asterisk replies 401 Unauthorized

2015-07-20 Thread Alberto Sagredo
OK. Great

Regards

2015-07-17 20:38 GMT+02:00 Ben Fitzgerald b...@letscorp.us:

 I think I have fixed the authentication issue yet the SIP dialog has
 completely changed. Now the dialog involves Asterisk sending SIP NOTIFY to
 Kamailio, which is then forwarded to the client. Kamailio.cfg has no routes
 to handle NOTIFY and there are no SUBSCRIBE messages preceding the NOTIFY.
 Only REGISTER and 200 OK. Is this expected behavior? The sipregs database
 is now correctly updated when a peer registers so that's good.

 Benjamin Fitzgerald
 LETS Corporation
 (925) 235-1154
 b...@letscorp.us




 ***Confidential Notice:
 This message is intended only for the use of the individual or entity to
 which it is addressed and may contain information that is privileged,
 confidential and exempt from disclosure under applicable law. If the reader
 of this message is not the intended recipient, you are hereby notified that
 any dissemination, distribution or copying of this communication is
 strictly prohibited. If you have received this message in error, please
 delete this message from all computers and contact Orion Systems/LETS Corp
 immediately by return e-mail and/or telephone at (925) 566-5600

 On Thu, Jul 16, 2015 at 2:59 PM, Ben Fitzgerald b...@letscorp.us wrote:

 Thank you for the qualify solution, that worked.

 However, on the KB by asipto, they only create a `sipreg` and `sipusers`
 table and then in extconfig.conf for asterisk, sipusers and sippeers are
 both using the `sipusers` table in MySQL.

 I included a sip trace in the original email but I will include a more
 detailed sip debug here. It looks like Asterisk and Kamailio can exchange
 messages but for some reason, the SIP dialog stops after Asterisk sends
 back a SIP 401 Unauthorized to Kamailio. Any ideas?

 *1. Kamailio using sipgrep*

 T 2015/07/16 14:50:52.393582 UserAgentIP:64521 - KamailioIP:5060
  [AP]
 REGISTER sip:opvpnx.ulets.us SIP/2.0.
 Via: SIP/2.0/TCP 192.168.0.179:64521
 ;alias;branch=z9hG4bK.j~V~btADL;rport.
 From: sip:1...@opvpnx.ulets.us;tag=QZ7de-7u5.
 To: sip:1...@opvpnx.ulets.us.
 CSeq: 29 REGISTER.
 Call-ID: puXkrkIICT.
 Max-Forwards: 70.
 Supported: outbound.
 Accept: application/sdp, text/plain, application/vnd.gsma.rcs-ft-http+xml.
 Contact: sip:102@
  
 UserAgentIP:64521;transport=tcp;+sip.instance=urn:uuid:f8f0aa7c-5b20-4ff2-ac5a-d7b4004afb50.
 Expires: 3600.
 User-Agent: Alpha TalkIphone/2.2.5-80-g783bf67 (belle-sip/1.4.0).
 Content-Length: 0.
 Authorization:  Digest realm=opvpnx.ulets.us,
 nonce=VagoaFWoJzylK0MxoOAIPTRhtZBlmVmr, username=102,  uri=sip:
 opvpnx.ulets.us, response=24b8f292fca38e72fbcf36417dcecd24.
 .


 T 2015/07/16 14:50:52.440789 KamailioIP:5060 - UserAgentIP:64521
  [AP]
 SIP/2.0 200 OK.
 Via: SIP/2.0/TCP 192.168.0.179:64521
 ;alias;branch=z9hG4bK.j~V~btADL;rport=64521;received= UserAgentIP.
 From: sip:1...@opvpnx.ulets.us;tag=QZ7de-7u5.
 To: sip:1...@opvpnx.ulets.us;tag=723cfa83f1495d1e63c1f1bb20bde818.a56d.
 CSeq: 29 REGISTER.
 Call-ID: puXkrkIICT.
 Contact: sip:102@
  UserAgentIP:64521;transport=tcp;expires=3600;received=sip: 
 UserAgentIP:64521;transport=tcp;+sip.instance=urn:uuid:f8f0aa7c-5b20-4ff2-ac5a-d7b4004afb50.
 LETSSBC.
 Content-Length: 0.
 .

 *#*
 *# These next two messages when Kamailio forwards REGISTER to Asterisk*
 *#*

 T 2015/07/16 14:50:52.466461 KamailioIP:43488 - AsteriskIP:5060
  [AP]
 REGISTER sip: AsteriskIP:5060;transport=tcp SIP/2.0.
 Via:
 SIP/2.0/TCP KamailioIP;branch=z9hG4bK328c.29246e24.0.
 To: sip:102@ AsteriskIP .
 From: sip:102@ AsteriskIP ;tag=32fda68bf54efeeb04e3edc67b53c63d-3497.
 CSeq: 10 REGISTER.
 Call-ID: 2ee5ec48557bba33-31464@ KamailioIP.
 Max-Forwards: 70.
 Content-Length: 0.
 User-Agent: kamailio (4.3.0 (x86_64/linux)).
 Contact: sip:102@ KamailioIP:5060.
 Expires: 3600.
 .


 T 2015/07/16 14:50:52.494578 AsteriskIP:5060 - KamailioIP:43488
  [AP]
 SIP/2.0 401 Unauthorized.
 Via:
 SIP/2.0/TCP 
 KamailioIP;branch=z9hG4bK328c.29246e24.0;received= 
 KamailioIP.
 From: sip:102@ AsteriskIP ;tag=32fda68bf54efeeb04e3edc67b53c63d-3497.
 To: sip:102@ AsteriskIP ;tag=as0eb2442e.
 Call-ID: 2ee5ec48557bba33-31464@ KamailioIP.
 CSeq: 10 REGISTER.
 Server: Asterisk PBX 11.6-cert2.
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
 PUBLISH.
 Supported: replaces, timer.
 WWW-Authenticate: Digest algorithm=MD5, realm=asterisk,
 nonce=5b30f8aa.
 Content-Length: 0.

 *2. Asterisk using sip set debug on*

 t91*CLI

 --- SIP read from TCP: KamailioIP:43488 ---
 REGISTER sip: AsteriskIP:5060;transport=tcp SIP/2.0
 Via:
 SIP/2.0/TCP KamailioIP;branch=z9hG4bK328c.29246e24.0
 To: sip:102@ AsteriskIP 
 From: sip:102@ AsteriskIP ;tag=32fda68bf54efeeb04e3edc67b53c63d-3497
 CSeq: 10 REGISTER
 Call-ID: 2ee5ec48557bba33-31464@ KamailioIP
 Max-Forwards: 70
 Content-Length: 0
 User-Agent: kamailio (4.3.0 (x86_64/linux))
 Contact: sip:102@ KamailioIP:5060
 Expires: 3600

 -
 --- 

Re: [SR-Users] Planing to release v4.3.1

2015-07-20 Thread Daniel-Constantin Mierla
Hello,

quick note to refresh that I will be packaging v4.3.1 later today.
Starting with 12:00GMT till the release announcement, any commit to
branch 4.3 should be anounced on sr-dev mailing list, to avoid
inconsistent building of packages.

Cheers,
Daniel

On 14/07/15 10:52, Daniel-Constantin Mierla wrote:
 Hello,

 I am considering to release the first patch version in 4.3 series by
 beginning of next week (Monday or Tuesday, July 20 or 21). If you are
 aware of issues not reported yet, then open an item on the tracker to be
 taken care:

   - https://github.com/kamailio/kamailio/issues

 Cheers,
 Daniel


-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RR module - Fail detecting strict routing

2015-07-20 Thread Antonio Reale

Hi Daniel,
did you see something strange in the ACK message or you confirm that the 
RR module is not behaving correctly?


Thanks.
Regards.

Antonio


Il 14/07/2015 13:02, Antonio Reale ha scritto:

Hi Daniel,

this is the ACK received on Kamailio:

#
U 172.26.130.235:44435 - 192.168.0.245:5060
ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp 
SIP/2.0
Via: SIP/2.0/UDP 
172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z-

Max-Forwards: 70
Route: sip:192.168.0.245;lr
Route: sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
Contact: sip:10@172.26.130.235:44435;transport=UDP
To: sip:11@192.168.0.245;transport=UDP;tag=516145211
From: sip:10@192.168.0.245;transport=UDP;tag=a56ac352
Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY.
CSeq: 2 ACK
Proxy-Authorization: Digest 
username=10,realm=192.168.0.245,nonce=VaTXblWk1kKUxIMJBdWbpRBBCP850QVR,uri=sip:11@192.168.0.245;transport=UDP,response=1daf03c97b8a12e0154d463f543e5592,algorithm=MD5

User-Agent: Z 3.6.25251 r25476
Content-Length: 0

and this the ACK forwarded by Kamailio to P2

#
U 192.168.0.245:5060 - 192.168.0.101:5060
ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp 
SIP/2.0
Via: SIP/2.0/UDP 
192.168.0.245;branch=z9hG4bKa252.cc67d8b538d8ad5c01c3e75d472653ec.0
Via: SIP/2.0/UDP 
172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z-

Max-Forwards: 69
Route: sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
Contact: sip:10@172.26.130.235:44435;transport=UDP
To: sip:11@192.168.0.245;transport=UDP;tag=516145211
From: sip:10@192.168.0.245;transport=UDP;tag=a56ac352
Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY.
CSeq: 2 ACK
Proxy-Authorization: Digest 
username=10,realm=192.168.0.245,nonce=VaTXblWk1kKUxIMJBdWbpRBBCP850QVR,uri=sip:11@192.168.0.245;transport=UDP,response=1daf03c97b8a12e0154d463f543e5592,algorithm=MD5

User-Agent: Z 3.6.25251 r25476
Content-Length: 0


Kamailio considers P2 a loose router so the R-URI is not changed.

Thanks.
Regards.

Antonio


Il 14/07/2015 12:28, Daniel-Constantin Mierla ha scritto:

Hello,

what is the request URI? It might be better to just paste here the full
ACK message.

Cheers,
Daniel

On 14/07/15 12:25, Antonio Reale wrote:

Sorry,
here's the Route HF present in the ACK received from U1:

Route: sip:192.168.0.245;lr
Route: sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e

Regards.

Antonio



Il 14/07/2015 12:09, Antonio Reale ha scritto:

Hi all,
I have the following  scenario:
U1 (caller) --- P1 (192.168.0.245, kamailio 4.3, loose-router) 
P2  (192.168.0.101, strict router)    U2 (called)

When U2 answers the call, at P1 arrives the 200 OK with:
Record-Route:
sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
Record-Route: sip:192.168.0.245;lr=on

The problem is that the ACK from U1 is forwarded from kamailio to P2,
as if P2 is a loose router. P2 drops the ACK message.

 From kamailio logs I see:
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:88]:
is_preloaded(): is_preloaded: No
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
[loose.c:783]: after_loose(): Topmost route URI:
'sip:192.168.0.245;lr=on' is me
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
[loose.c:869]: after_loose(): URI to be processed:
'sip:11@192.168.0.101;transport=udp;pgw-call=call-289ce'
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
[loose.c:878]: after_loose(): Next URI is a loose router

Why after_loose function considers the next URI a loose router? The
Route HF in the ACK with the URI of the next hop does not contain 
;lr .
It seems that the function is_strict fails detecting the strict 
router.


Thanks.

Regards.

Antonio


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users





___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kazoo like load balancing

2015-07-20 Thread Daniel Tryba
On Monday 20 July 2015 13:48:30 Jurijs Ivolga wrote:
 But all my calls are failing, when clients are registered to different
 servers with error 404 Not Found. Maybe somebody can give me a hint how
 to make this work.

Use Path:

http://lists.sip-router.org/pipermail/sr-users/2015-April/087872.html

-- 

Telefoon: 088 0100 700
Sales: sa...@pocos.nl | Service: serviced...@pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 
17097024


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kazoo like load balancing

2015-07-20 Thread Jurijs Ivolga
Hi,

First of all I would like to mention, that I'm very new to Kamailio. :)
My target is to create simple load-balancing similar what have Kazoo,
basically 2 servers will share same domain name.
I installed 2 Kamailio 4.3 servers and configured this 2 servers with one
domain address. I used almost default config with:

#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_MULTIDOMAIN
#!define WITH_NAT
#!define WITH_NATSIPPING

Calls are going through if I register both clients to one server.

But all my calls are failing, when clients are registered to different
servers with error 404 Not Found. Maybe somebody can give me a hint how
to make this work.

Thank you!

With kind regards,

Jurijs
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kazoo like load balancing

2015-07-20 Thread Jurijs Ivolga
Hi,

I'm very sorry. :)

But could you please provide more info?

Should I add add_path() before if (!save(location))?

With kind regards,

Jurijs

2015-07-20 14:04 GMT+03:00 Daniel Tryba d.tr...@pocos.nl:

 On Monday 20 July 2015 13:48:30 Jurijs Ivolga wrote:
  But all my calls are failing, when clients are registered to different
  servers with error 404 Not Found. Maybe somebody can give me a hint how
  to make this work.

 Use Path:

 http://lists.sip-router.org/pipermail/sr-users/2015-April/087872.html

 --

 Telefoon: 088 0100 700
 Sales: sa...@pocos.nl | Service: serviced...@pocos.nl
 http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel
 17097024


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Multiple crashes of Kamailio 4.2.1

2015-07-20 Thread Igor Potjevlesch
Hello,

 

3 crashes occurred today (we never seen crashes on this server before)
during a period of 20 minutes.

 

I had a look to the coredumps. Here is a quick overview of the first entries
of bt full:

 

core.27671 : #0  0x7f5577048d65 in run_trans_callbacks_internal
(cb_lst=0x7f5560abbd50, type=2, trans=0x7f5560abbce0, params=0x7fff3712acb0)
at t_hooks.c:286

core.27656 : #0  0x7f557700a048 in free_cell (dead_cell=0x7f5560abbce0)
at h_table.c:175

core.27685 : #0  0x7f5577048d65 in run_trans_callbacks_internal
(cb_lst=0x7f5560abbd50, type=2, trans=0x7f5560abbce0, params=0x7fff3712acb0)
at t_hooks.c:286

core.27689 : #0  0x7f5577048d65 in run_trans_callbacks_internal
(cb_lst=0x7f5560abbd50, type=2, trans=0x7f5560abbce0, params=0x7fff3712acb0)
at t_hooks.c:286

core.27691 : #0  0x7f5577048d65 in run_trans_callbacks_internal
(cb_lst=0x7f5560abbd50, type=2, trans=0x7f5560abbce0, params=0x7fff3712acb0)
at t_hooks.c:286

core.31977 : #0  0x7f038e66fdee in free_cell (dead_cell=0x7f037811ebe0)
at h_table.c:157

core.31994 : #0  0x7f038e6ab65a in t_forward_nonack (t=0x7f037811ebe0,
p_msg=0x7f038fdca438, proxy=0x0, proto=0) at t_fwd.c:1762

core.3700 : #0  0x0061697a in fm_insert_free (qm=0x7f19861fa000,
frag=0x7f19864d53e8) at mem/f_malloc.c:245

core.3727 : #0  0x006167a4 in fm_extract_free (qm=0x7f19861fa000,
frag=0x7f19864f4cc8) at mem/f_malloc.c:208

 

I don't know how to proceed now. Can you help me to highlight the issue
here? Thank you.

Regards,

 

Igor.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio v4.3.1 Released

2015-07-20 Thread Daniel-Constantin Mierla
Hello,

Kamailio SIP Server v4.3.1 stable release is out.

This is a maintenance release of the latest stable branch, 4.3, that
includes fixes since release of v4.3.0. There is no change to database
schema or configuration language structure that you have to do on
installations of v4.3.0. Deployments running previous v4.x.x versions
are strongly recommended to be upgraded to v4.3.1.

For more details about version 4.3.1 (including links and guidelines to
download the tarball or from GIT repository), visit:

  * http://www.kamailio.org/w/2015/07/kamailio-v4-3-1-released/

RPM, Debian/Ubuntu packages will be available soon as well.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kazoo like load balancing

2015-07-20 Thread Jurijs Ivolga
Hi,

Thank you for your help!

In my case i have 2 servers: 192.168.100.1  192.168.100.2
Both of this servers have one domain name voip.bla.com

No load-balancer is used.

I can register to any of this server with user 1...@voip.bla.com and
2...@voip.bla.com

Call is failing when I'm trying to call from 1...@voip.bla.com to
2...@voip.bla.com, when user 1...@voip.bla.com registered to 192.168.100.1
and 2...@voip.bla.com registered to 192.168.100.2.

As far as I understood I need to add path header.

Could you please let me know where exactly I need to add path header? I'm
using default config, with almost no changes.

Additionally it is little bit confusing about parameters what I should add.

Should I add following parameters to config file or not?

modparam(usrloc, matching_mode, 1)
modparam(registrar, use_path, 1)

Thank you!

2015-07-20 16:31 GMT+03:00 Daniel Tryba d.tr...@pocos.nl:

 On Monday 20 July 2015 16:02:00 Jurijs Ivolga wrote:
  But could you please provide more info?
 
  Should I add add_path() before if (!save(location))?

 Path is a module you can use for user lookups/registration

 http://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.p.matching_mode

 http://kamailio.org/docs/modules/stable/modules/registrar.html#registrar.p.use_path

 Depending on how you register on a registrater server you'll need to add
 the
 Path header (in my previuos supplied URL, clients which register directly
 to a
 register server don't have any Path headers, so I added them manually
 (because
 add_path doesn't work in that place/time of routing/handling). If you are
 using a loadbalancer that adds Path headers then ofcourse adding Path
 headers
 before save() isn't neccessary.

 My guess is your question is kind of the same as the one I asked (I don't
 know
 what Kazoo is/does):
 http://lists.sip-router.org/pipermail/sr-users/2015-April/087867.html


 --

 Telefoon: 088 0100 700
 Sales: sa...@pocos.nl | Service: serviced...@pocos.nl
 http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel
 17097024


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] File Transfer

2015-07-20 Thread Abdul Hakeem
Hello,

Is there a support for file transfer between registered SIP clients, If not, how
can this be achieved ?

Regards,
Abdul Hakeem



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] RFC: about the self signed tls certificates

2015-07-20 Thread Daniel-Constantin Mierla
Hello,

(cross-posting as it impacts users as well)

Currently we generate and install the TLS self-signed certificates when
tls module is installed, including them in the debian packages (and I
guess in rpms).

Debian has a policy of reproducible builds, meaning that from same
source tree snapshot the same binary packages should result.

Even more important considering the impact on security, it would be
better that the certificates are generated locally on the installation
server, to be distinct. Right now, people relying on default
installation config/certificates (and I guess there are many, at least
in testing phase), are exposed to eavesdropping, because the private key
is available in public packages.

My proposal is to move generation of self signed certificates to kamctl.
There can be a kamctl.tls file to be deployed by the tls package (same
is done by kamctl.mysql, being part of mysql package), which should add
a new group of commands, among them something like:

kamctl tls generate-certificate

The drawback is that before enabling tls and starting kamailio, one has
to run the above command. We can document that in tls module readme and
in kamailio.cfg in the comments related to WITH_TLS define.

Anyone with comments, pros/cons?

Other suggestions on how to address the reproducible builds as well as
solve the security issue for the default installation?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] [sr-dev] RFC: about the self signed tls certificates

2015-07-20 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

 My proposal is to move generation of self signed certificates to kamctl.
 There can be a kamctl.tls file to be deployed by the tls package (same
 is done by kamctl.mysql, being part of mysql package), which should add
 a new group of commands, among them something like:
 
 kamctl tls generate-certificate
 
 The drawback is that before enabling tls and starting kamailio, one has
 to run the above command. We can document that in tls module readme and
 in kamailio.cfg in the comments related to WITH_TLS define.
 
 Anyone with comments, pros/cons?

I support certificate generation by kamctl.

-- Juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio 4.3v partition column name is reserved word in mysq ndbcluster engine

2015-07-20 Thread Daniel-Constantin Mierla
Hello,

the names of columns should be quoted in order to be safe against
reserved keywords.

What is the exact version you are using (kamailio -v)?

Cheers,
Daniel

On 20/07/15 17:37, José Seabra wrote:
 Hello Daniel,

 After update my kamailio to version 4.3 and change the table location
 as required in migration process, kamailio start giving some errors:

 [root@ccp1 kamailio]# 35(7637) ERROR: db_mysql [km_dbase.c:121]:
 db_mysql_submit_query(): driver error on query: Unknown column
 'partition' in 'where clause'
 35(7637) ERROR: core [db_query.c:132]: db_do_query_internal(): error
 while submitting query

 that's is because the column name partition is reserved word
 (http://dev.mysql.com/doc/refman/5.6/en/keywords.html) in mysql
 ndbcluster engine, so what i did to fix this issue was add a new
 modparam in 
 modules/usrloc/ul_mod.c file:

 {partition_col,   PARAM_STR, partition_col},


 with this i can configure what name i want for this column in kamailio
 module configuration and configure a diferent column name in  table
 location(ex: modparam(usrloc, partition_col, partitionusrloc) ),
  Can you please check out if what i did is the correct way to fix it,
 in order to avoid damage something else.

 Best regards
 -- 
 Cumprimentos
 José Seabra

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kazoo like load balancing

2015-07-20 Thread Daniel Tryba
On Monday 20 July 2015 17:11:38 Jurijs Ivolga wrote:
 Could you please let me know where exactly I need to add path header? I'm
 using default config, with almost no changes.

Just before the save() like in 
http://lists.sip-router.org/pipermail/sr-users/2015-April/087872.html
 
 Additionally it is little bit confusing about parameters what I should add.
 
 Should I add following parameters to config file or not?
 
 modparam(usrloc, matching_mode, 1)
 modparam(registrar, use_path, 1)

modparam(usrloc, matching_mode, 2)
modparam(registrar, use_path, 1)
modparam(registrar, path_mode, 1)


-- 

Telefoon: 088 0100 700
Sales: sa...@pocos.nl | Service: serviced...@pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 
17097024


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio 4.3v partition column name is reserved word in mysq ndbcluster engine

2015-07-20 Thread José Seabra
I found the root cause of this issue, as i copied the mysql commands from
this link http://www.kamailio.org/wiki/install/upgrade/4.2.x-to-4.3.0 and
pasted it in mysql client, apparently that was my issue, what i did to fix
this issue was drop the column and add it again but with this mysql
command:

ALTER TABLE location ADD COLUMN `partition` INT(11) DEFAULT 0 NOT NULL;

The difference between  this  mysql command  is that I'm using quotes in
column name and the mysql commands that are in the link specified above
doesn't have the quotes in column names.

I shouldn't have copy these commands without fix it.

Thank you for your help.

BR
José Seabra



2015-07-20 17:46 GMT+01:00 José Seabra joseseab...@gmail.com:

 I changed the column name in the database table from partition to
 partitionusrloc, and i added a new modparam (partition_col) in
 modules/usrloc/ul_mod.c  file:

 {partition_col,   PARAM_STR, partition_col},


 in order to be able to configure the name of this column from partition to
 partitionusrloc in kamailio module configuration section, with following
 configuration:

 modparam(usrloc, partition_col, partitionusrloc)

 I will enable the mysql log then collect the query log, and reply back to
 you with this information.

 BR
 Thank you.

 2015-07-20 17:24 GMT+01:00 Daniel-Constantin Mierla mico...@gmail.com:

  Hello,

 the backticks should be added for columns in where condition. Can you
 enable logging the query in mysql server logs and send it over to see how
 it looks?

 Or maybe I didn't understand your problem properly and you changed the
 name in the database table for column partition, but there was no way to
 change that to usrloc module?

 Cheers,
 Daniel


 On 20/07/15 18:04, José Seabra wrote:

 Hello Daniel,

  Result of command kamailio -v

  version: kamailio 4.3.1 (x86_64/linux) f38e67-dirty
  flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
 USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP,
 PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, 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: f38e67 -dirty
 compiled on 15:56:29 Jul 20 2015 with gcc 4.4.7

  Thank you for your support

  BR
 José Seabra

 2015-07-20 16:58 GMT+01:00 Daniel-Constantin Mierla mico...@gmail.com:

 Hello,

 the names of columns should be quoted in order to be safe against
 reserved keywords.

 What is the exact version you are using (kamailio -v)?

 Cheers,
 Daniel

 On 20/07/15 17:37, José Seabra wrote:
  Hello Daniel,
 
  After update my kamailio to version 4.3 and change the table location
  as required in migration process, kamailio start giving some errors:
 
  [root@ccp1 kamailio]# 35(7637) ERROR: db_mysql [km_dbase.c:121]:
  db_mysql_submit_query(): driver error on query: Unknown column
  'partition' in 'where clause'
  35(7637) ERROR: core [db_query.c:132]: db_do_query_internal(): error
  while submitting query
 
  that's is because the column name partition is reserved word
  (http://dev.mysql.com/doc/refman/5.6/en/keywords.html) in mysql
   ndbcluster engine, so what i did to fix this issue was add a new
  modparam in
  modules/usrloc/ul_mod.c file:
 
  {partition_col,   PARAM_STR, partition_col},
 
 
  with this i can configure what name i want for this column in kamailio
  module configuration and configure a diferent column name in  table
  location(ex: modparam(usrloc, partition_col, partitionusrloc) ),
   Can you please check out if what i did is the correct way to fix it,
  in order to avoid damage something else.
 
  Best regards
  --
  Cumprimentos
  José Seabra

  --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Book: SIP Routing With Kamailio - http://www.asipto.com




  --
 Cumprimentos
 José Seabra


 --
 Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/miconda
 Book: SIP Routing With Kamailio - http://www.asipto.com




 --
 Cumprimentos
 José Seabra




-- 
Cumprimentos
José Seabra
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio 4.3v partition column name is reserved word in mysq ndbcluster engine

2015-07-20 Thread José Seabra
Hello Daniel,

Result of command kamailio -v

version: kamailio 4.3.1 (x86_64/linux) f38e67-dirty
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
F_MALLOC, DBG_F_MALLOC, 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: f38e67 -dirty
compiled on 15:56:29 Jul 20 2015 with gcc 4.4.7

Thank you for your support

BR
José Seabra

2015-07-20 16:58 GMT+01:00 Daniel-Constantin Mierla mico...@gmail.com:

 Hello,

 the names of columns should be quoted in order to be safe against
 reserved keywords.

 What is the exact version you are using (kamailio -v)?

 Cheers,
 Daniel

 On 20/07/15 17:37, José Seabra wrote:
  Hello Daniel,
 
  After update my kamailio to version 4.3 and change the table location
  as required in migration process, kamailio start giving some errors:
 
  [root@ccp1 kamailio]# 35(7637) ERROR: db_mysql [km_dbase.c:121]:
  db_mysql_submit_query(): driver error on query: Unknown column
  'partition' in 'where clause'
  35(7637) ERROR: core [db_query.c:132]: db_do_query_internal(): error
  while submitting query
 
  that's is because the column name partition is reserved word
  (http://dev.mysql.com/doc/refman/5.6/en/keywords.html) in mysql
  ndbcluster engine, so what i did to fix this issue was add a new
  modparam in
  modules/usrloc/ul_mod.c file:
 
  {partition_col,   PARAM_STR, partition_col},
 
 
  with this i can configure what name i want for this column in kamailio
  module configuration and configure a diferent column name in  table
  location(ex: modparam(usrloc, partition_col, partitionusrloc) ),
   Can you please check out if what i did is the correct way to fix it,
  in order to avoid damage something else.
 
  Best regards
  --
  Cumprimentos
  José Seabra

 --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Book: SIP Routing With Kamailio - http://www.asipto.com




-- 
Cumprimentos
José Seabra
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio 4.3v partition column name is reserved word in mysq ndbcluster engine

2015-07-20 Thread José Seabra
I changed the column name in the database table from partition to
partitionusrloc, and i added a new modparam (partition_col) in
modules/usrloc/ul_mod.c  file:

{partition_col,   PARAM_STR, partition_col},


in order to be able to configure the name of this column from partition to
partitionusrloc in kamailio module configuration section, with following
configuration:

modparam(usrloc, partition_col, partitionusrloc)

I will enable the mysql log then collect the query log, and reply back to
you with this information.

BR
Thank you.

2015-07-20 17:24 GMT+01:00 Daniel-Constantin Mierla mico...@gmail.com:

  Hello,

 the backticks should be added for columns in where condition. Can you
 enable logging the query in mysql server logs and send it over to see how
 it looks?

 Or maybe I didn't understand your problem properly and you changed the
 name in the database table for column partition, but there was no way to
 change that to usrloc module?

 Cheers,
 Daniel


 On 20/07/15 18:04, José Seabra wrote:

 Hello Daniel,

  Result of command kamailio -v

  version: kamailio 4.3.1 (x86_64/linux) f38e67-dirty
  flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
 DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
 F_MALLOC, DBG_F_MALLOC, 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: f38e67 -dirty
 compiled on 15:56:29 Jul 20 2015 with gcc 4.4.7

  Thank you for your support

  BR
 José Seabra

 2015-07-20 16:58 GMT+01:00 Daniel-Constantin Mierla mico...@gmail.com:

 Hello,

 the names of columns should be quoted in order to be safe against
 reserved keywords.

 What is the exact version you are using (kamailio -v)?

 Cheers,
 Daniel

 On 20/07/15 17:37, José Seabra wrote:
  Hello Daniel,
 
  After update my kamailio to version 4.3 and change the table location
  as required in migration process, kamailio start giving some errors:
 
  [root@ccp1 kamailio]# 35(7637) ERROR: db_mysql [km_dbase.c:121]:
  db_mysql_submit_query(): driver error on query: Unknown column
  'partition' in 'where clause'
  35(7637) ERROR: core [db_query.c:132]: db_do_query_internal(): error
  while submitting query
 
  that's is because the column name partition is reserved word
  (http://dev.mysql.com/doc/refman/5.6/en/keywords.html) in mysql
   ndbcluster engine, so what i did to fix this issue was add a new
  modparam in
  modules/usrloc/ul_mod.c file:
 
  {partition_col,   PARAM_STR, partition_col},
 
 
  with this i can configure what name i want for this column in kamailio
  module configuration and configure a diferent column name in  table
  location(ex: modparam(usrloc, partition_col, partitionusrloc) ),
   Can you please check out if what i did is the correct way to fix it,
  in order to avoid damage something else.
 
  Best regards
  --
  Cumprimentos
  José Seabra

  --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Book: SIP Routing With Kamailio - http://www.asipto.com




  --
 Cumprimentos
 José Seabra


 --
 Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/miconda
 Book: SIP Routing With Kamailio - http://www.asipto.com




-- 
Cumprimentos
José Seabra
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RR module - Fail detecting strict routing

2015-07-20 Thread Daniel-Constantin Mierla
Hello,

I didn't have time to look at it so far -- quite some traveling lately.
At a quick look, seems that the next hop is not detected as strict
router, I have to look at the code.

Cheers,
Daniel

On 20/07/15 11:20, Antonio Reale wrote:
 Hi Daniel,
 did you see something strange in the ACK message or you confirm that
 the RR module is not behaving correctly?

 Thanks.
 Regards.

 Antonio


 Il 14/07/2015 13:02, Antonio Reale ha scritto:
 Hi Daniel,

 this is the ACK received on Kamailio:

 #
 U 172.26.130.235:44435 - 192.168.0.245:5060
 ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp
 SIP/2.0
 Via: SIP/2.0/UDP
 172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z-
 Max-Forwards: 70
 Route: sip:192.168.0.245;lr
 Route: sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
 Contact: sip:10@172.26.130.235:44435;transport=UDP
 To: sip:11@192.168.0.245;transport=UDP;tag=516145211
 From: sip:10@192.168.0.245;transport=UDP;tag=a56ac352
 Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY.
 CSeq: 2 ACK
 Proxy-Authorization: Digest
 username=10,realm=192.168.0.245,nonce=VaTXblWk1kKUxIMJBdWbpRBBCP850QVR,uri=sip:11@192.168.0.245;transport=UDP,response=1daf03c97b8a12e0154d463f543e5592,algorithm=MD5
 User-Agent: Z 3.6.25251 r25476
 Content-Length: 0

 and this the ACK forwarded by Kamailio to P2

 #
 U 192.168.0.245:5060 - 192.168.0.101:5060
 ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp
 SIP/2.0
 Via: SIP/2.0/UDP
 192.168.0.245;branch=z9hG4bKa252.cc67d8b538d8ad5c01c3e75d472653ec.0
 Via: SIP/2.0/UDP
 172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z-
 Max-Forwards: 69
 Route: sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
 Contact: sip:10@172.26.130.235:44435;transport=UDP
 To: sip:11@192.168.0.245;transport=UDP;tag=516145211
 From: sip:10@192.168.0.245;transport=UDP;tag=a56ac352
 Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY.
 CSeq: 2 ACK
 Proxy-Authorization: Digest
 username=10,realm=192.168.0.245,nonce=VaTXblWk1kKUxIMJBdWbpRBBCP850QVR,uri=sip:11@192.168.0.245;transport=UDP,response=1daf03c97b8a12e0154d463f543e5592,algorithm=MD5
 User-Agent: Z 3.6.25251 r25476
 Content-Length: 0


 Kamailio considers P2 a loose router so the R-URI is not changed.

 Thanks.
 Regards.

 Antonio


 Il 14/07/2015 12:28, Daniel-Constantin Mierla ha scritto:
 Hello,

 what is the request URI? It might be better to just paste here the full
 ACK message.

 Cheers,
 Daniel

 On 14/07/15 12:25, Antonio Reale wrote:
 Sorry,
 here's the Route HF present in the ACK received from U1:

 Route: sip:192.168.0.245;lr
 Route:
 sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e

 Regards.

 Antonio



 Il 14/07/2015 12:09, Antonio Reale ha scritto:
 Hi all,
 I have the following  scenario:
 U1 (caller) --- P1 (192.168.0.245, kamailio 4.3, loose-router) 
 P2  (192.168.0.101, strict router)    U2 (called)

 When U2 answers the call, at P1 arrives the 200 OK with:
 Record-Route:
 sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
 Record-Route: sip:192.168.0.245;lr=on

 The problem is that the ACK from U1 is forwarded from kamailio to P2,
 as if P2 is a loose router. P2 drops the ACK message.

  From kamailio logs I see:
 Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:88]:
 is_preloaded(): is_preloaded: No
 Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
 [loose.c:783]: after_loose(): Topmost route URI:
 'sip:192.168.0.245;lr=on' is me
 Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
 [loose.c:869]: after_loose(): URI to be processed:
 'sip:11@192.168.0.101;transport=udp;pgw-call=call-289ce'
 Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
 [loose.c:878]: after_loose(): Next URI is a loose router

 Why after_loose function considers the next URI a loose router? The
 Route HF in the ACK with the URI of the next hop does not contain
 ;lr .
 It seems that the function is_strict fails detecting the strict
 router.

 Thanks.

 Regards.

 Antonio

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
 list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RR module - Fail detecting strict routing

2015-07-20 Thread Antonio Reale

Hi Daniel,
no problem.

Thank you very much for the support.

Regards.

Antonio


Il 20/07/2015 18:02, Daniel-Constantin Mierla ha scritto:

Hello,

I didn't have time to look at it so far -- quite some traveling lately.
At a quick look, seems that the next hop is not detected as strict
router, I have to look at the code.

Cheers,
Daniel

On 20/07/15 11:20, Antonio Reale wrote:

Hi Daniel,
did you see something strange in the ACK message or you confirm that
the RR module is not behaving correctly?

Thanks.
Regards.

Antonio


Il 14/07/2015 13:02, Antonio Reale ha scritto:

Hi Daniel,

this is the ACK received on Kamailio:

#
U 172.26.130.235:44435 - 192.168.0.245:5060
ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp
SIP/2.0
Via: SIP/2.0/UDP
172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z-
Max-Forwards: 70
Route: sip:192.168.0.245;lr
Route: sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
Contact: sip:10@172.26.130.235:44435;transport=UDP
To: sip:11@192.168.0.245;transport=UDP;tag=516145211
From: sip:10@192.168.0.245;transport=UDP;tag=a56ac352
Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY.
CSeq: 2 ACK
Proxy-Authorization: Digest
username=10,realm=192.168.0.245,nonce=VaTXblWk1kKUxIMJBdWbpRBBCP850QVR,uri=sip:11@192.168.0.245;transport=UDP,response=1daf03c97b8a12e0154d463f543e5592,algorithm=MD5
User-Agent: Z 3.6.25251 r25476
Content-Length: 0

and this the ACK forwarded by Kamailio to P2

#
U 192.168.0.245:5060 - 192.168.0.101:5060
ACK sip:7240F8EF-55A4D642000CBC22-8A135700@172.16.0.21;transport=udp
SIP/2.0
Via: SIP/2.0/UDP
192.168.0.245;branch=z9hG4bKa252.cc67d8b538d8ad5c01c3e75d472653ec.0
Via: SIP/2.0/UDP
172.26.130.235:44435;branch=z9hG4bK-d8754z-1cd3a01fa9171649-1---d8754z-
Max-Forwards: 69
Route: sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
Contact: sip:10@172.26.130.235:44435;transport=UDP
To: sip:11@192.168.0.245;transport=UDP;tag=516145211
From: sip:10@192.168.0.245;transport=UDP;tag=a56ac352
Call-ID: NGU5YmUzMGYwM2RmMzc0YTQyNDRmZWZlOWJmMTA0ZjY.
CSeq: 2 ACK
Proxy-Authorization: Digest
username=10,realm=192.168.0.245,nonce=VaTXblWk1kKUxIMJBdWbpRBBCP850QVR,uri=sip:11@192.168.0.245;transport=UDP,response=1daf03c97b8a12e0154d463f543e5592,algorithm=MD5
User-Agent: Z 3.6.25251 r25476
Content-Length: 0


Kamailio considers P2 a loose router so the R-URI is not changed.

Thanks.
Regards.

Antonio


Il 14/07/2015 12:28, Daniel-Constantin Mierla ha scritto:

Hello,

what is the request URI? It might be better to just paste here the full
ACK message.

Cheers,
Daniel

On 14/07/15 12:25, Antonio Reale wrote:

Sorry,
here's the Route HF present in the ACK received from U1:

Route: sip:192.168.0.245;lr
Route:
sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e

Regards.

Antonio



Il 14/07/2015 12:09, Antonio Reale ha scritto:

Hi all,
I have the following  scenario:
U1 (caller) --- P1 (192.168.0.245, kamailio 4.3, loose-router) 
P2  (192.168.0.101, strict router)    U2 (called)

When U2 answers the call, at P1 arrives the 200 OK with:
Record-Route:
sip:11@192.168.0.101;transport=udp;pgw-call=call-28d2e
Record-Route: sip:192.168.0.245;lr=on

The problem is that the ACK from U1 is forwarded from kamailio to P2,
as if P2 is a loose router. P2 drops the ACK message.

  From kamailio logs I see:
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr [loose.c:88]:
is_preloaded(): is_preloaded: No
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
[loose.c:783]: after_loose(): Topmost route URI:
'sip:192.168.0.245;lr=on' is me
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
[loose.c:869]: after_loose(): URI to be processed:
'sip:11@192.168.0.101;transport=udp;pgw-call=call-289ce'
Jul 14 10:07:44 P1 /usr/sbin/kamailio[15908]: DEBUG: rr
[loose.c:878]: after_loose(): Next URI is a loose router

Why after_loose function considers the next URI a loose router? The
Route HF in the ACK with the URI of the next hop does not contain
;lr .
It seems that the function is_strict fails detecting the strict
router.

Thanks.

Regards.

Antonio

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] kamailio 4.3v partition column name is reserved word in mysq ndbcluster engine

2015-07-20 Thread José Seabra
Hello Daniel,

After update my kamailio to version 4.3 and change the table location as
required in migration process, kamailio start giving some errors:

[root@ccp1 kamailio]# 35(7637) ERROR: db_mysql [km_dbase.c:121]:
db_mysql_submit_query(): driver error on query: Unknown column 'partition'
in 'where clause'
35(7637) ERROR: core [db_query.c:132]: db_do_query_internal(): error
while submitting query

that's is because the column name partition is reserved word (
http://dev.mysql.com/doc/refman/5.6/en/keywords.html) in mysql ndbcluster
engine, so what i did to fix this issue was add a new modparam in
modules/usrloc/ul_mod.c file:

{partition_col,   PARAM_STR, partition_col},


with this i can configure what name i want for this column in kamailio
module configuration and configure a diferent column name in  table
location(ex: modparam(usrloc, partition_col, partitionusrloc) ),  Can
you please check out if what i did is the correct way to fix it, in order
to avoid damage something else.

Best regards
-- 
Cumprimentos
José Seabra
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] usage of t_flush_flags() in event_route

2015-07-20 Thread Daniel-Constantin Mierla
Hello,

grepping quickly the sources, it appears that the flags are propagated
back in transaction, see:

modules/tm/t_reply.c:1060

I think the issue resides in the acc design, that prepares the request
for accounting when the transaction is created, only if one of the
accounting flags is set. It might be required to add a parameter to acc
module for 'prepare always for accounting'.

Cheers,
Daniel

On 20/07/15 12:56, Andrew Pogrebennyk wrote:
 Hi,
 ideas anyone?

 BR,
 Andrew

 On 06/17/2015 12:12 PM, Andrew Pogrebennyk wrote:
 Daniel,
 I'm reviving this old thread..

 On 05/27/2015 01:40 PM, Andrew Pogrebennyk wrote:
 thanks for the answer, that's what I was thinking - maybe the flags do
 not persist or are destroyed after the per-branch failure route.

 However, the t_flush_flags description says this function can be used in
 any route, so in should be fixed in the long term.. Let me check if I
 can come up with some workaround in config script for the time being.
 I didn't manage to come up with any workaround so far.

 The problem appears if the initial call leg coming from, let's say, the
 application server didn't have the accounting flags set. Long story put
 short, if the UA responds with the 302 response and we are going to
 process that, we want to create an acc record for the new target from
 302 message because this call may incur additional costs.

 I'm setting the accounting flags and even calling t_flush_flags() but
 that doesn't work (no accounting record for INVITE with Call-ID:
 rOemTINsCbQspe1Vlje9nAK15SNy0DdV_pbx-1).

 if($var(redirected_forward) == 1)
 {
 setflag(FLAG_ACC_FAILED);
 setflag(FLAG_ACC_DB);
 t_flush_flags();
 }

 From attached log:
 root@sp2:~# grep -i acc kamailio.log
 Jun 17 11:49:38 sp2 proxy[12702]: INFO: script: Set callee dialogs: user, 
 account to 'e59611e6-01de-424c-a04f-e977409c54f6/64' - 
 R=sip:te...@demo.mylocal.com ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV
 Jun 17 11:49:38 sp2 proxy[12702]: INFO: script: Set callee dialogs: 
 totaluser, totalaccount to 'e59611e6-01de-424c-a04f-e977409c54f6/64' - 
 R=sip:te...@demo.mylocal.com ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV
 Jun 17 11:49:38 sp2 proxy[12702]: INFO: script: Set caller dialogs: 
 totaluser, totaluserout, totalaccount, totalaccountout to 
 '0214786f-eb1c-4865-95ba-65d8c1c0bf32/48' - R=sip:te...@demo.mylocal.com 
 ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV
 Jun 17 11:49:38 sp2 proxy[12702]: INFO: script: Set caller dialogs: user, 
 userout, account, accountout to '0214786f-eb1c-4865-95ba-65d8c1c0bf32/48' - 
 R=sip:te...@demo.mylocal.com ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV
 Jun 17 11:49:38 sp2 proxy[12702]: NOTICE: script: Setting acc source-leg 
 for uuid '0214786f-eb1c-4865-95ba-65d8c1c0bf32': 
 '0214786f-eb1c-4865-95ba-65d8c1c0bf32|phone2|xxx.demo.mylocal.com|43221000202|||48|||0|call|77.244.249.126|1434534578.107169|||'
  - R=sip:te...@demo.mylocal.com ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV
 Jun 17 11:49:38 sp2 proxy[12702]: NOTICE: script: ++ 2. ACC flag is 
 set - R=sip:te...@demo.mylocal.com ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV
 Jun 17 11:49:38 sp2 proxy[12702]: NOTICE: script: Setting acc 
 destination-leg for uuid 'e59611e6-01de-424c-a04f-e977409c54f6': 
 '0||comx|64|000439911|e59611e6-01de-424c-a04f-e977409c54f6|test1|demo.mylocal.com|439911|xxx.demo.mylocal.com|0|||'
  - R=sip:te...@demo.mylocal.com ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV
 Jun 17 11:49:38 sp2 proxy[12695]: DEBUG: acc [acc_logic.c:615]: 
 tmcb_func(): acc callback called for t(0x7f421c8da308) event type 2, reply 
 code 100
 Jun 17 11:49:38 sp2 proxy[12698]: INFO: script: Skip accounting for call 
 from PBX to device - R=sip:te...@demo.mylocal.com 
 ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV_pbx-1
 ^^^
 Jun 17 11:49:38 sp2 proxy[12699]: DEBUG: acc [acc_logic.c:615]: 
 tmcb_func(): acc callback called for t(0x7f421c8da308) event type 2, reply 
 code 180
 Jun 17 11:49:38 sp2 proxy[12699]: DEBUG: acc [acc_logic.c:615]: 
 tmcb_func(): acc callback called for t(0x7f421c8da308) event type 512, 
 reply code 180
 Jun 17 11:49:40 sp2 proxy[12695]: NOTICE: script: -- 1. ACC flag is 
 NOT set - R=sip:test1@10.15.20.112:5060 
 ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV_pbx-1
 Jun 17 11:49:40 sp2 proxy[12695]: INFO: script: Set callee dialogs: user, 
 account to '72d04db7-6fd2-47c3-95a7-5685a5297715/64' - 
 R=sip:te...@demo.mylocal.com;alias=77.244.249.126~6774~1 
 ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV_pbx-1
 Jun 17 11:49:40 sp2 proxy[12695]: INFO: script: Set callee dialogs: 
 totaluser, totalaccount to '72d04db7-6fd2-47c3-95a7-5685a5297715/64' - 
 R=sip:te...@demo.mylocal.com;alias=77.244.249.126~6774~1 
 ID=rOemTINsCbQspe1Vlje9nAK15SNy0DdV_pbx-1
 Jun 17 11:49:40 sp2 proxy[12695]: INFO: script: Set caller dialogs: 
 totaluser, totaluserout, totalaccount, totalaccountout to 
 'e59611e6-01de-424c-a04f-e977409c54f6/64' - R=sip:25704386@10.10.8.52:46637 

Re: [SR-Users] kamailio 4.3v partition column name is reserved word in mysq ndbcluster engine

2015-07-20 Thread Daniel-Constantin Mierla
Hello,

the backticks should be added for columns in where condition. Can you
enable logging the query in mysql server logs and send it over to see
how it looks?

Or maybe I didn't understand your problem properly and you changed the
name in the database table for column partition, but there was no way to
change that to usrloc module?

Cheers,
Daniel

On 20/07/15 18:04, José Seabra wrote:
 Hello Daniel,

 Result of command kamailio -v

 version: kamailio 4.3.1 (x86_64/linux) f38e67-dirty
 flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
 USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
 SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, 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: f38e67 -dirty
 compiled on 15:56:29 Jul 20 2015 with gcc 4.4.7

 Thank you for your support

 BR
 José Seabra

 2015-07-20 16:58 GMT+01:00 Daniel-Constantin Mierla mico...@gmail.com
 mailto:mico...@gmail.com:

 Hello,

 the names of columns should be quoted in order to be safe against
 reserved keywords.

 What is the exact version you are using (kamailio -v)?

 Cheers,
 Daniel

 On 20/07/15 17:37, José Seabra wrote:
  Hello Daniel,
 
  After update my kamailio to version 4.3 and change the table
 location
  as required in migration process, kamailio start giving some errors:
 
  [root@ccp1 kamailio]# 35(7637) ERROR: db_mysql [km_dbase.c:121]:
  db_mysql_submit_query(): driver error on query: Unknown column
  'partition' in 'where clause'
  35(7637) ERROR: core [db_query.c:132]: db_do_query_internal():
 error
  while submitting query
 
  that's is because the column name partition is reserved word
  (http://dev.mysql.com/doc/refman/5.6/en/keywords.html) in mysql
  ndbcluster engine, so what i did to fix this issue was add a new
  modparam in
  modules/usrloc/ul_mod.c file:
 
  {partition_col,   PARAM_STR, partition_col},
 
 
  with this i can configure what name i want for this column in
 kamailio
  module configuration and configure a diferent column name in  table
  location(ex: modparam(usrloc, partition_col,
 partitionusrloc) ),
   Can you please check out if what i did is the correct way to
 fix it,
  in order to avoid damage something else.
 
  Best regards
  --
  Cumprimentos
  José Seabra

 --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda http://twitter.com/#%21/miconda -
 http://www.linkedin.com/in/miconda
 Book: SIP Routing With Kamailio - http://www.asipto.com




 -- 
 Cumprimentos
 José Seabra

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dialog keepalive timeout - which parameter rules it?

2015-07-20 Thread Andrey Utkin
What happens if dialog parties don't respond to keepalive requests
sent by dialog module? It looks it is not coded in modules/dialog, I
guess it can be set in t_uac_prepare() from modules/tm/uac.c.
Please explain what timeout or lifetime parameters rule - at which
delay the unanswered keepalive request sent by Kamailio within dialog
triggers dialog termination.
Thanks a lot.

-- 
Andrey Utkin

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Changing acc_cdrs time and duration columns from varchar to int/float

2015-07-20 Thread mayamatakeshi
Hello,
I am planning to enable acc cdr in my kamailio 4.1 server.
I am testing in my lab and it is working fine.
However, when I check the table definition I see this:

mysql describe acc_cdrs;
++--+--+-+-++
| Field  | Type | Null | Key | Default | Extra  |
++--+--+-+-++
| id | int(10) unsigned | NO   | PRI | NULL| auto_increment |
| start_time | varchar(32)  | NO   | MUL | ||
| end_time   | varchar(32)  | NO   | | ||
| duration   | varchar(32)  | NO   | | ||
++--+--+-+-++
4 rows in set (0.00 sec)


The *_time and duration columns are defined as varchar.
Because of this, i need to perform a cast when doing queries:
  select * from acc_cdrs where cast(start_time as unsigned) = 1437120622;
which would cause extra processing in the db server.

So I experimented changing these columns to int unsigned and to float
unsigned and it worked for both without problems (records properly added
to acc_cdrs and no errors in kamailio.log):

alter table acc_cdrs modify start_time int unsigned;
alter table acc_cdrs modify end_time int unsigned;
alter table acc_cdrs modify duration int unsigned;

alter table acc_cdrs modify start_time float unsigned;
alter table acc_cdrs modify end_time float unsigned;
alter table acc_cdrs modify duration float unsigned;

So I am thinking in doing this in my production server but I would like to
know if there is any potential risk of doing this (as I am not sure why it
was decided for these fields to be varchar instead of a numeric type).

Regards,
Takeshi
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Changing acc_cdrs time and duration columns from varchar to int/float

2015-07-20 Thread mayamatakeshi
On Tue, Jul 21, 2015 at 6:35 AM, mayamatakeshi mayamatake...@gmail.com
wrote:

 Hello,
 I am planning to enable acc cdr in my kamailio 4.1 server.
 I am testing in my lab and it is working fine.
 However, when I check the table definition I see this:

 mysql describe acc_cdrs;
 ++--+--+-+-++
 | Field  | Type | Null | Key | Default | Extra  |
 ++--+--+-+-++
 | id | int(10) unsigned | NO   | PRI | NULL| auto_increment |
 | start_time | varchar(32)  | NO   | MUL | ||
 | end_time   | varchar(32)  | NO   | | ||
 | duration   | varchar(32)  | NO   | | ||
 ++--+--+-+-++
 4 rows in set (0.00 sec)


 The *_time and duration columns are defined as varchar.
 Because of this, i need to perform a cast when doing queries:
   select * from acc_cdrs where cast(start_time as unsigned) = 1437120622;
 which would cause extra processing in the db server.

 So I experimented changing these columns to int unsigned and to float
 unsigned and it worked for both without problems (records properly added
 to acc_cdrs and no errors in kamailio.log):

 alter table acc_cdrs modify start_time int unsigned;
 alter table acc_cdrs modify end_time int unsigned;
 alter table acc_cdrs modify duration int unsigned;

 alter table acc_cdrs modify start_time float unsigned;
 alter table acc_cdrs modify end_time float unsigned;
 alter table acc_cdrs modify duration float unsigned;


Actually, checking again, they should not be a float unsigned but double
unsigned:

alter table acc_cdrs modify start_time double unsigned;
alter table acc_cdrs modify end_time double unsigned;
alter table acc_cdrs modify duration double unsigned;




 So I am thinking in doing this in my production server but I would like to
 know if there is any potential risk of doing this (as I am not sure why it
 was decided for these fields to be varchar instead of a numeric type).

 Regards,
 Takeshi

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] RFC: about the self signed tls certificates

2015-07-20 Thread Victor Seva
On 07/20/2015 08:58 PM, Daniel-Constantin Mierla wrote:
 My proposal is to move generation of self signed certificates to kamctl.
 There can be a kamctl.tls file to be deployed by the tls package (same
 is done by kamctl.mysql, being part of mysql package), which should add
 a new group of commands, among them something like:
 
 kamctl tls generate-certificate

 Anyone with comments, pros/cons?

+1 kamctl tls approach



signature.asc
Description: OpenPGP digital signature
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users