Re: [SR-Users] [sr-dev] new module: gzcompress

2013-09-23 Thread James Cloos
> "DM" == Daniel-Constantin Mierla  writes:

DM> Also, I changed the default value of Content-Encoding header value
DM> from gzip (which I saw in rfc 3261) to deflate, which is used by
DM> FaceTime, but more important works with Firefox out of the box. Thus I
DM> assumed is the right value and should make the encoding compatible
DM> with Facetime (not that they do peering/federation over sip, but
DM> anyhow).

The gzip encoding tag means that the body is what one would get out of
running gzip(1) on the original data.  Ie, it includes the gzip(1)
headers, et alia, as specified in http://www.ietf.org/rfc/rfc1952.txt.

The deflate tag specifies that the data is DEFLATEd, but does not
include the extra gzip(1)-specific data.

The gzip scheme is meant for the case where the files are pre-compressed
external to the server, so that the server can send the files as is.

The deflate scheme is meant for cases like this where the data is
compressed on the fly.

So the change was the correct option.

-JimC
-- 
James Cloos  OpenPGP: 1024D/ED7DAEA6

___
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] unregister user when kamailio looses TCP connection.

2013-09-23 Thread Vitaliy Aleksandrov

On 09/23/2013 11:23 PM, Andreas Granig wrote:

Hi,

On 09/13/2013 11:27 AM, Daniel-Constantin Mierla wrote:

thanks, patch was commited and pushed to remote repository.


The patch only handles the case where a tcp connection is directly 
made to the registrar, as no event route is fired, right?
You are right. Current version works only when registrar accepts tcp 
connections.
Anyway it's a good idea to call event_route[] when kamailio looses a tcp 
connection to give user a chance to process it somehow.


On the one hand it's great when experienced user can achieve what he 
wants by different ways depending on the situation, but on the other it 
makes a mess for new kamailio 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] unregister user when kamailio looses TCP connection.

2013-09-23 Thread Andreas Granig

Hi,

On 09/13/2013 11:27 AM, Daniel-Constantin Mierla wrote:

thanks, patch was commited and pushed to remote repository.


The patch only handles the case where a tcp connection is directly made 
to the registrar, as no event route is fired, right?


Andreas

___
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] unsubscribe

2013-09-23 Thread Andres Paglayan





smime.p7s
Description: S/MIME Cryptographic 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


Re: [SR-Users] unsubscribe

2013-09-23 Thread Daniel-Constantin Mierla

Hello,

if you are looking to unsubscribe from mailing list, then go to the web 
page:

- http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

and use the last field in the form down the file - enter your email and 
wait for a message that is received via email as well that requires you 
to click a link to confirm the action.


Cheers,
Daniel

On 9/23/13 8:34 PM, Andres Paglayan wrote:





___
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://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
  - more details about Kamailio trainings at 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] [sr-dev] new module: gzcompress

2013-09-23 Thread Daniel-Constantin Mierla
Short notes to let everyone know about some updates to the module - I 
just pushed few patches that enables compression/decompression for http 
traffic as well, so it can be used for xcap.


Also, I changed the default value of Content-Encoding header value from 
gzip (which I saw in rfc 3261) to deflate, which is used by FaceTime, 
but more important works with Firefox out of the box. Thus I assumed is 
the right value and should make the encoding compatible with Facetime 
(not that they do peering/federation over sip, but anyhow).


The readme has now a small config as example to get everyone starting 
with the module.


Credits to Kristian for his technical article in the first place as well 
as the follow up on the business side of the development.


Cheers,
Daniel

On 9/23/13 5:32 PM, Kristian Kielhofner wrote:

It's not Kamailio (or any of these other projects) that I'm concerned
about.  As I've noted I'm most concerned about "in the middle" devices
like NATs, firewalls, etc.

Important clarification though, thanks!

On Mon, Sep 23, 2013 at 11:25 AM, Alex Balashov
 wrote:

To note, though, Kamailio has no problem dealing with fragmented UDP. It
becomes a problem when sending UDP that gets fragmented to a UA that can't
reassemble it, or when sending to Kamailio through a NAT gateway that can't
properly reassemble it.

-- Alex


Daniel-Constantin Mierla  wrote:

Hello,

following the Kristian's email and blog about Apple Facetime using
compressions of the body

(http://lists.sip-router.org/pipermail/sr-users/2013-September/079816.html),

I did a quick coding Friday evening and put together a new module that
uses zlib to compress/decompress the body for SIP messages - I named it

gzcompress, its readme is available at:
- http://kamailio.org/docs/modules/devel/modules/gzcompress.html

Might be useful for those that want to save bandwidth when peering two
kamailios or target to get under MTU size. It is now enabled for SIP
traffic only, but the plan is to get it for http as well, where it can
be more relevant for xcap traffic.

Cheers,
Daniel


___
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://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
  - more details about Kamailio trainings at 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] Problem with to: header

2013-09-23 Thread Daniel-Constantin Mierla

Hello,

look at the uac module for uac_replace_from() and uac_replace_to() 
functions.


Btw, rfc3261 mandates a tag parameter for From header, which is missing 
on the INVITE you pasted here, so it is rather broken and many UA may 
reject it.


Cheersm
Daniel

On 9/23/13 7:09 PM, julian arsanches wrote:
Can someone advise me on how to change the to header to show the host 
that we are sending the call to an not the servers ip.


I am using dispatcher on my setup .

i am getting this


U 2013/09/23 12:57:54.576312 10.0.1.206:5060  
-> 2.2.2.2:5060 
INVITE sip:+4212235@2.2.2.2:5060 
 SIP/2.0.

Record-Route: .
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKb29d.7399c2b3.0.
Via: SIP/2.0/UDP  1.1.1.5:5060;branch=z9hG4bK42a1ecaf;rport=5060.
Max-Forwards: 16.
From:mailto:sip%3Aunavailable@1.1.1.1>>.
To: mailto:sip%3A%2B421223@1.1.1.1>>.
Contact: http://sip:anonymous@1.1.1.5:5060>>.
Call-ID: 0df8db614d45bae27035443c35166ba6@1.1.1.5:5060 
.

CSeq: 102 INVITE.
User-Agent: Asterisk PBX 1.8.15-cert2.
Date: Mon, 23 Sep 2013 16:58:25 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, 
INFO, PUBLISH.

Supported: replaces, timer.
Cisco-Guid: 7128745-3588944267-852064@msc1
Content-Type: application/sdp.
Content-Length: 288.
.
v=0.
o=root 1760548326 1760548326 IN IP4 54.236.97.30.
s=Asterisk PBX 1.8.15-cert2.
c=IN IP4 1.1.1.5.
t=0 0.
m=audio 39794 RTP/AVP 0 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.

I need to  sent header to a carrier like this

To: mailto:sip%3A%2B421223@2.2.2.2>> 
 instead of 1.1.1.1.


i am proxing calls from asterisk to a main carrier.
Please help.

here is my config.



if (starts_with("$var(o)","anonymous")) {

ds_select_domain("$var(z)", "4");#carrier dynamic


xlog("here is anonymous call <$var(o)>7\n");


$var(n)=$(tU{s.substr,3,0});


remove_hf("From");
remove_hf("P-Asserted-Identity");
remove_hf("Privacy");

insert_hf("From:\r\n", "From");
$tU=$var(n);
xlog("out header CHECK ANONYMOUS BEFORE to $tu--$td - contact pai+++ 
<<$ct>>++ from_uri=$fu;<$tU---=$var(n)> to_uri=$tu; 
}pai<$ai>intid=$fU; type_call=$si; dst_ip=$ru; 
carriercode=$var(z);callmode=$var(out)");


if(!t_relay()){;
sl_reply_error();
exit;
};
##ENDANONYMOUS

exit;

}

Again thanks  a lot for any help.



___
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://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
  - more details about Kamailio trainings at 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] Problem with to: header

2013-09-23 Thread julian arsanches
Can someone advise me on how to change the to header to show the host that
we are sending the call to an not the servers ip.

I am using dispatcher on my setup .

i am getting this


U 2013/09/23 12:57:54.576312 10.0.1.206:5060 -> 2.2.2.2:5060
INVITE sip:+4212235@2.2.2.2:5060 SIP/2.0.
Record-Route: .
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKb29d.7399c2b3.0.
Via: SIP/2.0/UDP  1.1.1.5:5060;branch=z9hG4bK42a1ecaf;rport=5060.
Max-Forwards: 16.
From:.
To: .
Contact: .
Call-ID: 0df8db614d45bae27035443c35166ba6@1.1.1.5:5060.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 1.8.15-cert2.
Date: Mon, 23 Sep 2013 16:58:25 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
Cisco-Guid: 7128745-3588944267-852064@msc1
Content-Type: application/sdp.
Content-Length: 288.
.
v=0.
o=root 1760548326 1760548326 IN IP4 54.236.97.30.
s=Asterisk PBX 1.8.15-cert2.
c=IN IP4 1.1.1.5.
t=0 0.
m=audio 39794 RTP/AVP 0 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.

I need to  sent header to a carrier like this

To:   instead of 1.1.1.1.

i am proxing calls from asterisk to a main carrier.
Please help.

here is my config.



if (starts_with("$var(o)","anonymous")) {

ds_select_domain("$var(z)", "4");#carrier dynamic


xlog("here is anonymous call <$var(o)>7\n");


$var(n)=$(tU{s.substr,3,0});


remove_hf("From");
remove_hf("P-Asserted-Identity");
remove_hf("Privacy");

insert_hf("From:\r\n", "From");
$tU=$var(n);
xlog("out header CHECK ANONYMOUS BEFORE to $tu--$td - contact pai+++
<<$ct>>++ from_uri=$fu;<$tU---=$var(n)> to_uri=$tu; }pai<$ai>intid=$fU;
type_call=$si; dst_ip=$ru; carriercode=$var(z);callmode=$var(out)");

if(!t_relay()){;
sl_reply_error();
exit;
};
##ENDANONYMOUS

exit;

}

Again thanks  a lot for any help.
___
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] new module: gzcompress

2013-09-23 Thread Kristian Kielhofner
It's not Kamailio (or any of these other projects) that I'm concerned
about.  As I've noted I'm most concerned about "in the middle" devices
like NATs, firewalls, etc.

Important clarification though, thanks!

On Mon, Sep 23, 2013 at 11:25 AM, Alex Balashov
 wrote:
> To note, though, Kamailio has no problem dealing with fragmented UDP. It
> becomes a problem when sending UDP that gets fragmented to a UA that can't
> reassemble it, or when sending to Kamailio through a NAT gateway that can't
> properly reassemble it.
>
> -- Alex
>
>
> Daniel-Constantin Mierla  wrote:
>>
>> Hello,
>>
>> following the Kristian's email and blog about Apple Facetime using
>> compressions of the body
>>
>> (http://lists.sip-router.org/pipermail/sr-users/2013-September/079816.html),
>>
>> I did a quick coding Friday evening and put together a new module that
>> uses zlib to compress/decompress the body for SIP messages - I named it
>>
>> gzcompress, its readme is available at:
>> - http://kamailio.org/docs/modules/devel/modules/gzcompress.html
>>
>> Might be useful for those that want to save bandwidth when peering two
>> kamailios or target to get under MTU size. It is now enabled for SIP
>> traffic only, but the plan is to get it for http as well, where it can
>> be more relevant for xcap traffic.
>>
>> Cheers,
>> Daniel
>
>
> ___
> 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



-- 
Kristian Kielhofner

___
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] new module: gzcompress

2013-09-23 Thread Kristian Kielhofner
Hi Daniel,

  Thanks again for developing this functionality!  As I mentioned in
my first mailing list post I'd like to see more support for this in
the open source community.  I've written an update describing the
status of various implementations:

http://blog.krisk.org/2013/09/learning-stupid-nat-tricks-from-apple.html

  Having support for this in Kamailio is an important first step.  Thanks again!

On Mon, Sep 23, 2013 at 8:14 AM, Daniel-Constantin Mierla
 wrote:
> Hello,
>
> following the Kristian's email and blog about Apple Facetime using
> compressions of the body
> (http://lists.sip-router.org/pipermail/sr-users/2013-September/079816.html),
> I did a quick coding Friday evening and put together a new module that uses
> zlib to compress/decompress the body for SIP messages - I named it
> gzcompress, its readme is available at:
> - http://kamailio.org/docs/modules/devel/modules/gzcompress.html
>
> Might be useful for those that want to save bandwidth when peering two
> kamailios or target to get under MTU size. It is now enabled for SIP traffic
> only, but the plan is to get it for http as well, where it can be more
> relevant for xcap traffic.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla - http://www.asipto.com
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
>   - more details about Kamailio trainings at 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



-- 
Kristian Kielhofner

___
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] new module: gzcompress

2013-09-23 Thread Alex Balashov
To note, though, Kamailio has no problem dealing with fragmented UDP. It 
becomes a problem when sending UDP that gets fragmented to a UA that 
can't reassemble it, or when sending to Kamailio through a NAT gateway 
that can't properly reassemble it.


-- Alex

Daniel-Constantin Mierla  wrote:

Hello,

following the Kristian's email and blog about Apple Facetime using
compressions of the body
(http://lists.sip-router.org/pipermail/sr-users/2013-September/079816.html),

I did a quick coding Friday evening and put together a new module that
uses zlib to compress/decompress the body for SIP messages - I named it

gzcompress, its readme is available at:
- http://kamailio.org/docs/modules/devel/modules/gzcompress.html

Might be useful for those that want to save bandwidth when peering two
kamailios or target to get under MTU size. It is now enabled for SIP
traffic only, but the plan is to get it for http as well, where it can
be more relevant for xcap traffic.

Cheers,
Daniel


___
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] new module: gzcompress

2013-09-23 Thread Daniel-Constantin Mierla

Hello,

following the Kristian's email and blog about Apple Facetime using 
compressions of the body 
(http://lists.sip-router.org/pipermail/sr-users/2013-September/079816.html), 
I did a quick coding Friday evening and put together a new module that 
uses zlib to compress/decompress the body for SIP messages - I named it 
gzcompress, its readme is available at:

- http://kamailio.org/docs/modules/devel/modules/gzcompress.html

Might be useful for those that want to save bandwidth when peering two 
kamailios or target to get under MTU size. It is now enabled for SIP 
traffic only, but the plan is to get it for http as well, where it can 
be more relevant for xcap traffic.


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Trainings - Berlin, Oct 21-24; Miami, Nov 11-13, 2013
  - more details about Kamailio trainings at 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