Re: [SR-Users] out of shm without any visible reason

2020-02-28 Thread John Petrini
The times we've seen this is when transactions are waiting on something so
they pile up consuming shared memory. Do you have any database lookups or
calls out to external services or scripts?

Long timeouts can also contribute if something stops responding because
transactions are waiting for a long timeout to expire.

It's typically a balance between setting reasonable timeouts and allocating
enough shm. In addition we implemented some watcher scripts that monitor
shm and will set gflags to disable non-critical external calls beyond a
certain threshold as well as send us an alert.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC

2019-04-23 Thread John Petrini
Another great feature of dmq_usrloc is that you can run it on a alternate
port. This offers a few nice benefits:


   - You separate the noise of replication traffic from regular SIP
   signalling
   - It makes troubleshooting easier
   - Replication traffic hits a separate port and therefore separate UDP
   queue for your production traffic
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] question about replace_body_all

2018-12-01 Thread John Petrini
I've never used replace_body_all but I've done something similar using
subt_body. One of the issues I've encountered is that you need to
explicitly match line feed characters \n. Also in your replacement you
need to include a carriage return and a new line at the end \r\n or
they'll end up on one line like you're seeing.

replace_body_all may behave differently so this advice might not apply.

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


Re: [SR-Users] Kamailio as SBC

2018-10-22 Thread John Petrini
You may want to look at the pipelimit module for rate limiting as well.

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


Re: [SR-Users] sipdump excluding dmq exchanges

2018-07-24 Thread John Petrini
One of the great features of dmq is that it can be run on a different port.
I'd suggest reconfiguring DMQ to use something other than 5060.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] $var(name) - Private memory variables

2018-07-21 Thread John Petrini
Thanks for clarifying Alex. First time I've heard of dlg_var, good to know.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] $var(name) - Private memory variables

2018-07-21 Thread John Petrini
You need to use an avp or an xavp instead of a var. As far as I understand
it a var is tied to a particular thread (which will be reused) while avp's
live in shared memory and are unique to each dialog.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] subst query

2018-07-02 Thread John Petrini
Your first group is matching From:
(.*)/From:\1[2008:abcd:1234:2260:20c:29ff:fe9a:b9cb]>\3/ig');


John Petrini
Platforms Engineer

[image: Call CoreDial] 215.297.4400 x 232 <215-297-4400>
[image: Call CoreDial] www.coredial.com <https://coredial.com/>
[image: CoreDial] 751 Arbor Way, Hillcrest I, Suite 150 Blue Bell, PA 19422
<https://www.google.com/maps/place/CoreDial,+LLC/@40.140902,-75.2878857,17z/data=!3m1!4b1!4m5!3m4!1s0x89c6bc587f1cfd47:0x4c79d505f2ee580b!8m2!3d40.140902!4d-75.285697>
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

On Mon, Jul 2, 2018 at 9:40 AM, mahesh b  wrote:

> Thanks John for the Reply.
>
> So if i understand properly :
> group 1 is here   group 2 is empty
> group 3 is  ;tag=41008079_nab__isp__cco__igo__mgt_78DD
>
> the previous expression is working for IPv4.
>
>
> Now for IPv6
>
> Input :   From:  1234:2260:208:5dff:fe93:5b65]>;tag=42006C96_nab__isp_
> _cco__igo__mgt_8092
> subst('/^From:(.*)[2008:abcd:1234:2260:208:5dff:fe93:5b65](
> .*)>(.*)/From:\1[2008:abcd:1234:2260:20c:29ff:fe9a:b9cb]>\3/ig');
> Output  :   From:  1234:2260:208:5dff:fe93:5b6[2008:abcd:1234:2260:20c:29ff:
> fe9a:b9cb]>;tag=42006C96_nab__isp__cco__igo__mgt_8092
> //what is going wrong here?
>
> Here
> group 1 isgroup 2 is empty
> group 3 is  ;tag=42006C96_nab__isp__cco__igo__mgt_8092
>
> what mistake am i making for IPv6 ? if you see the output.
>
> Regards,
> Mahesh.b
>
>
> On Mon, Jul 2, 2018 at 6:54 PM John Petrini  wrote:
>
>> They are references to groups in the regex match. The groups are in
>> parenthesis. Whatever is matched by group 1 and 3 will be included in the
>> substitution.
>>
>> https://regexr.com/ and https://regex101.com/ are both good sites for
>> building and explaining regexes.
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] subst query

2018-07-02 Thread John Petrini
They are references to groups in the regex match. The groups are in
parenthesis. Whatever is matched by group 1 and 3 will be included in the
substitution.

https://regexr.com/ and https://regex101.com/ are both good sites for
building and explaining regexes.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ and/or Database for dialogs, registrations, etc..

2018-05-02 Thread John Petrini
You can have both. What we did is create a designated writer. A kamailio
instance that participates in DMQ but handles no SIP traffic and
periodically writes registrations from memory to a database.

The other nodes work out of memory and load registrations from the writer
node's db on restart.

On Wed, May 2, 2018, 15:14 Alex Balashov  wrote:

> Henning,
>
> I would agree with that. All depends on your design priorities.
>
> -- Alex
>
> --
> Sent via mobile, please forgive typos and brevity.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] nat_uac_test(8)

2018-03-22 Thread John Petrini
If you're asking if nat_uac_test should be updated to check for 192.0.0.0/29
I think that's a great idea.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] nat_uac_test(8)

2018-03-21 Thread John Petrini
You could do something like below to check specifically for that case and
override the uac test.

if (sdp_get_line_startswith("$avp(cline)", "c="))
$var(sdp_contact_host) = $(avp(cline){re.subst,/c=IN IP4 (.+)/\1/});


if (is_in_subnet("$avp(sdp_contact_host)", "192.0.0.0/29"))
.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Select last URI from Record-Route

2018-03-16 Thread John Petrini
Hi Carsten,

Thanks for the suggestion but it looks like that takes the URI from the
route header not record-route. I tested to be sure but the assignment fails
because there is no route header.


John Petrini
Platforms Engineer

[image: Call CoreDial] 215.297.4400 x 232 <215-297-4400>
[image: Call CoreDial] www.coredial.com <https://coredial.com/>
[image: CoreDial] 751 Arbor Way, Hillcrest I, Suite 150 Blue Bell, PA 19422
<https://www.google.com/maps/place/CoreDial,+LLC/@40.140902,-75.2878857,17z/data=!3m1!4b1!4m5!3m4!1s0x89c6bc587f1cfd47:0x4c79d505f2ee580b!8m2!3d40.140902!4d-75.285697>
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

On Fri, Mar 16, 2018 at 12:32 PM, Carsten Bock <cars...@ng-voice.com> wrote:

> Hi,
>
> Check for $route_uri, we use it to determine the session-case (no or Mt)
> on the Proxy-CSCF.
>
> Thanks,
> Carsten
>
> Am 16.03.2018 17:07 schrieb "John Petrini" <jpetr...@coredial.com>:
>
>> The simple answer to that is it's a last ditch effort to look up an AOR
>> record on a reply but it's part of other logic we use to establish direct
>> media.
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Select last URI from Record-Route

2018-03-16 Thread John Petrini
The simple answer to that is it's a last ditch effort to look up an AOR
record on a reply but it's part of other logic we use to establish direct
media.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Select last URI from Record-Route

2018-03-16 Thread John Petrini
Hello list,

Does anyone how I can extract the last URI from a compact Record-Route
header?

I've tried using a negative index in the parameter of my select but it
returns the first URI in the header instead of the last.

$var(rr_last_uri) = @record_route.uri[-1];

Maybe there's another way instead of using selects?

Thanks,

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


Re: [SR-Users] question about force_send_socket

2018-01-31 Thread John Petrini
Trying setting force_send_socket(PUBLIC_IP:5060); in a branch route. Get
redirects creates a new branch for each contact header returned in the 302
and you want to act upon those branches.

if (t_check_status("302")) {
get_redirects("*");
 t_on_branch("REDIRECT_BRANCH")
t_relay();
}


 branch_route[REDIRECT_BRANCH] {
   force_send_socket(PUBLIC_IP:5060);
 }


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


Re: [SR-Users] Contacts in 302

2017-11-03 Thread John Petrini
If you're trying to modify the contact on your branch I believe you need to
do that in a branch route. For example in branch_route[EVAPIRESPONSE] you
could modify the contact header and. Just make sure to set the branch route
in route[EVAPIRESPONSE].

Then instead of using a var you could use an avp. avp's work as a stack so
a single avp could hold all of your contacts. In your branch route you
could then do something like:

remove_hf('Contact');
append_hf('Contact: $avp(contact)');
pv_unset ("$avp(contact)"); # This will pop the first contact off the avp
so the next time you call this avp you'll get the second contact

I hope that's helpful and gives you some ideas.

On Fri, Nov 3, 2017 at 12:00 PM, Diego Nadares <dnada...@gmail.com> wrote:

> Hi john, thanks for your answer. I'm using this in route[EVAPIRESPONSE]
> because of async request with evapi.
>
> I tried what you said too with no success.
>
> #$var(first) = 0;
>
> #while ($var(i) < $var(contacts_len)){
>
> #   jansson_get("contacts[$var(i)]", "$var(evmsg)",
> "$var(contact)");
>
> #   if ($var(first) == 0){
>
> #   $ru = $var(contact);
>
> #   $var(first) = 1;
>
> #   }
>
> #   append_branch($var(contact), "0.5");
>
> #   $var(i) = $var(i) + 1;
>
> #}
>
> remove_hf('Contact');
>
> append_hf('Contact: <@188.111.111.113>');
>
> send_reply("302", "Moved Temporarily");
>
>     exit;
>
>
> The result is ONLY the original uri in the contact. *Contact:
> <@188.111.111.112 <@188.111.111.112>>*
>
> Diego
>
>
>
> 2017-11-02 22:22 GMT-03:00 John Petrini <jpetr...@coredial.com>:
>
>> remove_hf('Contact') and then append_hf($var(contact)) should work. What
>> was the problem you were having? Were you using it in a branch route?
>>
>>
>> John
>>
>> John Petrini | Platforms Engineer
>>
>> jpetr...@coredial.com
>>
>> 215.297.440 <215-297-4400>0
>>
>> 751 Arbor Way, Hillcrest I, Suite 150
>> Blue Bell, PA 19422
>>
>> www.coredial.com <https://coredial.com/>
>> <https://twitter.com/coredial>
>> <https://www.linkedin.com/company/coredial-llc>
>> <https://plus.google.com/+Coredial> <https://success.coredial.com/blog>
>>
>> The information transmitted is intended only for the person or entity to
>> which it is addressed and may contain confidential and/or privileged
>> material. Any review, retransmission, dissemination or other use of, or
>> taking of any action in reliance upon, this information by persons or
>> entities other than the intended recipient is prohibited. If you received
>> this in error, please contact the sender and delete the material from any
>> computer.
>>
>> On Thu, Nov 2, 2017 at 6:40 PM, Diego Nadares <dnada...@gmail.com> wrote:
>>
>>> Hi again,
>>>
>>> I found a work around . Modifying $ru changes de first contact uri.
>>>
>>>  if($var(routing)=~"redirect"){
>>> jansson_get("contacts_len", "$var(evmsg)",
>>> "$var(contacts_len)");
>>> xlog("L_INFO", "Contacts len $var(contacts_len)");
>>> $var(i) = 0;
>>>
>>> *$var(first) = 0;*
>>> while ($var(i) < $var(contacts_len)){
>>> jansson_get("contacts[$var(i)]", "$var(evmsg)",
>>> "$var(contact)");
>>> if ($var(first) == 0){
>>>* $ru = $var(contact);*
>>>   *  $var(first) = 1;*
>>> }
>>> #Appending anyway because of the q param
>>> append_branch($var(contact), "0.5");
>>> $var(i) = $var(i) + 1;
>>> }
>>> send_reply("302", "Moved Temporarily");
>>> exit;
>>> }
>>>
>>> Contact: *<@188.111.111.112 <sip%3A@188.111.111.112>>*, <
>>> sip:@188.111.111.112>;q=0.5, <sip:@188.111.111.112>;q=0.5
>>>
>>>
>>> I think this

Re: [SR-Users] Contacts in 302

2017-11-02 Thread John Petrini
remove_hf('Contact') and then append_hf($var(contact)) should work. What
was the problem you were having? Were you using it in a branch route?


John

John Petrini | Platforms Engineer

jpetr...@coredial.com

215.297.440 <215-297-4400>0

751 Arbor Way, Hillcrest I, Suite 150
Blue Bell, PA 19422

www.coredial.com <https://coredial.com/>
<https://twitter.com/coredial>
<https://www.linkedin.com/company/coredial-llc>
<https://plus.google.com/+Coredial> <https://success.coredial.com/blog>

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

On Thu, Nov 2, 2017 at 6:40 PM, Diego Nadares <dnada...@gmail.com> wrote:

> Hi again,
>
> I found a work around . Modifying $ru changes de first contact uri.
>
>  if($var(routing)=~"redirect"){
> jansson_get("contacts_len", "$var(evmsg)",
> "$var(contacts_len)");
> xlog("L_INFO", "Contacts len $var(contacts_len)");
> $var(i) = 0;
>
> *$var(first) = 0;*
> while ($var(i) < $var(contacts_len)){
> jansson_get("contacts[$var(i)]", "$var(evmsg)",
> "$var(contact)");
> if ($var(first) == 0){
>* $ru = $var(contact);*
>   *  $var(first) = 1;*
> }
> #Appending anyway because of the q param
> append_branch($var(contact), "0.5");
> $var(i) = $var(i) + 1;
> }
> send_reply("302", "Moved Temporarily");
> exit;
> }
>
> Contact: *<@188.111.111.112 <sip%3A@188.111.111.112>>*, <
> sip:@188.111.111.112>;q=0.5, <sip:@188.111.111.112>;q=0.5
>
>
> I think this is not the better way. Any suggestion will be very
> appreciated.
>
> Thanks again.
>
> Diego
>
>
> 2017-11-02 18:11 GMT-03:00 Diego Nadares <dnada...@gmail.com>:
>
>> Hi Guys,
>>
>> I'm generating a 302 reply from kamailio. In this 302 I append new
>> branches with new
>> contacts.
>>
>> if($var(routing)=~"redirect"){
>> jansson_get("contacts_len", "$var(evmsg)",
>> "$var(contacts_len)");
>> xlog("L_INFO", "Contacts len $var(contacts_len)");
>> $var(i) = 0;
>> while ($var(i) < $var(contacts_len)){
>> jansson_get("contacts[$var(i)]", "$var(evmsg)",
>> "$var(contact)");
>> append_branch($var(contact), "0.5");
>> $var(i) = $var(i) + 1;
>> }
>> send_reply("302", "Moved Temporarily");
>> exit;
>> }
>>
>> The problem i'm facing is that I can't delete the original contact  
>> *<sip:@188.111.111.111:5060
>> <http://sip:@188.111.111.111:5060>>*
>>
>> The resulting conctact:
>>
>> Contact: *<sip:@188.111.111.111:5060
>> <http://sip:@188.111.111.111:5060>>*, <sip:@188.111.111.112>;q=0.5,
>> <sip:@188.111.111.112>;q=0.5
>>
>> I all ready tried with remove_hf('Contact') and adding the new ones after
>> that but it doesn't worke either.
>>
>> The problem is that one gw takes the first contact over and over again
>> and never the other two.
>>
>> Thanks in advance.
>>
>> Diego.
>>
>>
>>
>>
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] DMQ Not Discovering all Nodes

2017-08-16 Thread John Petrini
Hello,

I've just started doing some testing with dmq but I'm having trouble
getting it to discover all of the nodes in my cluster.

There are 7 kamailio instances with the following in their configs:

Example from the notification server (10.0.10.211):

listen=udp:10.0.10.211:5080
loadmodule "dmq.so"
# - dmq params -
modparam("dmq", "server_address", "sip:10.0.10.211:5080")
modparam("dmq", "notification_address", "sip:10.0.10.211:5080")


Example from one of the nodes (10.0.10.216). (Only the listen and
server_address is changed to match the local ip of each node.)

listen=udp:10.0.10.216:5080
loadmodule "dmq.so"
# - dmq params -
modparam("dmq", "server_address", "sip:10.0.10.216:5080");
modparam("dmq", "notification_address", "sip:10.0.10.211:5080")

Output from kamcmd dmq.list_nodes

{
host: 10.0.10.211
port: 5080
resolved_ip: 10.0.10.211
status: 2
last_notification: 0
local: 0
}
{
host: 10.0.10.216
port: 5080
resolved_ip: 10.0.10.216
status: 2
last_notification: 0
local: 1
}

I'm expecting to see all 7 nodes in the output but only see the local node
and the notification node. I imagine I could use an SRV record for the
notication address to add all of the nodes but I thought the notification
node was supposed to share the rest of the nodes in the cluster.

Can anyone explain what it is I'm doing wrong?

Thank You,

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


Re: [SR-Users] Rate limiting

2017-07-31 Thread John Petrini
HI All,

What's everyone's experience with pipelimit regarding performance? Say we
set dynamic pipes base on au and source ip? This would result in thousands
of pipes would it not? Is this going to put a substantial load on the
server? Are there other settings that should be tweaked when implementing
it such as memory limits etc?

Thank You,

John Petrini


On Thu, Sep 1, 2016 at 6:50 AM, Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> the pipelimit aims to be more dynamic, while dropping the queues
> concepts of ratelimit, given those can be done with IF conditions inside
> kamailio.cfg.
>
> In ratelimit, the pipes are defined as parameters, with some limits in
> the number of pipes as well as constrained to integer ids for pipes.
>
> Pipelimit can load the definitions of pipes from database, making it
> easier to provision via some gui. It doesn't store back anything, given
> that even few seconds of shutdown will invalidate the pipes counters.
> Moreover, the pipes can be created on the fly, they don't have to be
> defined in advance via db or parameters. You can load the limit and
> algorithm from a user profile and then just use them as parameter with
> the username as pipe id parameter and you get a new pipe created at that
> moment if there is none with same id.
>
> Cheers,
> Daniel
>
>
> On 30/08/16 12:15, Andreas Granig wrote:
> > Hi Alex,
> >
> > http://www.kamailio.org/docs/modules/4.4.x/modules/ratelimit.html is
> > another approach here. Tried it as a proof of concept recently and it
> > seems to do its job.
> >
> > Seems like pipelimit is derived from ratelimit. What's the main
> > difference from ratelimit, other than named pipes and DB support? What's
> > the purpose of the DB support of pipelimit? Does it cache its values and
> > can be reloaded from DB on demand (I don't see an rpc command for that)?
> > That would be really valuable.
> >
> > Andreas
> >
> > On 08/29/2016 05:39 PM, Alex Balashov wrote:
> >> On 08/29/2016 11:37 AM, NITESH BANSAL wrote:
> >>
> >>> Finally I got it working. The issue was that I was trying to use
> >>> pikelimit with Kamailio version 4.1, 4.1 version doesn't allow for
> >>> dynamic pipe creation.
> >>>
> >>> In the end, I backported pipelimit code from Kamailio version 4.2 and
> >>> used pl_check function to create dynamic pipes.
> >> Excellent. That was indeed an important shift. :-)
> >>
> > ___
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-us...@lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com - http://www.kamailio.org
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-us...@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Problem changing the SDP origin after a failure route

2017-06-14 Thread John Petrini
You might try using the fix_nated_sdp function from the nathelper module to
rewrite the c line in the SDP body.

___

John Petrini

NOC Systems Administrator   //   *CoreDial, LLC*   //   coredial.com
//   [image:
Twitter] <https://twitter.com/coredial>   [image: LinkedIn]
<http://www.linkedin.com/company/99631>   [image: Google Plus]
<https://plus.google.com/104062177220750809525/posts>   [image: Blog]
<http://success.coredial.com/blog>
Hillcrest I, 751 Arbor Way, Suite 150, Blue Bell PA, 19422
*P: *215.297.4400 x232   //   *F: *215.297.4401   //   *E: *
jpetr...@coredial.com


Interested in sponsoring PartnerConnex 2017? Learn more.
<http://success.coredial.com/partnerconnex-2017-sponsorship>

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission,  dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

On Wed, Jun 14, 2017 at 5:00 PM, Pascal Poudrier <
pascal.poudr...@quebecinternet.net> wrote:

> Hi, first of all, here's the architecture of what I'm trying to do :
>
> Public client --> Kamailio and there is a private freeswitch behind
>  kamailio. I use rtpproxy to connect the client and the freeswitch that is
> used at media server.
>
> If a call is not answered from userA to userB and userB doesn't have a
> voicemail configured, I route the Invite to FreeSwitch and I change the
> destination user to 66 that take care of playing a nice message that
> the user doesn't have a voicemail.
>
> My problem is that the SDP Connection doesn't get updated to the right IP.
> It get changed to the external IP instead of the internal.
>
> Here's the original INVITE Packet :
>
> 13:21:22.824290 IP 8.8.8.16.30893 > 8.8.8.18.5060: SIP: INVITE sip:
> 1...@mydomain.com SIP/2.0
> Eh@.?...x..mINVITE sip:1...@mydomain.com SIP/2.0
> Via: SIP/2.0/UDP 192.168.0.236:5060;branch=z9hG4bK-3e3b9e22
> From: 102 <sip:1...@mydomain.com>;tag=cacbdfac40ddd17ao0
> To: <sip:1...@mydomain.com>
> Remote-Party-ID: 102 <sip:1...@mydomain.com>;screen=yes;party=calling
> Call-ID: 3ae5b914-591b8732@192.168.0.236
> CSeq: 101 INVITE
> Max-Forwards: 70
> Contact: 102 <sip:102@192.168.0.236:5060;ref=102>
> Expires: 240
> User-Agent: Cisco/SPA122-1.3.5r(003)
> Content-Length: 263
> Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
> Supported: replaces
> Content-Type: application/sdp
>
> v=0
> o=- 16833207 16833207 IN IP4 192.168.0.236
> s=-
> c=IN IP4 192.168.0.236
> t=0 0
> m=audio 16396 RTP/AVP 0 100 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:100 NSE/8000
> a=fmtp:100 192-193
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=ptime:20
> a=sendrecv
>
> Note that 192.168.0.x in the internal network of the clients and 8.8.8.16
> is the public IP of the client and 8.8.8.18 is the kamailio ip.
>
> Here's the INVITE packet sent from kamailio to Freeswitch
>
> 13:21:32.947196 IP 172.16.0.18.5060 > 172.16.0.19.5080: SIP: INVITE
> sip:666@172.16.0.19:5080 SIP/2.0
> E... ...@.  ...e...e...P1INVITE sip:666@172.16.0.
> 19:5080 SIP/2.0
> Record-Route: <sip:8.8.8.18;lr=on;ftag=cacbdfac40ddd17ao0;did=f3f.205>
> Test-Pascal: SDP avec freeswitch
> Via: SIP/2.0/UDP 172.16.0.18;branch=z9hG4bK31ea.
> e52b370f8248032680211fc7c253902a.1
> Via: SIP/2.0/UDP 
> 192.168.0.236:5060;rport=30893;received=8.8.8.16;branch=z9hG4bK-3e3b9e22
>
> From: 102 <sip:1...@mydomain.com>;tag=cacbdfac40ddd17ao0
> To: <sip:1...@mydomain.com>
> Remote-Party-ID: 102 <sip:1...@mydomain.com>;screen=yes;party=calling
> Call-ID: 3ae5b914-591b8732@192.168.0.236
> CSeq: 101 INVITE
> Max-Forwards: 69
> Contact: 102 <sip:102@192.168.0.236:5060;ref=102;alias=8.8.8.16~30893~1>
> Expires: 240
> User-Agent: Cisco/SPA122-1.3.5r(003)
> Content-Length: 279
> Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
> Supported: replaces
> Content-Type: application/sdp
>
> v=0
> o=- 16833207 16833207 IN IP4 8.8.8.18
> s=-
> c=IN IP4 8.8.8.18
> t=0 0
> m=audio 46134 RTP/AVP 0 100 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:100 NSE/8000
> a=fmtp:100 192-193
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=ptime:20
> a=sendrecv
> a=nortpproxy:yes
>
> Note that 172.16.0.18 is the internal IP of kamailio and 172.16.0.19 is
> the internal IP of FreeSwitch
>
> Here's the revealing par of kamailio configuration that us use when
&g

[SR-Users] rtpengine opening second RTP port

2017-05-22 Thread John Petrini
Hello List,

I'm having an issue with rtpengine changing the source port of the RTP
stream after receiving a 183 from the carrier. Though RTP engine continues
to send RTP to the proper carrier IP and port the carrier drops the inbound
audio once the source port changes.

Can anyone tell me what might trigger this type of behavior from rtpengine
and if it's expected?

Thank You,

___

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