Re: [SR-Users] Transport question

2018-05-15 Thread Wilkins, Steve
I left both lines in you suggested =>
 $ru = $ru + ";transport=tcp";
 $fs = 'tcp:172.21.1.124:5060';
 if (!t_relay()) {
   sl_reply_error();
 }

And now only get the Warning =>
WARNING: pv [pv_core.c:2315]: pv_set_force_sock(): no socket found to match 
[tcp:x.x.x.x:5060]

I also increased the following, but still get that strange memory error.
pv_buffer_size=16384
tcp_rd_buf_size=16384


-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Alex 
Balashov
Sent: Tuesday, May 15, 2018 1:16 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Transport question

Well, that's a bit coincidental. Try increase the size of your package memory 
and/or shared memory pool. 

On May 15, 2018 7:11:13 PM GMT+02:00, "Wilkins, Steve"  
wrote:
>I tried this and I now get
>
>ERROR:  [core/pvapi.c:1377]: pv_printf(): no more space for spec 
>value
>ERROR:  [core/pvapi.c:1386]: pv_printf(): buffer overflow -- 
>increase the buffer size...
>(I have these values set super high, I was using the defaults and 
>getting the same error)
>
>WARNING: pv [pv_core.c:2315]: pv_set_force_sock(): no socket found to 
>match [tcp: 111.25.1.99:5060]
>ERROR: tm [ut.h:317]: uri2dst2(): no corresponding socket found for 
>"111.25.1.99" af 2 (udp: 111.25.1.99:5060)
>ERROR: tm [t_fwd.c:469]: prepare_new_uac(): can't fwd to af 2, proto 1 
>(no corresponding listening socket)
>ERROR: tm [t_fwd.c:1732]: t_forward_nonack(): failure to add branches
>
>It  seems strange the WARNING is showing tcp but the ERROR is showing 
>udp.
>
>Thank you!
>
>-Original Message-
>From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf 
>Of Alex Balashov
>Sent: Tuesday, May 15, 2018 12:41 PM
>To: Kamailio (SER) - Users Mailing List 
>Subject: Re: [SR-Users] Transport question
>
>Have a read about 'mhomed' works and see if it might make sense to turn 
>it off or on:
>
>https://www.kamailio.org/wiki/cookbooks/5.1.x/core#mhomed
>
>Otherwise, for experimentation's sake, try mhomed=0 and force the 
>outgoing listener explicitly:
>
>   $fs = 'tcp:x.x.x.x:5060';
>
>   ...
>
>   t_relay();
>
>-- Alex
>
>On Tue, May 15, 2018 at 04:38:59PM +, Wilkins, Steve wrote:
>
>> Yes there is an error.  I get this error trying both ways => no 
>> corresponding socket found for "111.25.1.99" af 2 (udp:
>111.25.1.99:5060).  It is still trying to send UDP.   111.25.1.99 is
>accepting TCP traffic, other calls are reaching via other sources using 
>TCP.
>> 
>> I'm just not sure why it is refusing to send tcp.
>> 
>> -Steve
>> 
>> -Original Message-
>> From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf
>
>> Of Alex Balashov
>> Sent: Tuesday, May 15, 2018 12:20 PM
>> To: Kamailio (SER) - Users Mailing List 
>> Subject: Re: [SR-Users] Transport question
>> 
>> Are there any errors in the logs suggestive of a failure to select an
>appropriate egress listener?
>> 
>> On Tue, May 15, 2018 at 04:14:07PM +, Wilkins, Steve wrote:
>> 
>> > Hi Alex,
>> > 
>> > I tried your suggestion and everything is still going over UDP.  I
>verified with tcpdump/wireshark and all SIP traffic is UDP.
>> > 
>> > Thank you,
>> > -Steve
>> > 
>> > -Original Message-
>> > From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On 
>> > Behalf Of Alex Balashov
>> > Sent: Tuesday, May 15, 2018 11:44 AM
>> > To: Kamailio (SER) - Users Mailing List 
>> > 
>> > Subject: Re: [SR-Users] Transport question
>> > 
>> > Hi Steve,
>> > 
>> > Do you have a TCP listener from which the messages would be
>expected to egress?
>> > 
>> > Also, try use regular t_relay(), but beforehand do:
>> > 
>> >$ru = $ru + ";transport=TCP";
>> > 
>> > -- Alex
>> > 
>> > On Tue, May 15, 2018 at 03:43:26PM +, Wilkins, Steve wrote:
>> > 
>> > > Hi All,
>> > > 
>> > > I was attempting to switch from UDP to TCP for relaying.  I used
>> > > t_relay_to_tcp() instead of t_relay() =>
>> > > 
>> > > if (!t_relay_to_tcp()) {
>> > >sl_reply_error();
>> > > }
>> > > 
>> > > The problem is that I am still seeing the SIP messages as UDP on
>the Server that the messages are relayed to.  Any Ideas?
>> > > 
>> > > Thank you,
>> > > Steve
>> > 
>> > > ___
>> > > Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org 
>> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> > 
>> > 
>> > --
>> > Alex Balashov | Principal | Evariste Systems LLC
>> > 
>> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>> > 
>> > ___
>> > Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org 
>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> > 

Re: [SR-Users] Transport question

2018-05-15 Thread Wilkins, Steve
Where do I set this at? 

 Also, I noticed that when adding $ru=$ru + ";transport=tcp", tcp does get 
appended to $ru, it just refuses to send over TCP connection.

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Alex 
Balashov
Sent: Tuesday, May 15, 2018 1:16 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Transport question

Well, that's a bit coincidental. Try increase the size of your package memory 
and/or shared memory pool. 

On May 15, 2018 7:11:13 PM GMT+02:00, "Wilkins, Steve"  
wrote:
>I tried this and I now get
>
>ERROR:  [core/pvapi.c:1377]: pv_printf(): no more space for spec 
>value
>ERROR:  [core/pvapi.c:1386]: pv_printf(): buffer overflow -- 
>increase the buffer size...
>(I have these values set super high, I was using the defaults and 
>getting the same error)
>
>WARNING: pv [pv_core.c:2315]: pv_set_force_sock(): no socket found to 
>match [tcp: 111.25.1.99:5060]
>ERROR: tm [ut.h:317]: uri2dst2(): no corresponding socket found for 
>"111.25.1.99" af 2 (udp: 111.25.1.99:5060)
>ERROR: tm [t_fwd.c:469]: prepare_new_uac(): can't fwd to af 2, proto 1 
>(no corresponding listening socket)
>ERROR: tm [t_fwd.c:1732]: t_forward_nonack(): failure to add branches
>
>It  seems strange the WARNING is showing tcp but the ERROR is showing 
>udp.
>
>Thank you!
>
>-Original Message-
>From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf 
>Of Alex Balashov
>Sent: Tuesday, May 15, 2018 12:41 PM
>To: Kamailio (SER) - Users Mailing List 
>Subject: Re: [SR-Users] Transport question
>
>Have a read about 'mhomed' works and see if it might make sense to turn 
>it off or on:
>
>https://www.kamailio.org/wiki/cookbooks/5.1.x/core#mhomed
>
>Otherwise, for experimentation's sake, try mhomed=0 and force the 
>outgoing listener explicitly:
>
>   $fs = 'tcp:x.x.x.x:5060';
>
>   ...
>
>   t_relay();
>
>-- Alex
>
>On Tue, May 15, 2018 at 04:38:59PM +, Wilkins, Steve wrote:
>
>> Yes there is an error.  I get this error trying both ways => no 
>> corresponding socket found for "111.25.1.99" af 2 (udp:
>111.25.1.99:5060).  It is still trying to send UDP.   111.25.1.99 is
>accepting TCP traffic, other calls are reaching via other sources using 
>TCP.
>> 
>> I'm just not sure why it is refusing to send tcp.
>> 
>> -Steve
>> 
>> -Original Message-
>> From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf
>
>> Of Alex Balashov
>> Sent: Tuesday, May 15, 2018 12:20 PM
>> To: Kamailio (SER) - Users Mailing List 
>> Subject: Re: [SR-Users] Transport question
>> 
>> Are there any errors in the logs suggestive of a failure to select an
>appropriate egress listener?
>> 
>> On Tue, May 15, 2018 at 04:14:07PM +, Wilkins, Steve wrote:
>> 
>> > Hi Alex,
>> > 
>> > I tried your suggestion and everything is still going over UDP.  I
>verified with tcpdump/wireshark and all SIP traffic is UDP.
>> > 
>> > Thank you,
>> > -Steve
>> > 
>> > -Original Message-
>> > From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On 
>> > Behalf Of Alex Balashov
>> > Sent: Tuesday, May 15, 2018 11:44 AM
>> > To: Kamailio (SER) - Users Mailing List 
>> > 
>> > Subject: Re: [SR-Users] Transport question
>> > 
>> > Hi Steve,
>> > 
>> > Do you have a TCP listener from which the messages would be
>expected to egress?
>> > 
>> > Also, try use regular t_relay(), but beforehand do:
>> > 
>> >$ru = $ru + ";transport=TCP";
>> > 
>> > -- Alex
>> > 
>> > On Tue, May 15, 2018 at 03:43:26PM +, Wilkins, Steve wrote:
>> > 
>> > > Hi All,
>> > > 
>> > > I was attempting to switch from UDP to TCP for relaying.  I used
>> > > t_relay_to_tcp() instead of t_relay() =>
>> > > 
>> > > if (!t_relay_to_tcp()) {
>> > >sl_reply_error();
>> > > }
>> > > 
>> > > The problem is that I am still seeing the SIP messages as UDP on
>the Server that the messages are relayed to.  Any Ideas?
>> > > 
>> > > Thank you,
>> > > Steve
>> > 
>> > > ___
>> > > Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org 
>> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> > 
>> > 
>> > --
>> > Alex Balashov | Principal | Evariste Systems LLC
>> > 
>> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>> > 
>> > ___
>> > 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
>> 
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>> 
>> Tel: +1-706-510-6800 / +1-800-250-5920 

Re: [SR-Users] Transport question

2018-05-15 Thread Alex Balashov
Well, that's a bit coincidental. Try increase the size of your package memory 
and/or shared memory pool. 

On May 15, 2018 7:11:13 PM GMT+02:00, "Wilkins, Steve"  
wrote:
>I tried this and I now get
>
>ERROR:  [core/pvapi.c:1377]: pv_printf(): no more space for spec
>value
>ERROR:  [core/pvapi.c:1386]: pv_printf(): buffer overflow --
>increase the buffer size...
>(I have these values set super high, I was using the defaults and
>getting the same error)
>
>WARNING: pv [pv_core.c:2315]: pv_set_force_sock(): no socket found to
>match [tcp: 111.25.1.99:5060]
>ERROR: tm [ut.h:317]: uri2dst2(): no corresponding socket found for
>"111.25.1.99" af 2 (udp: 111.25.1.99:5060)
>ERROR: tm [t_fwd.c:469]: prepare_new_uac(): can't fwd to af 2, proto 1 
>(no corresponding listening socket)
>ERROR: tm [t_fwd.c:1732]: t_forward_nonack(): failure to add branches
>
>It  seems strange the WARNING is showing tcp but the ERROR is showing
>udp.
>
>Thank you!
>
>-Original Message-
>From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf
>Of Alex Balashov
>Sent: Tuesday, May 15, 2018 12:41 PM
>To: Kamailio (SER) - Users Mailing List 
>Subject: Re: [SR-Users] Transport question
>
>Have a read about 'mhomed' works and see if it might make sense to turn
>it off or on:
>
>https://www.kamailio.org/wiki/cookbooks/5.1.x/core#mhomed
>
>Otherwise, for experimentation's sake, try mhomed=0 and force the
>outgoing listener explicitly:
>
>   $fs = 'tcp:x.x.x.x:5060';
>
>   ...
>
>   t_relay();
>
>-- Alex
>
>On Tue, May 15, 2018 at 04:38:59PM +, Wilkins, Steve wrote:
>
>> Yes there is an error.  I get this error trying both ways =>
>> no corresponding socket found for "111.25.1.99" af 2 (udp:
>111.25.1.99:5060).  It is still trying to send UDP.   111.25.1.99 is
>accepting TCP traffic, other calls are reaching via other sources using
>TCP.
>> 
>> I'm just not sure why it is refusing to send tcp.
>> 
>> -Steve
>> 
>> -Original Message-
>> From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf
>
>> Of Alex Balashov
>> Sent: Tuesday, May 15, 2018 12:20 PM
>> To: Kamailio (SER) - Users Mailing List 
>> Subject: Re: [SR-Users] Transport question
>> 
>> Are there any errors in the logs suggestive of a failure to select an
>appropriate egress listener?
>> 
>> On Tue, May 15, 2018 at 04:14:07PM +, Wilkins, Steve wrote:
>> 
>> > Hi Alex,
>> > 
>> > I tried your suggestion and everything is still going over UDP.  I
>verified with tcpdump/wireshark and all SIP traffic is UDP.
>> > 
>> > Thank you,
>> > -Steve
>> > 
>> > -Original Message-
>> > From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On 
>> > Behalf Of Alex Balashov
>> > Sent: Tuesday, May 15, 2018 11:44 AM
>> > To: Kamailio (SER) - Users Mailing List 
>> > 
>> > Subject: Re: [SR-Users] Transport question
>> > 
>> > Hi Steve,
>> > 
>> > Do you have a TCP listener from which the messages would be
>expected to egress?
>> > 
>> > Also, try use regular t_relay(), but beforehand do:
>> > 
>> >$ru = $ru + ";transport=TCP";
>> > 
>> > -- Alex
>> > 
>> > On Tue, May 15, 2018 at 03:43:26PM +, Wilkins, Steve wrote:
>> > 
>> > > Hi All,
>> > > 
>> > > I was attempting to switch from UDP to TCP for relaying.  I used
>> > > t_relay_to_tcp() instead of t_relay() =>
>> > > 
>> > > if (!t_relay_to_tcp()) {
>> > >sl_reply_error();
>> > > }
>> > > 
>> > > The problem is that I am still seeing the SIP messages as UDP on
>the Server that the messages are relayed to.  Any Ideas?
>> > > 
>> > > Thank you,
>> > > Steve
>> > 
>> > > ___
>> > > Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org 
>> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> > 
>> > 
>> > --
>> > Alex Balashov | Principal | Evariste Systems LLC
>> > 
>> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>> > 
>> > ___
>> > 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
>> 
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>> 
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>> 
>> ___
>> 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
>> 

Re: [SR-Users] Transport question

2018-05-15 Thread Wilkins, Steve
I tried this and I now get

ERROR:  [core/pvapi.c:1377]: pv_printf(): no more space for spec value
ERROR:  [core/pvapi.c:1386]: pv_printf(): buffer overflow -- increase the 
buffer size...
(I have these values set super high, I was using the defaults and getting the 
same error)

WARNING: pv [pv_core.c:2315]: pv_set_force_sock(): no socket found to match 
[tcp: 111.25.1.99:5060]
ERROR: tm [ut.h:317]: uri2dst2(): no corresponding socket found for 
"111.25.1.99" af 2 (udp: 111.25.1.99:5060)
ERROR: tm [t_fwd.c:469]: prepare_new_uac(): can't fwd to af 2, proto 1  (no 
corresponding listening socket)
ERROR: tm [t_fwd.c:1732]: t_forward_nonack(): failure to add branches

It  seems strange the WARNING is showing tcp but the ERROR is showing udp.

Thank you!

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Alex 
Balashov
Sent: Tuesday, May 15, 2018 12:41 PM
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Transport question

Have a read about 'mhomed' works and see if it might make sense to turn it off 
or on:

https://www.kamailio.org/wiki/cookbooks/5.1.x/core#mhomed

Otherwise, for experimentation's sake, try mhomed=0 and force the outgoing 
listener explicitly:

   $fs = 'tcp:x.x.x.x:5060';

   ...

   t_relay();

-- Alex

On Tue, May 15, 2018 at 04:38:59PM +, Wilkins, Steve wrote:

> Yes there is an error.  I get this error trying both ways =>
> no corresponding socket found for "111.25.1.99" af 2 (udp: 111.25.1.99:5060). 
>  It is still trying to send UDP.   111.25.1.99 is accepting TCP traffic, 
> other calls are reaching via other sources using TCP.
> 
> I'm just not sure why it is refusing to send tcp.
> 
> -Steve
> 
> -Original Message-
> From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf 
> Of Alex Balashov
> Sent: Tuesday, May 15, 2018 12:20 PM
> To: Kamailio (SER) - Users Mailing List 
> Subject: Re: [SR-Users] Transport question
> 
> Are there any errors in the logs suggestive of a failure to select an 
> appropriate egress listener?
> 
> On Tue, May 15, 2018 at 04:14:07PM +, Wilkins, Steve wrote:
> 
> > Hi Alex,
> > 
> > I tried your suggestion and everything is still going over UDP.  I verified 
> > with tcpdump/wireshark and all SIP traffic is UDP.
> > 
> > Thank you,
> > -Steve
> > 
> > -Original Message-
> > From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On 
> > Behalf Of Alex Balashov
> > Sent: Tuesday, May 15, 2018 11:44 AM
> > To: Kamailio (SER) - Users Mailing List 
> > 
> > Subject: Re: [SR-Users] Transport question
> > 
> > Hi Steve,
> > 
> > Do you have a TCP listener from which the messages would be expected to 
> > egress?
> > 
> > Also, try use regular t_relay(), but beforehand do:
> > 
> >$ru = $ru + ";transport=TCP";
> > 
> > -- Alex
> > 
> > On Tue, May 15, 2018 at 03:43:26PM +, Wilkins, Steve wrote:
> > 
> > > Hi All,
> > > 
> > > I was attempting to switch from UDP to TCP for relaying.  I used
> > > t_relay_to_tcp() instead of t_relay() =>
> > > 
> > > if (!t_relay_to_tcp()) {
> > >sl_reply_error();
> > > }
> > > 
> > > The problem is that I am still seeing the SIP messages as UDP on the 
> > > Server that the messages are relayed to.  Any Ideas?
> > > 
> > > Thank you,
> > > Steve
> > 
> > > ___
> > > Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org 
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > 
> > 
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> > 
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > 
> > ___
> > 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
> 
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> 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

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org

Re: [SR-Users] Contact Header

2018-05-15 Thread Alex Balashov
You just need to use Record-Route and all will work as intended.

On Tue, May 15, 2018 at 05:06:02PM +, KamDev Essa wrote:

> My scenario is 
> UA <> Kamailio <> Freeswitch 
> UA calls a number. Kam delivers to FS and FS plays a wav file. 
> My problem is that Kam relays the 200 OK from FS back to UA without change 
> and UA ACKs back to FS because the FS IP is in the Contact Header.    
>- Why does Kam not change the contact header since the ACK should come 
> back to Kam
>- If this is normal what do I need to do to change the contact header for 
> the 200K to the UA to make this work.
> KD 

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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


[SR-Users] Contact Header

2018-05-15 Thread KamDev Essa
My scenario is 
UA <> Kamailio <> Freeswitch 
UA calls a number. Kam delivers to FS and FS plays a wav file. 
My problem is that Kam relays the 200 OK from FS back to UA without change and 
UA ACKs back to FS because the FS IP is in the Contact Header.    
   - Why does Kam not change the contact header since the ACK should come back 
to Kam
   - If this is normal what do I need to do to change the contact header for 
the 200K to the UA to make this work.
KD 
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Transport question

2018-05-15 Thread Alex Balashov
Have a read about 'mhomed' works and see if it might make sense to turn
it off or on:

https://www.kamailio.org/wiki/cookbooks/5.1.x/core#mhomed

Otherwise, for experimentation's sake, try mhomed=0 and force the
outgoing listener explicitly:

   $fs = 'tcp:x.x.x.x:5060';

   ...

   t_relay();

-- Alex

On Tue, May 15, 2018 at 04:38:59PM +, Wilkins, Steve wrote:

> Yes there is an error.  I get this error trying both ways =>
> no corresponding socket found for "111.25.1.99" af 2 (udp: 111.25.1.99:5060). 
>  It is still trying to send UDP.   111.25.1.99 is accepting TCP traffic, 
> other calls are reaching via other sources using TCP.
> 
> I'm just not sure why it is refusing to send tcp.
> 
> -Steve
> 
> -Original Message-
> From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Alex 
> Balashov
> Sent: Tuesday, May 15, 2018 12:20 PM
> To: Kamailio (SER) - Users Mailing List 
> Subject: Re: [SR-Users] Transport question
> 
> Are there any errors in the logs suggestive of a failure to select an 
> appropriate egress listener?
> 
> On Tue, May 15, 2018 at 04:14:07PM +, Wilkins, Steve wrote:
> 
> > Hi Alex,
> > 
> > I tried your suggestion and everything is still going over UDP.  I verified 
> > with tcpdump/wireshark and all SIP traffic is UDP.
> > 
> > Thank you,
> > -Steve
> > 
> > -Original Message-
> > From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf 
> > Of Alex Balashov
> > Sent: Tuesday, May 15, 2018 11:44 AM
> > To: Kamailio (SER) - Users Mailing List 
> > Subject: Re: [SR-Users] Transport question
> > 
> > Hi Steve,
> > 
> > Do you have a TCP listener from which the messages would be expected to 
> > egress?
> > 
> > Also, try use regular t_relay(), but beforehand do:
> > 
> >$ru = $ru + ";transport=TCP";
> > 
> > -- Alex
> > 
> > On Tue, May 15, 2018 at 03:43:26PM +, Wilkins, Steve wrote:
> > 
> > > Hi All,
> > > 
> > > I was attempting to switch from UDP to TCP for relaying.  I used
> > > t_relay_to_tcp() instead of t_relay() =>
> > > 
> > > if (!t_relay_to_tcp()) {
> > >sl_reply_error();
> > > }
> > > 
> > > The problem is that I am still seeing the SIP messages as UDP on the 
> > > Server that the messages are relayed to.  Any Ideas?
> > > 
> > > Thank you,
> > > Steve
> > 
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > 
> > 
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> > 
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > 
> > ___
> > 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
> 
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> 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

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] Transport question

2018-05-15 Thread Juha Heinanen
Wilkins, Steve writes:

> I tried your suggestion and everything is still going over UDP.  I
> verified with tcpdump/wireshark and all SIP traffic is UDP.

Check your send socket, i.e., that it listens on TCP.

-- Juha

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


Re: [SR-Users] Transport question

2018-05-15 Thread Alex Balashov
Are there any errors in the logs suggestive of a failure to select an
appropriate egress listener?

On Tue, May 15, 2018 at 04:14:07PM +, Wilkins, Steve wrote:

> Hi Alex, 
> 
> I tried your suggestion and everything is still going over UDP.  I verified 
> with tcpdump/wireshark and all SIP traffic is UDP.
> 
> Thank you,
> -Steve
> 
> -Original Message-
> From: sr-users [mailto:sr-users-boun...@lists.kamailio.org] On Behalf Of Alex 
> Balashov
> Sent: Tuesday, May 15, 2018 11:44 AM
> To: Kamailio (SER) - Users Mailing List 
> Subject: Re: [SR-Users] Transport question
> 
> Hi Steve,
> 
> Do you have a TCP listener from which the messages would be expected to 
> egress?
> 
> Also, try use regular t_relay(), but beforehand do:
> 
>$ru = $ru + ";transport=TCP";
> 
> -- Alex
> 
> On Tue, May 15, 2018 at 03:43:26PM +, Wilkins, Steve wrote:
> 
> > Hi All,
> > 
> > I was attempting to switch from UDP to TCP for relaying.  I used 
> > t_relay_to_tcp() instead of t_relay() =>
> > 
> > if (!t_relay_to_tcp()) {
> >sl_reply_error();
> > }
> > 
> > The problem is that I am still seeing the SIP messages as UDP on the Server 
> > that the messages are relayed to.  Any Ideas?
> > 
> > Thank you,
> > Steve
> 
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
> 
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> 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

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] Transport question

2018-05-15 Thread Alex Balashov
Hi Steve,

Do you have a TCP listener from which the messages would be expected to
egress?

Also, try use regular t_relay(), but beforehand do:

   $ru = $ru + ";transport=TCP";

-- Alex

On Tue, May 15, 2018 at 03:43:26PM +, Wilkins, Steve wrote:

> Hi All,
> 
> I was attempting to switch from UDP to TCP for relaying.  I used 
> t_relay_to_tcp() instead of t_relay() =>
> 
> if (!t_relay_to_tcp()) {
>sl_reply_error();
> }
> 
> The problem is that I am still seeing the SIP messages as UDP on the Server 
> that the messages are relayed to.  Any Ideas?
> 
> Thank you,
> Steve

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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


[SR-Users] Transport question

2018-05-15 Thread Wilkins, Steve
Hi All,

I was attempting to switch from UDP to TCP for relaying.  I used 
t_relay_to_tcp() instead of t_relay() =>

if (!t_relay_to_tcp()) {
   sl_reply_error();
}

The problem is that I am still seeing the SIP messages as UDP on the Server 
that the messages are relayed to.  Any Ideas?

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


Re: [SR-Users] Last negative 5XX reply not getting relayed

2018-05-15 Thread Sergiu Pojoga
Thanks Federico, that did the trick!

On Tue, May 15, 2018 at 3:51 AM, Alex Balashov 
wrote:

> On Tue, May 15, 2018 at 09:48:11AM +0200, Federico Cabiddu wrote:
>
> > Hi,
> > rfc 3261 (the one and only) states at section16.7
> >
> > "
> >  A proxy which receives a 503 (Service Unavailable) response
> >  SHOULD NOT forward it upstream unless it can determine that any
> >  subsequent requests it might proxy will also generate a 503.
> >  In other words, forwarding a 503 means that the proxy knows it
> >  cannot service any requests, not just the one for the Request-
> >  URI in the request which generated the 503.  If the only
> >  response that was received is a 503, the proxy SHOULD generate
> >  a 500 response and forward that upstream.
> > "
> >
> > So Kamailio behavior is absolutely legitimate. If you want to change it
> you
> > have to use the following tm parameter: http://www.
> > kamailio.org/docs/modules/devel/modules/tm.html#remap_503_500.
>
> Oh yeah. How about that! (Re)learn something new every day. Cheers
> Federico! :-)
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> 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] ACC_CDRS table with src and dst data are inverted

2018-05-15 Thread Fred Posner

On 5/15/18 4:51 PM, Emanuele Gambaro wrote:

Hi to all,
I have some troubles with acc_db module and acc_cdrs table.
First scenario:
Alice calls Bob and after a while, when a call is established, Alice 
hangs up, sending a BYE. The acc_cdrs table is filled up with the right 
data:

* src_user, src_domain, src_ip are from Alice account (the caller)
* dst_user etc etc are from Bob account (the callee)
In this scenario all works as expected: the src data are from who starts 
the call, and the dst data are from who receives the call.


In the following scenario src and dst data are inverted.

Alice calls Bob and after a while, when a call is established, Bob hangs 
up, sending a BYE. The acc_cdrs table now is:
* src_user, src_domain, src_ip are from Bob account (the callee that 
sends the BYE message)

* dst_user etc etc are from Alice account (the caller that receives the BYE)

This is the intended behavior or I’m missing something? How I can record 
the CDR data with the right CALLER and CALLEE data ?


/Emanuele/



Hi Emanuele,

In the scenarios, the acc is recording the correct src and destination 
of the message that is received; with the src depending on the classic 
teenage question of "who hung up first?"


The difference here is that the accounting table and a CDR is somewhat 
different, but correlated by call-id. In the CDR, you would combine the 
events of the CALL-ID to make a start/end/duration of the call.


A good example of doing this is the stored procedure provided with siremis:

https://github.com/asipto/siremis/blob/master/siremis/modules/sipadmin/mod.install.siremis.sql

--fred

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


Re: [SR-Users] Whats is wrong in this call

2018-05-15 Thread Daniel Grotti

Hi Ssergey,
the ACK seem OK, but the R-URI does not contain the "sip.instance" 
parameter defined in the 200 OK's Contact. Usually all contact parameter 
should be preserved when constructing the ACK R-URI.
Does your server receive the ACK, but it is not able to forward it back 
to the callee (if yes, do you see any ERROR in the logs) ?

Or it just don't receive the ACK at all?

Daniel





On 05/14/2018 08:39 PM, Sergey Safarov wrote:

Hello
I have a call with not passed ACK by Kamailio. http://prntscr.com/jhtobo
Same behaviour i looked before when SIP endpoint contact string is wrong
In this call look as contact string correct is correct (packets 7 and 
8) and i not understand why ACK (packet 9) not passed to callee.


Could you help me understand this.

PCAP file is create using homer tracer and TCP transport packets is 
stored as UDP.

Sergey


___
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] Last negative 5XX reply not getting relayed

2018-05-15 Thread Alex Balashov
On Tue, May 15, 2018 at 09:48:11AM +0200, Federico Cabiddu wrote:

> Hi,
> rfc 3261 (the one and only) states at section16.7
> 
> "
>  A proxy which receives a 503 (Service Unavailable) response
>  SHOULD NOT forward it upstream unless it can determine that any
>  subsequent requests it might proxy will also generate a 503.
>  In other words, forwarding a 503 means that the proxy knows it
>  cannot service any requests, not just the one for the Request-
>  URI in the request which generated the 503.  If the only
>  response that was received is a 503, the proxy SHOULD generate
>  a 500 response and forward that upstream.
> "
> 
> So Kamailio behavior is absolutely legitimate. If you want to change it you
> have to use the following tm parameter: http://www.
> kamailio.org/docs/modules/devel/modules/tm.html#remap_503_500.

Oh yeah. How about that! (Re)learn something new every day. Cheers
Federico! :-)

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] Last negative 5XX reply not getting relayed

2018-05-15 Thread Federico Cabiddu
Hi,
rfc 3261 (the one and only) states at section16.7

"
 A proxy which receives a 503 (Service Unavailable) response
 SHOULD NOT forward it upstream unless it can determine that any
 subsequent requests it might proxy will also generate a 503.
 In other words, forwarding a 503 means that the proxy knows it
 cannot service any requests, not just the one for the Request-
 URI in the request which generated the 503.  If the only
 response that was received is a 503, the proxy SHOULD generate
 a 500 response and forward that upstream.
"

So Kamailio behavior is absolutely legitimate. If you want to change it you
have to use the following tm parameter: http://www.
kamailio.org/docs/modules/devel/modules/tm.html#remap_503_500.

Best regards,

Federico

On Mon, May 14, 2018 at 6:29 PM, Sergiu Pojoga  wrote:

> Hi Alex,
>
> # - tm params -
> modparam("tm", "failure_reply_mode", 3)
>
> I use drouting, here's the main logic.
>
> request_route {
>
>  ...
>
> if (is_method("INVITE") && !has_totag()) {
> ...
>
> # handle DR failure
> t_on_failure("MANAGE_DR_FAILURE");
>
> if (!do_routing("$avp(drgroup)")) {
>   sl_reply("503", "Unknown destination");
>   exit;
>  }
>
> # Relay the request to gateway
> route(DR_RELAY);
> }
>
> }
>
> # DR relay
> route[DR_RELAY] {
>
> if (!route(RELAY)) {
> sl_reply_error();
> };
> exit;
> }
>
> # DRouting failure route
> failure_route[MANAGE_DR_FAILURE] {
>
> if (t_is_canceled()) {
> exit;
> }
>
> if (t_check_status("486|600")) {
> xlog("L_INFO", "received BUSY, stop trying");  # --
> curious, 486 gets relayed fine
> exit;
> }
>
> # try next GW
> if (use_next_gw()) {
> t_on_failure("MANAGE_DR_FAILURE");
>
> xlog("L_INFO", "MANAGE_DR_FAILURE: Call from <$fu> with
> username <$fU> going to <$ru>\n");
> route(RELAY);
> exit;
>
> # -- Trunk failover to PSTN number
> } else if (is_avp_set("$avp(s:failover)") && $avp(direction) ==
> "in") {
> $ru="sip:" + $avp(s:failover) + "@someothergateway.com";
> # -- basic routing, to improve by sending back to DRouting with updated $rU
> xlog("L_INFO", "MANAGE_DR_FAILURE: No more gateways,
> sending call to trunk failover destination <$ru>...\n");
> route(RELAY);
>
> } else {
> xlog("L_WARN", "No more routes available\n");
> #t_reply ("503", "Service Unavailable");# -- why
> do we have to force a reply instead of proxy relaying whatever it is
> exit;
> }
> }
>
>
>
> On Mon, May 14, 2018 at 11:34 AM, Alex Balashov  > wrote:
>
>> Hi,
>>
>> 1. Do you have a failure_route for this transaction? If so, can you
>> provide it?
>>
>> 2. Make sure the `failure_reply_mode` modparam for TM is set to 3, which
>> is default anyway:
>>
>> https://kamailio.org/docs/modules/5.1.x/modules/tm.html#tm.p
>> .failure_reply_mode
>>
>> -- Alex
>>
>> On Mon, May 14, 2018 at 11:33:15AM -0400, Sergiu Pojoga wrote:
>>
>> > Not sure if it's a default Kamailio behavior or something I'm doing
>> wrong...
>> >
>> > When receiving a negative reply for an INVITE (more like in the 5xx
>> range),
>> > proxy doesn't relay the message to the originator but instead issues
>> it's
>> > own "500 Service Unavailable".
>> >
>> > That doesn't happen, from observations so far, to "603 Declined" or "486
>> > Busy Here" or "404 Not Found" or "200 OK" replies.
>> >
>> > *For example, here's the negative reply proxy receives from the callee:*
>> >
>> > 2018/05/14 10:52:37.716627 65.XX.XX.166:5060 -> 65.XX.XX.167:5060
>> > SIP/2.0 503 Service Unavailable
>> > Via: SIP/2.0/UDP
>> > 65.xx.xx.167;branch=z9hG4bK9223.00b4f3143d245a895c4bb6a107ad
>> d258.0;received=65.xx.xx.167;rport=5060
>> > Via: SIP/2.0/UDP
>> > 205.xx.xx.221;received=205.xx.xx.221;rport=5060;branch=z9hG4
>> bKQ4XpXga0vgZ8B
>> > From: "514XXX" ;tag=tXj0NHrje9jNS
>> > To: ;tag=as18e452b7
>> > Call-ID: 48eac296-d229-1236-a685-005056a149a4
>> > CSeq: 122818714 INVITE
>> > Server: Asterisk
>> > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
>> INFO,
>> > PUBLISH, MESSAGE
>> > Supported: replaces, timer
>> > Session-Expires: 1800;refresher=uas
>> > X-Asterisk-HangupCause: Subscriber absent
>> > X-Asterisk-HangupCauseCode: 20
>> > Content-Length: 0
>> >
>> > *Here's what the originator gets in the final message:*
>> >
>> > 2018/05/14 10:52:37.718143 65.xx.xx.167:5060 -> 205.xx.xx.221:5060
>> > SIP/2.0 500 Service Unavailable
>> > Via: SIP/2.0/UDP
>> > 

Re: [SR-Users] UAC Module Registration Table

2018-05-15 Thread Alex Balashov
Hi Greg,

Unfortunately, it looks like registrations are initiated only by the
uac_reg_timer(). However, given that this timer function seems to lock
only local entities inside the uacreg componentry of uac, there's
probably no harm in running it with a low interval. Then you can call
the RPC disable/enable commands in order to toggle the status of a
remote registration.

-- Alex

On Mon, May 14, 2018 at 04:30:16PM +, Greg Adams wrote:

> Hey there,
> 
> 
> I am currently using the UAC module to maintain remote registrations. I am 
> just curious if it is possible to register new users immediately rather than 
> waiting for reg_timer_interval? I am not seeing any functionality like that 
> but just wondering if I am missing something or if it would be possible to 
> add in. For example an RPC command that takes a key and instantly registers 
> that user.
> 
> 
> Thanks,
> 
> 
> Greg

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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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