Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

2022-10-19 Thread Bela H
I hope this helps:
https://opensips.org/docs/modules/3.2.x/sipmsgops.html#func_remove_hf


From: Nitesh Divecha
Sent: Thursday, 20 October 2022 12:29
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

Bela,

Much appreciated!

Changing topolgy_hiding("C"); fixed the Call-ID issue.

Call-ID shows clean Call-ID: DLGCH_W0xtTFgVXWleUV1fVgFvEiVSRVdabgccAltXbUFf

Now gotta figure out how to stop sending Originator User-Agent to outbound 
provider and how to configure rtpproxy behind NAT.

Cheers,
Nitesh



On Wed, Oct 19, 2022 at 5:35 PM Bela H 
mailto:hob...@hotmail.com>> wrote:

For the first problem check this:
C - Encode the callid header
Note: Changing the callid of the call using the "C" flag is only available when 
doing topology_hiding with dialog support. Using this flag without dialog 
support will not change the callid at all!.

From: Nitesh Divecha
Sent: Thursday, 20 October 2022 10:09
To: Bogdan-Andrei Iancu
Cc: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

Hello All,

So I had some success using topology_hiding and rtpproxy but found few problems.

After implementing topology_hiding(), SIP INVITE was much better but still 
showing following:

INVITE 
sip:aaabbbc...@outboundprovider.com:5060
 SIP/2.0
Call-ID: 4ed41738da10faa5@172.16.16.250 
<<<-- showing originators Device LAN IP —>>>
Content-Length: 329
CSeq: 8002 INVITE
From: 
mailto:sip%3azzz...@outboundprovider.com>>;tag=SP39b79130abfb7487f
Max-Forwards: 69
To: 
Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0
User-Agent: OBIHAI/OBi302-3.2.2.6259 <<<-- showing originators User-Agent —>>>
Contact: 
Expires: 60
Supported: replaces
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
Content-Type: application/sdp

===
1) How can I remove IP from Call-ID and rewrite Originators User-Agent to local 
OpenSIPS User-Agent?
===


Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS cloud 
does natting by default, so my Public IP is 3.xxx.xxx.49 and actual VM IP is 
172.31.29.47.

After implement rtpproxy (https://www.rtpproxy.org/), it is running on local IP:
└─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 2 -u rtpproxy rtpproxy 
-p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000 -d INFO 
LOG_LOCAL5
As it shows from SIP INVITE and due to that no audio or RTP because IP is not 
reachable...

v=0
o=- 16210664 1 IN IP4 172.31.29.47 <<<-- OpenSIPS NAT IP —>>>
s=-
c=IN IP4 172.31.29.47 <<<-- OpenSIPS NAT IP —>>>
t=0 0
m=audio 1958 RTP/AVP 0 8 18 104 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:104 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
a=xg726bitorder:big-endian
a=nortpproxy:yes

===
2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy with 
Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP?
modparam("rtpproxy", "rtpproxy_sock", 
"udp:172.31.29.47:2")

Thanking in advance...

Cheers,
Nitesh





On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha 
mailto:aviator.nites...@gmail.com>> wrote:
Hello,

Thank y'all for the input... I will try to read the documentation and work on 
implementing these modules.

By any chance do either of you have any working examples which I can refer to? 
I'm a work in progress and every time I change something I break OpenSIPS and 
it takes me hours to troubleshoot! :-)

Thanking in advance...

Cheers,
Nitesh



On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:
Hi there,

Actually you do not need the B2B, you can achieve the same kind of privacy (at 
SIP level) with dialog module and topology_hiding module together.

Regards,

Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Bootcamp 5-16 Dec 2022, online

  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
On 10/19/22 1:23 AM, Abdul Basit wrote:
Nitesh,

You need a B2BUA 
function
 with the help of a topo-hiding module with opensips as Bela shared in his 
email.
Also, install the RTP proxy on the same opensips box (not necessary if you need 
separate signaling and media boxes).

Far end party will not be able to see the A-party information.

https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2

I hope this will help.

--
regards,

abdul basit

On Wed, 19 Oct 2022 at 03:14, Bela H 
mailto:hob...@hotmail.com>> wrote:
Hi Nitesh,


  1.  Check the topology hiding function: 

Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

2022-10-19 Thread Nitesh Divecha
Bela,

Much appreciated!

Changing topolgy_hiding("C"); fixed the Call-ID issue.

Call-ID shows clean Call-ID:
*DLGCH_W0xtTFgVXWleUV1fVgFvEiVSRVdabgccAltXbUFf*

Now gotta figure out how to stop sending Originator User-Agent to outbound
provider and how to configure rtpproxy behind NAT.

Cheers,
Nitesh



On Wed, Oct 19, 2022 at 5:35 PM Bela H  wrote:

>
>
> For the first problem check this:
>
> *C* - Encode the callid header
>
> *Note:* Changing the callid of the call using the "C" flag is only
> available when doing topology_hiding with *dialog support*. Using this
> flag without dialog support will not change the callid at all!.
>
>
>
> *From: *Nitesh Divecha 
> *Sent: *Thursday, 20 October 2022 10:09
> *To: *Bogdan-Andrei Iancu 
> *Cc: *OpenSIPS users mailling list 
> *Subject: *Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP
> info
>
>
>
> Hello All,
>
>
>
> So I had some success using topology_hiding and rtpproxy but found few
> problems.
>
>
>
> After implementing topology_hiding(), SIP INVITE was much better but still
> showing following:
>
>
>
> INVITE sip:aaabbbc...@outboundprovider.com:5060 SIP/2.0
>
> Call-ID: 4ed41738da10faa5@172.16.16.250 *<<<-- showing originators Device
> LAN IP —>>>*
>
> Content-Length: 329
> CSeq: 8002 INVITE
> From: ;tag=SP39b79130abfb7487f
> Max-Forwards: 69
> To: 
> Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0
> User-Agent: OBIHAI/OBi302-3.2.2.6259 *<<<-- showing originators
> User-Agent —>>>*
> Contact: 
> Expires: 60
> Supported: replaces
> Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
> Content-Type: application/sdp
>
> ===
>
> 1) How can I remove IP from Call-ID and rewrite Originators User-Agent to
> local OpenSIPS User-Agent?
>
> ===
>
>
>
>
>
> Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS
> cloud does natting by default, so my Public IP is 3.xxx.xxx.49 and actual
> VM IP is *172.31.29.47. *
>
>
>
> After implement rtpproxy (https://www.rtpproxy.org/), it is running on
> local IP:
>
> └─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 2 -u rtpproxy
> rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000
> -d INFO LOG_LOCAL5
>
> As it shows from SIP INVITE and due to that no audio or RTP because IP is
> not reachable...
>
>
>
> v=0
> o=- 16210664 1 IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>*
> s=-
> c=IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>*
> t=0 0
> m=audio 1958 RTP/AVP 0 8 18 104 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=rtpmap:104 G726-32/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=sendrecv
> a=ptime:20
> a=xg726bitorder:big-endian
> a=nortpproxy:yes
>
>
>
> ===
>
> 2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy
> with Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP?
>
> modparam("rtpproxy", "rtpproxy_sock", "udp:172.31.29.47:2")
>
>
>
> Thanking in advance...
>
>
>
> Cheers,
>
> Nitesh
>
>
>
>
>
>
>
>
>
>
>
> On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha <
> aviator.nites...@gmail.com> wrote:
>
> Hello,
>
>
>
> Thank y'all for the input... I will try to read the documentation and work
> on implementing these modules.
>
>
>
> By any chance do either of you have any working examples which I can refer
> to? I'm a work in progress and every time I change something I break
> OpenSIPS and it takes me hours to troubleshoot! :-)
>
>
>
> Thanking in advance...
>
>
>
> Cheers,
>
> Nitesh
>
>
>
>
>
>
>
> On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu 
> wrote:
>
> Hi there,
>
> Actually you do not need the B2B, you can achieve the same kind of privacy
> (at SIP level) with dialog module and topology_hiding module together.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
>
>
> OpenSIPS Founder and Developer
>
>   https://www.opensips-solutions.com
>
> OpenSIPS Bootcamp 5-16 Dec 2022, online
>
>   https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>
> On 10/19/22 1:23 AM, Abdul Basit wrote:
>
> Nitesh,
>
>
>
> You need a B2BUA function
> 
>  with
> the help of a topo-hiding module with opensips as Bela shared in his email.
>
> Also, install the RTP proxy on the same opensips box (not necessary if you
> need separate signaling and media boxes).
>
>
>
> Far end party will not be able to see the A-party information.
>
>
>
> https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2
>
>
>
> I hope this will help.
>
>
> --
> regards,
>
>
> abdul basit
>
>
>
> On Wed, 19 Oct 2022 at 03:14, Bela H  wrote:
>
> Hi Nitesh,
>
>
>
>1. Check the topology hiding function:
>https://opensips.org/docs/modules/3.2.x/topology_hiding.html
>2. Use e.g. rtpproxy:
>
> https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer
>
>
> http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English
>
> 

Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

2022-10-19 Thread Bela H

For the first problem check this:
C - Encode the callid header
Note: Changing the callid of the call using the "C" flag is only available when 
doing topology_hiding with dialog support. Using this flag without dialog 
support will not change the callid at all!.

From: Nitesh Divecha
Sent: Thursday, 20 October 2022 10:09
To: Bogdan-Andrei Iancu
Cc: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

Hello All,

So I had some success using topology_hiding and rtpproxy but found few problems.

After implementing topology_hiding(), SIP INVITE was much better but still 
showing following:

INVITE 
sip:aaabbbc...@outboundprovider.com:5060
 SIP/2.0
Call-ID: 4ed41738da10faa5@172.16.16.250 
<<<-- showing originators Device LAN IP —>>>
Content-Length: 329
CSeq: 8002 INVITE
From: 
mailto:sip%3azzz...@outboundprovider.com>>;tag=SP39b79130abfb7487f
Max-Forwards: 69
To: 
Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0
User-Agent: OBIHAI/OBi302-3.2.2.6259 <<<-- showing originators User-Agent —>>>
Contact: 
Expires: 60
Supported: replaces
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
Content-Type: application/sdp

===
1) How can I remove IP from Call-ID and rewrite Originators User-Agent to local 
OpenSIPS User-Agent?
===


Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS cloud 
does natting by default, so my Public IP is 3.xxx.xxx.49 and actual VM IP is 
172.31.29.47.

After implement rtpproxy (https://www.rtpproxy.org/), it is running on local IP:
└─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 2 -u rtpproxy rtpproxy 
-p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000 -d INFO 
LOG_LOCAL5
As it shows from SIP INVITE and due to that no audio or RTP because IP is not 
reachable...

v=0
o=- 16210664 1 IN IP4 172.31.29.47 <<<-- OpenSIPS NAT IP —>>>
s=-
c=IN IP4 172.31.29.47 <<<-- OpenSIPS NAT IP —>>>
t=0 0
m=audio 1958 RTP/AVP 0 8 18 104 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:104 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
a=xg726bitorder:big-endian
a=nortpproxy:yes

===
2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy with 
Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP?
modparam("rtpproxy", "rtpproxy_sock", 
"udp:172.31.29.47:2")

Thanking in advance...

Cheers,
Nitesh





On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha 
mailto:aviator.nites...@gmail.com>> wrote:
Hello,

Thank y'all for the input... I will try to read the documentation and work on 
implementing these modules.

By any chance do either of you have any working examples which I can refer to? 
I'm a work in progress and every time I change something I break OpenSIPS and 
it takes me hours to troubleshoot! :-)

Thanking in advance...

Cheers,
Nitesh



On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:
Hi there,

Actually you do not need the B2B, you can achieve the same kind of privacy (at 
SIP level) with dialog module and topology_hiding module together.

Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Bootcamp 5-16 Dec 2022, online

  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
On 10/19/22 1:23 AM, Abdul Basit wrote:
Nitesh,

You need a B2BUA 
function
 with the help of a topo-hiding module with opensips as Bela shared in his 
email.
Also, install the RTP proxy on the same opensips box (not necessary if you need 
separate signaling and media boxes).

Far end party will not be able to see the A-party information.

https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2

I hope this will help.

--
regards,

abdul basit

On Wed, 19 Oct 2022 at 03:14, Bela H 
mailto:hob...@hotmail.com>> wrote:
Hi Nitesh,


  1.  Check the topology hiding function: 
https://opensips.org/docs/modules/3.2.x/topology_hiding.html
  2.  Use e.g. rtpproxy:

https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer

http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English

https://github.com/sippy/rtpproxy

I hope these help!

Cheers,
Bela

From: Nitesh Divecha
Sent: Wednesday, 19 October 2022 04:26
To: OpenSIPS users mailling list
Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

Hello All,

This is my first OpenSIPS project so I'm a newbie!

After going back and forth with "uac_replace_from()", I was successfully able 
to make a call from my ATA -> OpenSIPS -> 

Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

2022-10-19 Thread Nitesh Divecha
Hello All,

So I had some success using topology_hiding and rtpproxy but found few
problems.

After implementing topology_hiding(), SIP INVITE was much better but still
showing following:

INVITE sip:aaabbbc...@outboundprovider.com:5060 SIP/2.0
Call-ID: 4ed41738da10faa5@172.16.16.250 *<<<-- showing originators Device
LAN IP —>>>*
Content-Length: 329
CSeq: 8002 INVITE
From: ;tag=SP39b79130abfb7487f
Max-Forwards: 69
To: 
Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0
User-Agent: OBIHAI/OBi302-3.2.2.6259 *<<<-- showing originators User-Agent
—>>>*
Contact: 
Expires: 60
Supported: replaces
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
Content-Type: application/sdp

===
1) How can I remove IP from Call-ID and rewrite Originators User-Agent to
local OpenSIPS User-Agent?
===


Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS
cloud does natting by default, so my Public IP is 3.xxx.xxx.49 and actual
VM IP is *172.31.29.47. *

After implement rtpproxy (https://www.rtpproxy.org/), it is running on
local IP:
└─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 2 -u rtpproxy
rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000
-d INFO LOG_LOCAL5

As it shows from SIP INVITE and due to that no audio or RTP because IP is
not reachable...

v=0
o=- 16210664 1 IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>*
s=-
c=IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>*
t=0 0
m=audio 1958 RTP/AVP 0 8 18 104 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:104 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
a=xg726bitorder:big-endian
a=nortpproxy:yes

===
2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy
with Public
IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP?
modparam("rtpproxy", "rtpproxy_sock", "udp:172.31.29.47:2")

Thanking in advance...

Cheers,
Nitesh





On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha 
wrote:

> Hello,
>
> Thank y'all for the input... I will try to read the documentation and work
> on implementing these modules.
>
> By any chance do either of you have any working examples which I can refer
> to? I'm a work in progress and every time I change something I break
> OpenSIPS and it takes me hours to troubleshoot! :-)
>
> Thanking in advance...
>
> Cheers,
> Nitesh
>
>
>
> On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi there,
>>
>> Actually you do not need the B2B, you can achieve the same kind of
>> privacy (at SIP level) with dialog module and topology_hiding module
>> together.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Bootcamp 5-16 Dec 2022, online
>>   https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>>
>> On 10/19/22 1:23 AM, Abdul Basit wrote:
>>
>> Nitesh,
>>
>> You need a B2BUA function
>> 
>>  with
>> the help of a topo-hiding module with opensips as Bela shared in his email.
>> Also, install the RTP proxy on the same opensips box (not necessary if
>> you need separate signaling and media boxes).
>>
>> Far end party will not be able to see the A-party information.
>>
>> https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2
>>
>> I hope this will help.
>>
>> --
>> regards,
>>
>> abdul basit
>>
>> On Wed, 19 Oct 2022 at 03:14, Bela H  wrote:
>>
>>> Hi Nitesh,
>>>
>>>
>>>
>>>1. Check the topology hiding function:
>>>https://opensips.org/docs/modules/3.2.x/topology_hiding.html
>>>2. Use e.g. rtpproxy:
>>>
>>> https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer
>>>
>>>
>>> http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English
>>>
>>> https://github.com/sippy/rtpproxy
>>>
>>>
>>>
>>> I hope these help!
>>>
>>>
>>>
>>> Cheers,
>>>
>>> Bela
>>>
>>>
>>>
>>> *From: *Nitesh Divecha 
>>> *Sent: *Wednesday, 19 October 2022 04:26
>>> *To: *OpenSIPS users mailling list 
>>> *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP info
>>>
>>>
>>>
>>> Hello All,
>>>
>>>
>>>
>>> This is my first OpenSIPS project so I'm a newbie!
>>>
>>>
>>>
>>> After going back and forth with "uac_replace_from()", I was successfully
>>> able to make a call from my ATA -> OpenSIPS -> Outbound Provider ->
>>> CellPhone. All worked fine with two-way audio except few issues:
>>>
>>>
>>>
>>> 1) Outbound Provider was able to see my ATA (Originator's
>>> IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows
>>> with Outbound provider. How can I block or strip all the Originator's
>>> contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I
>>> want to protect my Originators and don't want to show anything to the
>>> Outbound Provider. Outbound providers should only communicate to the
>>> OpenSIPS server.
>>>
>>>
>>>
>>> 2) 

[OpenSIPS-Users] Dispatcher module and partition

2022-10-19 Thread Alberto
Hi,

I'm using opensips 3.3.1 and I have a question about the dispatcher module.

Can I set different ds_ping_from, ds_ping_method, ds_probing_mode, and
ds_ping_interval per partition?

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


Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

2022-10-19 Thread Nitesh Divecha
Hello,

Thank y'all for the input... I will try to read the documentation and work
on implementing these modules.

By any chance do either of you have any working examples which I can refer
to? I'm a work in progress and every time I change something I break
OpenSIPS and it takes me hours to troubleshoot! :-)

Thanking in advance...

Cheers,
Nitesh



On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu 
wrote:

> Hi there,
>
> Actually you do not need the B2B, you can achieve the same kind of privacy
> (at SIP level) with dialog module and topology_hiding module together.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Bootcamp 5-16 Dec 2022, online
>   https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>
> On 10/19/22 1:23 AM, Abdul Basit wrote:
>
> Nitesh,
>
> You need a B2BUA function
> 
>  with
> the help of a topo-hiding module with opensips as Bela shared in his email.
> Also, install the RTP proxy on the same opensips box (not necessary if you
> need separate signaling and media boxes).
>
> Far end party will not be able to see the A-party information.
>
> https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2
>
> I hope this will help.
>
> --
> regards,
>
> abdul basit
>
> On Wed, 19 Oct 2022 at 03:14, Bela H  wrote:
>
>> Hi Nitesh,
>>
>>
>>
>>1. Check the topology hiding function:
>>https://opensips.org/docs/modules/3.2.x/topology_hiding.html
>>2. Use e.g. rtpproxy:
>>
>> https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer
>>
>>
>> http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English
>>
>> https://github.com/sippy/rtpproxy
>>
>>
>>
>> I hope these help!
>>
>>
>>
>> Cheers,
>>
>> Bela
>>
>>
>>
>> *From: *Nitesh Divecha 
>> *Sent: *Wednesday, 19 October 2022 04:26
>> *To: *OpenSIPS users mailling list 
>> *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP info
>>
>>
>>
>> Hello All,
>>
>>
>>
>> This is my first OpenSIPS project so I'm a newbie!
>>
>>
>>
>> After going back and forth with "uac_replace_from()", I was successfully
>> able to make a call from my ATA -> OpenSIPS -> Outbound Provider ->
>> CellPhone. All worked fine with two-way audio except few issues:
>>
>>
>>
>> 1) Outbound Provider was able to see my ATA (Originator's
>> IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows
>> with Outbound provider. How can I block or strip all the Originator's
>> contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I
>> want to protect my Originators and don't want to show anything to the
>> Outbound Provider. Outbound providers should only communicate to the
>> OpenSIPS server.
>>
>>
>>
>> 2) When the call was up I failed to capture any media/RTP on the OpenSIPS
>> server. I want to involve OpenSIPS in media/RTP between ATA and outbound
>> providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not
>> exposing Originator's IP.
>>
>>
>>
>> Any insights will be highly appreciated.
>>
>>
>>
>> Cheers,
>>
>> Nitesh
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://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-Devel] [Release] OpenSIPS 3.3.2, 3.2.9 and 3.1.12 minor releases

2022-10-19 Thread Liviu Chircu

Hi, all!

The OpenSIPS 3.3.2, 3.2.9 and 3.1.12 minor releases have just been 
tagged, packing essential fixes done in the past two months.


Detailed changelogs are available on the website^[1][2][3] . Packaging 
to be available starting tomorrow as part of the daily builds.


[1]: https://opensips.org/pub/opensips/3.1.12/ChangeLog
[2]: https://opensips.org/pub/opensips/3.2.9/ChangeLog
[3]: https://opensips.org/pub/opensips/3.3.2/ChangeLog

Happy Hacking!

--
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay

2022-10-19 Thread Thomas Pircher via Users

Răzvan Crainea wrote:

The default uas scenario of sipp does not properly treat Record-Route.
If you are using it, you should drop it and write your own scenario
that does handle RR, just as Ben suggested.


Thanks everyone for helping on this thread! I have replaced the SIPp UAS
with FreeSWITCH () and that works now
well; no config change in OpenSIPS necessary. And it gives me a bit more
flexibility for future extensions.

Thomas

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


Re: [OpenSIPS-Users] early dialog termination

2022-10-19 Thread Ryzhik Ivan
Sorry, I mean no sleep, i mean async( sleep($var(wait_time)), after_sleep
);
Regards, Ivan.

вт, 18 окт. 2022 г. в 14:42, Bogdan-Andrei Iancu :

> Hi,
>
> yes, call it before ending the REQUEST route. I'm 100% the transaction is
> not deleted before the end of the route. And try to use the unix sock
> flavor for the function, not the fifo one.
>
> DO NOT use the sleep, you will block your whole opensips.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Bootcamp 5-16 Dec 2022, online
>   https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>
> On 10/17/22 11:56 AM, Ryzhik Ivan wrote:
>
> Hi, did you mean that i must call t_write_req once before REQUEST_ROUTE
> is finished? In this case the transaction was removed.
> "even if you do not have to actually write anything to outer world - just
> fake it." - i must use fifo and i must read data from it, in else we got:
> ERROR:tm:write_to_fifo: nobody listening on [/tmp/moh.fifo] fifo for
> reading!
> ERROR:tm:t_write_req: write_to_fifo failed
> And last question is may I use sleep(20) at the end of route to keep
> transaction? or can i use modparam("tm", "wt_timer", 20)?
> Regards, Ivan
>
> пн, 17 окт. 2022 г. в 09:38, Bogdan-Andrei Iancu :
>
>> Hi Ryzhik,
>>
>> Right, the transaction must be forced to stay until you are done with a
>> final reply. Unfortunately there is no clear way to do this from script
>> (this may be subject of further small improvements), but you can try taking
>> advantage of the `t_write_req` [1] for this purpose, even if you do not
>> have to actually write anything to outer world - just fake it.
>>
>>
>> [1] https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_write_req
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>   https://www.opensips.org/events/Summit-2022Athens/
>>
>> On 10/13/22 2:45 PM, Ryzhik Ivan wrote:
>>
>> Hi.
>> One more question.
>> Everything works fine except the transaction was deleted after 15
>> sec after the initial route was finished.
>> on INVITE i last do t_reply_with_body(183, "Session progress", ...) and
>> than exit;
>>
>> on end route log :
>>
>> 2022-10-13T10:58:01.994598+00:00  DBG:tm:_reply_light: reply sent out.
>> buf=0x7f558a087d98: SIP/2.0 1..., shmem=0x7f5549797470: SIP/2.0 1
>> 2022-10-13T10:58:01.994676+00:00  DBG:tm:_reply_light: finished
>>
>> 2022-10-13T10:58:01.995835+00:00  DBG:tm:do_t_cleanup: transaction
>> 0x7f5549793b18 already updated! Skipping update!
>> 2022-10-13T10:58:01.996020+00:00  DBG:tm:cleanup_uac_timers: RETR/FR
>> timers reset
>> 2022-10-13T10:58:01.996202+00:00  *DBG:tm:insert_timer_unsafe: [2]:
>> 0x7f5549793b98 (12)*
>> 2022-10-13T10:58:01.996317+00:00 * DBG:tm:t_unref: UNREF_UNSAFE:
>> [0x7f5549793b18] after is 0*
>> 2022-10-13T10:58:01.996488+00:00  DBG:core:destroy_avp_list: destroying
>> list (nil)
>> 2022-10-13T10:58:01.996673+00:00  DBG:core:receive_msg: cleaning up
>>
>> 2022-10-13T10:58:07.651091+00:00*  DBG:tm:timer_routine: timer
>> routine:2,tl=0x7f5549793b98 next=(nil), timeout=12*
>> 2022-10-13T10:58:07.651332+00:00  DBG:tm:wait_handler: removing
>> 0x7f5549793b18 from table
>> 2022-10-13T10:58:07.651425+00:00  DBG:tm:delete_ce*ll: delete
>> transaction 0x7f5549793b18*
>> 2022-10-13T10:58:07.651513+00:00  DBG:tm:wait_handler: done
>>
>> Can you tell me how I can i fix this? Transaction marked safe for
>> deletion...
>> Regards, Ivan
>>
>> ср, 12 окт. 2022 г. в 13:11, Bogdan-Andrei Iancu :
>>
>>> Perfect !!!
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   https://www.opensips-solutions.com
>>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>>   https://www.opensips.org/events/Summit-2022Athens/
>>>
>>> On 10/12/22 1:09 PM, Ryzhik Ivan wrote:
>>>
>>> I found a solution. hex strings are reversed).
>>> Thank you very much!
>>>
>>> ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan :
>>>
 and one more research: $T_id returns hex encoded label.hashid
 but my attempts failed:
 got $T_id = 6545e285.3fe4
 Send: {"jsonrpc": "2.0", "method": "t_reply", "id": 1, "params":
 {"code": "487", "reason": "Terminating", "trans_id": "16356:1699078789",
 "to_tag": ""}}
 Got: b'{"jsonrpc":"2.0","error":{"code":404,"message":"Transaction not
 found"},"id":1}'


 ср, 12 окт. 2022 г. в 11:13, Ryzhik Ivan :

> Thank you, Bogdan.
> I got stuck with tm documentation.
>   1) MI t_reply command has named parameters, ok, no problem.
>   2) trans_id - transaction identifier (has the hash_entry:label
> format)  - what is this? if i use $T_id i got reply "Invalid trans_id".
>   3) Where can I get to_tag from script level on initial invite?
>   ...
>   t_reply_with_body(183, "Session progress",
> $(var(body){re.subst,$var(re)}) );
>   avp_db_query("insert into moh (callid, timeout, 

[OpenSIPS-Users] SIP user statuses to websocket

2022-10-19 Thread ideanet help
Hi all,

I am looking for a way to use WebSocket with opensips. Basically, I want to
show my all sip users statuses/activity on a web page. I am currently using
an API, which is called after a few seconds so this is a bit slow. I am
looking for a way that opensips sends event to the socket and on the other
hand, my webpage will be connected to a WebSocket server. This way I can
show all the events instantly.
For example, If a user receives a call I will have it on the web page
straight away. if a user gets unregistered i will see on my page that users
sent Expiry 0 something like that.

Will it be possible with the proto_wss module. any pointers will help. I
saw what proto_wss can do but I did not understand it properly. it will
send traces to a server i don't need. I just need it if a user is busy or
idle. or he gets unregistered that's all.

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


Re: [OpenSIPS-Users] OpenSIPS Control Panel

2022-10-19 Thread Bogdan-Andrei Iancu

Hi Nitesh,

Take a look at https://www.opensips.org/Documentation/Script-Routes-3-2

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 10/18/22 4:02 PM, Nitesh Divecha wrote:

Bogdan-Andrei,

Got it working! Much appreciated...

By any chance can you guide me to any kind of OpenSIPS documentation 
explaining the "Routing Logic"? How does the "branch_route" work and 
what does it mean? Is this like a C/Python function/method which 
returns the value?


Any guidance will be greatly appreciated.

Cheers,
Nitesh



On Mon, Oct 17, 2022 at 2:53 AM Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:


Hi Nitesh,

Do uac_replace_from( , "$avp(furi)");

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  
OpenSIPS Summit 27-30 Sept 2022, Athens
   https://www.opensips.org/events/Summit-2022Athens/  


On 10/14/22 5:55 PM, Nitesh Divecha wrote:

Bogdan-Andrei,

So I gave it a try and got error:

Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
[61003]  0.
/usr/local/etc/opensips/opensips_residential_2022-10-11.cfg
Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
[61003] CRITICAL:core:yyerror: parse error in
/usr/local/etc/opensips/opensips_residential_2022-10-11.cfg:456:22-23:
too few param>
Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
[61003]         xlog("new branch at change_from $ru to $avp(furi)
Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: ");
Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
[61003]         if ($avp(furi) != NULL) {
Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
[61003] uac_replace_from("$avp(furi)");
Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
[61003]                 ^~
Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
[61003]         }
Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22
[61003] }


Here is my code:

### uac_registrant module
loadmodule "uac.so"
modparam("uac","restore_mode", "auto")  #auto


### Routing Logic 
# main request routing logic
route{
if (dp_translate(10 ,$rU ,$rU) ) {
                $avp(furi) = "sip:1xxx...@gothamcity.com
";
                #strip(1);

                if (!do_routing(0)) {
                        send_reply(500,"No PSTN Route found");
                        exit;
                }

                t_on_branch("change_from");
                route(relay);
                exit;
        }
}

branch_route[change_from] {
        xlog("new branch at change_from $ru to $avp(furi)\n");
        if ($avp(furi) != NULL) {
                uac_replace_from("$avp(furi)");
        }
}


NOTE: This is my first time playing with C-style code... Trying
to learn what branches do/return, etc...

Rest of the code is default residential cfg.

Cheers,
Nitesh




On Thu, Oct 13, 2022 at 10:19 AM Nitesh Divecha
mailto:aviator.nites...@gmail.com>>
wrote:

Bogdan-Andrei,

Thanks for your feedback...

Yes, the remote SIP server expects FROM HEADER (Calling
Identity) in order to authenticate the caller to
make outbound calls.

Where in cfg do I implement uac_replace_from() ? Is it in
Routing Logic or where modules are declared?

Also what happens if multiple DID providers are implemented
in future? How will it affect the cfg file? Can we just
implement via Control Panel?

Cheers,
Nitesh





On Mon, Oct 10, 2022 at 9:42 AM Bogdan-Andrei Iancu
mailto:bog...@opensips.org>> wrote:

Hi Nitesh,

In SIP, registration is done for receiving calls, it does
not impact sending calls. So, define the remote server as
GW in Dynamic Route and simply route the calls to it. 
Note that maybe the remote server will expect you to use
the as FROM hdr (calling identity) the AOR (SIP address)
you are registering with, so maybe you should be an
uac_replace_from() in cfg when sending to the GW.

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com  

OpenSIPS Summit 27-30 Sept 2022, Athens
   https://www.opensips.org/events/Summit-2022Athens/  

Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info

2022-10-19 Thread Bogdan-Andrei Iancu

Hi there,

Actually you do not need the B2B, you can achieve the same kind of 
privacy (at SIP level) with dialog module and topology_hiding module 
together.


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
  https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 10/19/22 1:23 AM, Abdul Basit wrote:

Nitesh,

You need a B2BUA function 
 with 
the help of a topo-hiding module with opensips as Bela shared in his 
email.
Also, install the RTP proxy on the same opensips box (not necessary if 
you need separate signaling and media boxes).


Far end party will not be able to see the A-party information.
https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2


I hope this will help.

--
regards,

abdul basit

On Wed, 19 Oct 2022 at 03:14, Bela H > wrote:


Hi Nitesh,

 1. Check the topology hiding function:
https://opensips.org/docs/modules/3.2.x/topology_hiding.html

 2. Use e.g. rtpproxy:

https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer



http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English



https://github.com/sippy/rtpproxy 

I hope these help!

Cheers,

Bela

*From: *Nitesh Divecha 
*Sent: *Wednesday, 19 October 2022 04:26
*To: *OpenSIPS users mailling list 
*Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP
info

Hello All,

This is my first OpenSIPS project so I'm a newbie!

After going back and forth with "uac_replace_from()", I was
successfully able to make a call from my ATA -> OpenSIPS ->
Outbound Provider -> CellPhone. All worked fine with two-way audio
except few issues:

1) Outbound Provider was able to see my ATA (Originator's
IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some
eyebrows with Outbound provider. How can I block or strip all the
Originator's contact info in SIP INVITE (SDP) and only send
OpenSIPS info? Meaning I want to protect my Originators and don't
want to show anything to the Outbound Provider. Outbound providers
should only communicate to the OpenSIPS server.

2) When the call was up I failed to capture any media/RTP on the
OpenSIPS server. I want to involve OpenSIPS in media/RTP between
ATA and outbound providers. How can I force media/RTP to pass-thru
OpenSIPS IP so I'm not exposing Originator's IP.

Any insights will be highly appreciated.

Cheers,

Nitesh

___
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