Re: [SR-Users] how can I use WITH_IPAUTH when the IP may be stored in the DB as a FQDN?

2015-03-08 Thread Sergey Okhapkin
Authentication by IP address must be done by IP address only, DNS names must 
not be allowed. Period. By definition.

What you want can be achieved with dns_int_match_ip() function provided by 
ipops module. But keep in mind it is slow because of DNS lookup.

On Sunday 08 March 2015 13:38:52 canuck15 wrote:
 Here is is the relevant section of kamailio.cfg
 
 $var(tempfU) = $fU;
 #!ifdef WITH_IPAUTH
  if((!is_method(REGISTER))  allow_source_address()  $au == )
  {
  # Loading $fU from database using IP
 
  sql_pvquery(elxpbx, SELECT name FROM sip WHERE host = '$si'
 AND sippasswd IS NULL, $var(tempfU));
 
  # source IP allowed
  return;
  }
 
 The problem is that when host= somefqdn.com the above will fail since
 $si will always be an IP address as far as I can tell.  More often than
 not host= is a fqdn and requiring it to always be an IP address is not
 an option.  Converting it to IP before storing it in the DB is also not
 an option because it needs to be able to work of the IP address changes.
 
 So how can the above be done to accomodate the possibility that host=
 somefqdn.com or an IP address.  Preferably in such a way that it can
 scale to hundreds/thousands of rows in the database without slowing
 things down or crashing.
 
 
 ___
 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] how can I use WITH_IPAUTH when the IP may be stored in the DB as a FQDN?

2015-03-08 Thread canuck15

Here is is the relevant section of kamailio.cfg

$var(tempfU) = $fU;
#!ifdef WITH_IPAUTH
if((!is_method(REGISTER))  allow_source_address()  $au == )
{
# Loading $fU from database using IP

sql_pvquery(elxpbx, SELECT name FROM sip WHERE host = '$si' 
AND sippasswd IS NULL, $var(tempfU));


# source IP allowed
return;
}

The problem is that when host= somefqdn.com the above will fail since 
$si will always be an IP address as far as I can tell.  More often than 
not host= is a fqdn and requiring it to always be an IP address is not 
an option.  Converting it to IP before storing it in the DB is also not 
an option because it needs to be able to work of the IP address changes.


So how can the above be done to accomodate the possibility that host= 
somefqdn.com or an IP address.  Preferably in such a way that it can 
scale to hundreds/thousands of rows in the database without slowing 
things down or crashing.



___
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] Dialog order of operations

2015-03-08 Thread Alex Balashov
Well, I can say this: it seems that dlg_set_property(ka-{src,dst}) 
must be set after dlg_manage(), or it has no effect.


--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States

Tel: +1-678-954-0670
Web: http://www.evaristesys.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] kamailio asterisk

2015-03-08 Thread Slava Bendersky
Hello Everyone, 
I set up tcp and udp for right now to test all config and dialog is not 
established correctly. Call between extensions not working. Call from 
extesnsion to extension going right a way to voicemail. Any help thank you. 
Here one call debug. 

http://fpaste.org/195572/14258553/ 



Slava. 


From: Slava Bendersky volga...@networklab.ca 
To: mico...@gmail.com 
Cc: sr-users sr-users@lists.sip-router.org 
Sent: Tuesday, March 3, 2015 9:08:19 AM 
Subject: Re: [SR-Users] kamailio asterisk 

Hello Daniel, 
Is notify should follow subscribe routes ? 
Here SUBSCRIBE completely look normal to me. 

--- SIP read from UDP:10.18.130.46:5060 --- 
SUBSCRIBE sip:10...@networklab.ca SIP/2.0 
Record-Route: 
sip:kamailio_pub_ip:5081;transport=tls;lr=on;ftag=08c99307d3;nat=yes 
Accept: application/simple-message-summary 
Via: SIP/2.0/UDP 
10.18.130.46;branch=z9hG4bKdee2.b83c2028dc57c641d2b8cad968347d6a.0;i=2 
Via: SIP/2.0/TLS 
192.168.0.16:5063;rport=5063;received=client_pub_ip;branch=z9hG4bK0c54032bd8905d262
 
Max-Forwards: 69 
From: 10102 sips:10...@networklab.ca;tag=08c99307d3 
To: sips:10...@networklab.ca 
Call-ID: cea703eb8c21f709 
CSeq: 1096440084 SUBSCRIBE 
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, 
UPDATE 
Allow-Events: message-summary 
Authorization: Digest 
username=10102,realm=networklab.ca,nonce=29ac01f1,uri=sips:10...@networklab.ca,response=0298c2a93bdd4969a3cd0b757d671dbb,algorithm=MD5
 
Contact: sips:10102@client_pub_ip:5063;audio 
Event: message-summary 
Expires: 3600 
Supported: eventlist, replaces, timer 
User-Agent: Media5-fone/4.1.6.3283 Android/4.1.2 
Content-Length: 0 
Path: 
sip:outbound@10.18.130.46;lr;received=sip:client_pub_ip:5063%3Btransport%3Dtls
 
P-hint: outbound 

Slava 


From: Daniel-Constantin Mierla mico...@gmail.com 
To: Slava Bendersky volga...@networklab.ca 
Cc: sr-users sr-users@lists.sip-router.org 
Sent: Tuesday, March 3, 2015 1:50:03 AM 
Subject: Re: [SR-Users] kamailio asterisk 

Hello, 

I pushed a fix for it -- the issue was in a LM_DBG() trying to print te address 
for local socket, but it was not set yet, it was affecting only when running in 
debug mode with debug=3. I pushed the patch to branch 4.2, so if you want the 
fix, then you have to install from git branch 4.2. 

For REGISTER, you need to add the Path header (see path module), otherwise the 
OPTIONS and INVITE sent out to the phone are not going via Kamailio. You have 
to check the version of your Asterisk to be one that supports Path. 

Cheers, 
Daniel 

On 27/02/15 14:40, Slava Bendersky wrote: 



Hello Daniel, 
Here paste for gdb 

http://fpaste.org/191338/25043949/ 

I got REGISTER and SUBSCRIBE start working correctly I see on asterisk correct 
record routes and sip traffic flow, but when asterisk or client ( soft phone) 
send OPTIONS or NOTIFY can't get properly relay it. 

This is SUBSCRIBE route. 

--- Transmitting (NAT) to 10.18.130.46:5060 --- 
SIP/2.0 200 OK 
Via: SIP/2.0/UDP 
10.18.130.46;branch=z9hG4bKf852.e0223f39c2bbad8366fdf1b7cb22b336.0;i=8;received=10.18.130.46;rport=5060
 
Via: SIP/2.0/TLS 192.168.88.252:5062;received=Client public 
ip;branch=z9hG4bK0bbe1f7d27257bba9;rport=5062 
Record-Route: sip:10.18.130.46;r2=on;lr=on;ftag=a185d974ec;nat=yes 
Record-Route: 
sip:PUBLIC_KAMAILIO_IP:5081;transport=tls;r2=on;lr=on;ftag=a185d974ec;nat=yes 
From: Slava Bendersky sips:10...@networklab.ca ;tag=a185d974ec 
To: sips:10...@networklab.ca ;tag=as00757d3e 
Call-ID: b08adb1ad1804a83 
CSeq: 236711034 SUBSCRIBE 
Server: FPBX-2.11.0(11.15.1) 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE 
Supported: replaces, timer 
Expires: 3600 
Contact: sip:10101@10.18.130.50:5060 ;expires=3600 
Content-Length: 0 

Slava. 


From: Daniel-Constantin Mierla mico...@gmail.com 
To: Slava Bendersky volga...@networklab.ca 
Cc: sr-users sr-users@lists.sip-router.org 
Sent: Friday, February 27, 2015 6:42:33 AM 
Subject: Re: [SR-Users] kamailio asterisk 

Hello, 

I asked for the wrong command, as the bt full was already sent before -- I 
wanted the output from gdb for: 

p *tcpconn 

Daniel 


On 27/02/15 04:10, Slava Bendersky wrote: 

BQ_BEGIN

Hello Daniel, 
Here bt full from back trace. 

http://fpaste.org/191207/50064491/ 

Slava. 


From: volga629 volga...@skillsearch.ca 
To: mico...@gmail.com , Slava Bendersky volga...@networklab.ca 
Cc: sr-users sr-users@lists.sip-router.org 
Sent: Thursday, February 26, 2015 9:56:48 PM 
Subject: Re: [SR-Users] kamailio asterisk 

Hello Daniel, 
I tried $rz option on top of request route and that where I see wrong request 
uri like sip:sips : . And as far I can see it happenes only for SUBSCRIBE 
INVITE and NOTIFY. 

if($rz==sips) { 
$ru = sip + $(ru{s.substr,4,0}); 
} 

Slava. 

Sent from mobile device typos are expected. 

From: Daniel-Constantin Mierla mico...@gmail.com 
Sent: Feb 25, 2015 1:04 PM 
To: Slava Bendersky 
Cc: sr-users 
Subject: Re: [SR-Users] kamailio asterisk 


Hello, 

On 

Re: [SR-Users] RTPProxy issue?

2015-03-08 Thread Igor Potjevlesch
Hello Maxim,

 

I'm running legacy 1.2 or 1.4, not sure.

I see in the latest code that the function is still there. Do you suggest to 
upgrade or there's a patch to make?

 

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de 
Maxim Sobolev
Envoyé : samedi 7 mars 2015 09:14
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] RTPProxy issue?

 

Ah, ok, I see now. I did not realize you guys are using resizer. Which version 
of the software are you actually using? I.e. is it latest rel_2_0 / master, or 
some legacy 1.x code? We've done quite some revamping down there, so that it 
needs to be checked against the very latest code to make sure. Let us know.

Thanks!

On Mar 6, 2015 12:31 AM, Igor Potjevlesch igor.potjevle...@gmail.com 
mailto:igor.potjevle...@gmail.com  wrote:

Hi Maxim,

 

Hard to do because it's in production.

I have a serious finding since yesterday on how this happened. 

 

My understanding is that the function ts_less returns FALSE into 
rtp_resizer.c because the timestamp between the two packets is  (1  31) 
[for example: 3740425320].

That's result in a drop of any following packets as I can see it into a capture.

 

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org 
mailto:sr-users-boun...@lists.sip-router.org ] De la part de Maxim Sobolev
Envoyé : vendredi 6 mars 2015 07:44
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] RTPProxy issue?

 

Hi Igor, that's bit strange, since the rtpproxy is not checking any of the rtp 
flags including marker bit. It would help if you can post a tcpdump capture of 
the streams in question along with the log output of the rtpproxy running at 
the dbug level. Thanks!

On Mar 5, 2015 5:54 AM, Igor Potjevlesch igor.potjevle...@gmail.com 
mailto:igor.potjevle...@gmail.com  wrote:

I reviewed again a call trace and I can be more precise: a RTP packet comes 
with a new SSRC and the Marker bit set to True. This packet is properly 
forwarded.

 

Then, just after this packet, another RTP packet containing a new SSRC with the 
huge timestamp and the Marker bit set to True is coming from the UA. 

The RTPProxy stops forward since this packet.

 

Regards,

 

Igor.

 

De : Igor Potjevlesch [mailto:igor.potjevle...@gmail.com 
mailto:igor.potjevle...@gmail.com ] 
Envoyé : jeudi 5 mars 2015 11:34
À : mico...@gmail.com mailto:mico...@gmail.com ; 'Kamailio (SER) - Users 
Mailing List'
Objet : RE: [SR-Users] RTPProxy issue?

 

Hello,

 

Thank you.

 

Just to let you know, the RTPProxy is running in bridging mode.

Regards,

 

Igor.

 

De : sr-users [mailto:sr-users-boun...@lists.sip-router.org] De la part de 
Daniel-Constantin Mierla
Envoyé : jeudi 5 mars 2015 09:33
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] RTPProxy issue?

 

Hello,

maybe Maxim (cc-ed) will be able to provide more insights.

Cheers,
DAniel

On 04/03/15 16:59, Igor Potjevlesch wrote:

Hello,

 

I discovered an issue related to the handling of timestamp and/or Marker 
bit with rtpproxy (I use the latest Extension 20081224).

 

The call-flow is the following: one UA places a call to A and put this call on 
hold. Then, the same UA call another number B. Individual streams are ok.

When the UA tries to transfer A with B, the RTPProxy receive a RTP packet with 
a huge timestamp and the Marker bit set to True.

 

Just after this RTP packet, RTPProxy stop forward the RTP packets from A to B. 
B to C is still working.

 

Anyone have an idea?

Regards,

 

Igor.

 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org mailto: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
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org mailto: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 mailto: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] 4.2.3 textops: flag f doesn't work in subst_hf(hf, subexp, flags)

2015-03-08 Thread Julia Boudniatsky
Hello,

I received INVITE with 3 Diversion headers.
I try to make substitutions in the body of a first Diversion header field
by using flag f,

command *subst_hf(Diversion, /sip:(.*)@/sip:$var(dU)@/, f) ;*
substitutes *all headers *Diversion instead of only first header,

command *subst_hf(Diversion, /sip:(.*)@/sip:$var(dU)@/, *l*) ;*
substitutes  only *last* Diversion header.

Thanks for help,
Julia.
___
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