Re: [OpenSIPS-Users] Registration passthrough

2023-06-01 Thread Daniel Zanutti
Check if you are manipulating contact with some function like fix_contact()
or usage of media proxy solutions like rtpproxy, rtpengine or mediaproxy.

Opensips doesn't change Contact if you don't tell to do it.

On Thu, Jun 1, 2023 at 12:57 PM nutxase  wrote:

> even with a stateless forward asterisk see's this
>
>
>   Contact:  1000/sip:609q2255@opensipsip:5060 ee32101394 NonQual
> nan
>
> but i wanted it to be
>   Contact:  1000/sip:609q2255@uacip:5060 ee32101394 NonQual
> nan
>
> Sent with Proton Mail  secure email.
>
> --- Original Message ---
> On Thursday, June 1st, 2023 at 3:00 PM, nutxase via Users <
> users@lists.opensips.org> wrote:
>
> Hi Daniel
>
> Thanks for the reply
>
> So it seems asterisk pjsip shows the contact as the ip of opensips not the
> uac
> i will try with stateless as i just want to forward it via opensips and
> asterisk to not know opensips
>
>
> Sent with Proton Mail  secure email.
>
> --- Original Message ---
> On Thursday, June 1st, 2023 at 1:59 PM, Daniel Zanutti <
> daniel.zanu...@gmail.com> wrote:
>
> Hi
>
> By standard, opensips does not change the Contact and your asterisk box
> should receive the original Contact, sent by UAC. Are you sure the contact
> is being changed by Opensips? I saw asterisk ignoring the contact and
> putting source IP and origin some times. Long time I don't work with
> asterisk...
>
> Also, you can check the stateless forward, it may be enough for you (not
> sure):
> https://www.opensips.org/Documentation/Script-CoreFunctions-3-1#toc17
>
> Suggestion:
>
> Monitore SIP trace and confirm if Opensips is changing the contact
> (probably not)
>
>
>
>
> On Wed, May 31, 2023 at 10:54 AM nutxase via Users <
> users@lists.opensips.org> wrote:
>
>> Hey guys
>>
>> I have set opensips to take registrations and pass them through to
>> asterisk using the below
>> but my question is how can i make it set the contact to the ip of the uac
>> and not the ip of opensips ?
>>
>> if (is_method("REGISTER")) {
>> sethostport("sip.asterisk.xyz:50 60");
>> route(toasterisk);
>> }
>>
>> route[toasterisk] {
>> if (!t_relay()) {
>> xlog("(Rewriting) t_relay 1 - M=$rm RURI=$ru F=$fu T=$tu IP=$si
>> ID=$ci\n");
>> sl_reply_error();
>> }
>>
>> Sent with Proton Mail  secure email.
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips is starting so many process un-necessarily .

2023-06-01 Thread richard.robson
Are you using auto scaling?You are not defining udp workers either and the 
default is 8. You have it commented it out.So that should be at least 10 
processes.On Thu, 1 Jun 2023, 12:38 Sasmita Panda,  
wrote:In 3.2 I think we are not defining children per process . We have 
udp_worker or tcp_worker . 
log_level=4log_stderror=nolog_facility=LOG_LOCAL5#udp_workers=4tcp_workers=2disable_dns_blacklist=yesThis
 is my configuration . Thanks & RegardsSasmita PandaSenior Network Testing and 
Software Engineer3CLogic , ph:07827611765On Thu, Jun 1, 2023 at 4:53 PM Richard 
Robson  wrote:How many children are defined in your 
script. You will get one process per childRichardOn Thu, 1 Jun 2023, 11:47 
Sasmita Panda,  wrote:Hi All , I am using opensips 3.2  
version: opensips 3.2.3 (x86_64/linux)flags: STATS: On, DISABLE_NAGLE, 
USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, 
FAST_LOCK-ADAPTIVE_WAITADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, 
MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535poll method support: poll, 
epoll, sigio_rt, select.svn revision: 3831:3864main.c compiled on 07:29:49 Jun 
21 2022 with gcc 10When I am initially starting the service I am getting a 
single process running . After some time when I am checking there are so many 
processes running automatically . I have pasted the output of the below file . 
Please update here what's the reason behind this .   
https://pastebin.com/gu3Js6FeThanks & RegardsSasmita PandaSenior Network 
Testing and Software Engineer3CLogic , ph:07827611765
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Remove Route Header!

2023-06-01 Thread morris edery
Hello Team,
I am trying to remove Route Header (seems like preloaded)
remove_hf("Route")  but  it's not being removed.

i tried to put it in several places on the code but no success

  if (is_method("INVITE"))
{
  if (is_present_hf("Route"))
  {
xlog("removing Route Header: $(hdr(Route)[0])\n");

 remove_hf("Route");

xlog ( "Route Header still present?: $(hdr(Route)[0])\n"
);
  }
 route(RELAY);
}


instead of it goes to


if (loose_route())
{
  xlog("L_ERR","Attempt to route with preloaded Route's
[$fu/$tu/$ru/$ci]")

if (!is_method("ACK")){
 send_reply("403","Preload Route denied");
exit;
}
}



opensips 2.4.8


what i am doing wrong ?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registration passthrough

2023-06-01 Thread nutxase via Users
even with a stateless forward asterisk see's this

Contact: 1000/sip:609q2255@opensipsip:5060 ee32101394 NonQual nan

but i wanted it to be
Contact: 1000/sip:609q2255@uacip:5060 ee32101394 NonQual nan

Sent with [Proton Mail](https://proton.me/) secure email.

--- Original Message ---
On Thursday, June 1st, 2023 at 3:00 PM, nutxase via Users 
 wrote:

> Hi Daniel
>
> Thanks for the reply
>
> So it seems asterisk pjsip shows the contact as the ip of opensips not the uac
> i will try with stateless as i just want to forward it via opensips and 
> asterisk to not know opensips
>
> Sent with [Proton Mail](https://proton.me/) secure email.
>
> --- Original Message ---
> On Thursday, June 1st, 2023 at 1:59 PM, Daniel Zanutti 
>  wrote:
>
>> Hi
>>
>> By standard, opensips does not change the Contact and your asterisk box 
>> should receive the original Contact, sent by UAC. Are you sure the contact 
>> is being changed by Opensips? I saw asterisk ignoring the contact and 
>> putting source IP and origin some times. Long time I don't work with 
>> asterisk...
>>
>> Also, you can check the stateless forward, it may be enough for you (not 
>> sure):
>> https://www.opensips.org/Documentation/Script-CoreFunctions-3-1#toc17
>>
>> Suggestion:
>>
>> Monitore SIP trace and confirm if Opensips is changing the contact (probably 
>> not)
>>
>> On Wed, May 31, 2023 at 10:54 AM nutxase via Users 
>>  wrote:
>>
>>> Hey guys
>>>
>>> I have set opensips to take registrations and pass them through to asterisk 
>>> using the below
>>> but my question is how can i make it set the contact to the ip of the uac 
>>> and not the ip of opensips ?
>>>
>>> if (is_method("REGISTER")) {
>>> sethostport("[sip.asterisk.xyz:50](http://node3.sipalto.com:5080)60");
>>> route(toasterisk);}
>>>
>>> route[toasterisk] {
>>> if (!t_relay()) {
>>> xlog("(Rewriting) t_relay 1 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>> sl_reply_error(); }
>>>
>>> Sent with [Proton Mail](https://proton.me/) secure email.
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registration passthrough

2023-06-01 Thread nutxase via Users
Hi Daniel

Thanks for the reply

So it seems asterisk pjsip shows the contact as the ip of opensips not the uac
i will try with stateless as i just want to forward it via opensips and 
asterisk to not know opensips

Sent with [Proton Mail](https://proton.me/) secure email.

--- Original Message ---
On Thursday, June 1st, 2023 at 1:59 PM, Daniel Zanutti 
 wrote:

> Hi
>
> By standard, opensips does not change the Contact and your asterisk box 
> should receive the original Contact, sent by UAC. Are you sure the contact is 
> being changed by Opensips? I saw asterisk ignoring the contact and putting 
> source IP and origin some times. Long time I don't work with asterisk...
>
> Also, you can check the stateless forward, it may be enough for you (not 
> sure):
> https://www.opensips.org/Documentation/Script-CoreFunctions-3-1#toc17
>
> Suggestion:
>
> Monitore SIP trace and confirm if Opensips is changing the contact (probably 
> not)
>
> On Wed, May 31, 2023 at 10:54 AM nutxase via Users  
> wrote:
>
>> Hey guys
>>
>> I have set opensips to take registrations and pass them through to asterisk 
>> using the below
>> but my question is how can i make it set the contact to the ip of the uac 
>> and not the ip of opensips ?
>>
>> if (is_method("REGISTER")) {
>> sethostport("[sip.asterisk.xyz:50](http://node3.sipalto.com:5080)60");
>> route(toasterisk);}
>>
>> route[toasterisk] {
>> if (!t_relay()) {
>> xlog("(Rewriting) t_relay 1 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>> sl_reply_error(); }
>>
>> Sent with [Proton Mail](https://proton.me/) secure email.
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registration passthrough

2023-06-01 Thread Daniel Zanutti
Hi

By standard, opensips does not change the Contact and your asterisk box
should receive the original Contact, sent by UAC. Are you sure the contact
is being changed by Opensips? I saw asterisk ignoring the contact and
putting source IP and origin some times. Long time I don't work with
asterisk...

Also, you can check the stateless forward, it may be enough for you (not
sure):
https://www.opensips.org/Documentation/Script-CoreFunctions-3-1#toc17

Suggestion:

Monitore SIP trace and confirm if Opensips is changing the contact
(probably not)




On Wed, May 31, 2023 at 10:54 AM nutxase via Users 
wrote:

> Hey guys
>
> I have set opensips to take registrations and pass them through to
> asterisk using the below
> but my question is how can i make it set the contact to the ip of the uac
> and not the ip of opensips ?
>
> if (is_method("REGISTER")) {
> sethostport("sip.asterisk.xyz:50 
> 60");
> route(toasterisk);
> }
>
> route[toasterisk] {
>   if (!t_relay()) {
>xlog("(Rewriting) t_relay 1 - M=$rm RURI=$ru F=$fu T=$tu
> IP=$si ID=$ci\n");
>   sl_reply_error();
>}
>
> Sent with Proton Mail  secure email.
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips is starting so many process un-necessarily .

2023-06-01 Thread Sasmita Panda
In 3.2 I think we are not defining children per process . We have
udp_worker or tcp_worker .

log_level=4
log_stderror=no
log_facility=LOG_LOCAL5

#udp_workers=4
tcp_workers=2

disable_dns_blacklist=yes

This is my configuration .


*Thanks & Regards*
*Sasmita Panda*
*Senior Network Testing and Software Engineer*
*3CLogic , ph:07827611765*


On Thu, Jun 1, 2023 at 4:53 PM Richard Robson 
wrote:

> How many children are defined in your script. You will get one process per
> child
>
> Richard
>
> On Thu, 1 Jun 2023, 11:47 Sasmita Panda,  wrote:
>
>> Hi All ,
>>
>>
>> I am using opensips 3.2
>> version: opensips 3.2.3 (x86_64/linux)
>> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
>> Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
>> MAX_URI_SIZE 1024, BUF_SIZE 65535
>> poll method support: poll, epoll, sigio_rt, select.
>> svn revision: 3831:3864
>> main.c compiled on 07:29:49 Jun 21 2022 with gcc 10
>>
>> When I am initially starting the service I am getting a single process
>> running . After some time when I am checking there are so many processes
>> running automatically . I have pasted the output of the below file .
>>
>> Please update here what's the reason behind this .
>>
>> https://pastebin.com/gu3Js6Fe
>>
>>
>>
>> *Thanks & Regards*
>> *Sasmita Panda*
>> *Senior Network Testing and Software Engineer*
>> *3CLogic , ph:07827611765*
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips is starting so many process un-necessarily .

2023-06-01 Thread Richard Robson
How many children are defined in your script. You will get one process per
child

Richard

On Thu, 1 Jun 2023, 11:47 Sasmita Panda,  wrote:

> Hi All ,
>
>
> I am using opensips 3.2
> version: opensips 3.2.3 (x86_64/linux)
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll, sigio_rt, select.
> svn revision: 3831:3864
> main.c compiled on 07:29:49 Jun 21 2022 with gcc 10
>
> When I am initially starting the service I am getting a single process
> running . After some time when I am checking there are so many processes
> running automatically . I have pasted the output of the below file .
>
> Please update here what's the reason behind this .
>
> https://pastebin.com/gu3Js6Fe
>
>
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Senior Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Opensips is starting so many process un-necessarily .

2023-06-01 Thread Sasmita Panda
Hi All ,


I am using opensips 3.2
version: opensips 3.2.3 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
svn revision: 3831:3864
main.c compiled on 07:29:49 Jun 21 2022 with gcc 10

When I am initially starting the service I am getting a single process
running . After some time when I am checking there are so many processes
running automatically . I have pasted the output of the below file .

Please update here what's the reason behind this .

https://pastebin.com/gu3Js6Fe



*Thanks & Regards*
*Sasmita Panda*
*Senior Network Testing and Software Engineer*
*3CLogic , ph:07827611765*
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users