Re: [OpenSIPS-Users] - Clustering

2023-01-18 Thread Nitesh Divecha
And using following:

Node#1
# opensips -V

version: opensips 3.3.2 (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.
main.c compiled on  with gcc 11

Node#2
# opensips -V
version: opensips 3.3.1 (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.
git revision: bf7c0eb89
main.c compiled on 14:53:50 Aug 30 2022 with gcc 10


Both Nodes are using OpenSIPS Control Panel 9.3.2.



On Wed, Jan 18, 2023 at 12:15 PM Nitesh Divecha 
wrote:

> Hello All,
>
> I got two nodes in cluster formation and they are in sync. Running CLI
> opensips-cli -x mi ul_dump | grep "AOR\":\|Contact\":" on both nodes I can
> see ALL the registered endpoints . For testing purposes I have two
> endpoints registered on each node so a total four endpoints are visible.
>
> Node #1 - IP: 66.x.x.1, registered endpoint 2001 and 2002
> Node #2 - IP: 3.x.x.9, registered endpoint 5467901 and 5467902
>
> Endpoints in Node#1 can call each other (2001 <--> 2002) and endpoints in
> Node#2 can call each other (5467901 <--> 5467902)
>
> root@archer:/etc/opensips# opensips-cli -x mi ul_dump | grep
> "AOR\":\|Contact\":"
> "AOR": 5467901@3.x.x.9,
> "Contact":sip:5467901@143.x.x.7:29100,
> "AOR": 5467902@3.x.x.9,
> "Contact":sip:5467902@143.x.x.7:5062,
> "AOR": 2002@66.x.x.1,
> "Contact":sip:2002@143.x.x.6:12339;ob,
> "AOR": 2001@66.x.x.1,
> "Contact":sip:2001@143.x.x.6:5060;ob,
>
> But none of the nodes can call each other... Meaning Node#1-2001 or 2 can
> not call Node#2-5467901 or 2 and vice versa... On log it shows SIP 404, Not
> Found... and looking further in detail it shows it is only looking for the
> endpoint in the same Node, meaning when 2001 calls 5467901 it is looking
> for 5467901@66.x.x.1 on Node#1 instead of 5467901@3.x.x.9 on Node#2.
>
>
>  USeR LOCation module
> loadmodule "usrloc.so"
> modparam("usrloc", "nat_bflag", "NATED_CALLEE")
> modparam("usrloc", "location_cluster", 2)
> modparam("usrloc", "working_mode_preset", "full-sharing-cluster")
>
> route[to_user] {
> # do lookup with method filtering
> if (!lookup("location","m")) {
> if (!db_does_uri_exist("$ru","subscriber")) {
> send_reply(404,"Not Found");
> xlog("ERROR: rU is: ($rU) and ru is: $ru --> Not
> Found\n");
> exit;
> }
> if(isflagset('HUNTGROUP')) {
> route(huntgroup);
> }
> t_reply(480, "Temporarily Unavailable");
> exit;
> }
> $acc_extra(TYPE) = "USER";
> route(relay);
> }
>
>
> Any help will be highly appreciated...
>
> Cheers,
> Nitesh
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] - Clustering

2023-01-18 Thread Nitesh Divecha
Hello All,

I got two nodes in cluster formation and they are in sync. Running CLI
opensips-cli -x mi ul_dump | grep "AOR\":\|Contact\":" on both nodes I can
see ALL the registered endpoints . For testing purposes I have two
endpoints registered on each node so a total four endpoints are visible.

Node #1 - IP: 66.x.x.1, registered endpoint 2001 and 2002
Node #2 - IP: 3.x.x.9, registered endpoint 5467901 and 5467902

Endpoints in Node#1 can call each other (2001 <--> 2002) and endpoints in
Node#2 can call each other (5467901 <--> 5467902)

root@archer:/etc/opensips# opensips-cli -x mi ul_dump | grep
"AOR\":\|Contact\":"
"AOR": 5467901@3.x.x.9,
"Contact":sip:5467901@143.x.x.7:29100,
"AOR": 5467902@3.x.x.9,
"Contact":sip:5467902@143.x.x.7:5062,
"AOR": 2002@66.x.x.1,
"Contact":sip:2002@143.x.x.6:12339;ob,
"AOR": 2001@66.x.x.1,
"Contact":sip:2001@143.x.x.6:5060;ob,

But none of the nodes can call each other... Meaning Node#1-2001 or 2 can
not call Node#2-5467901 or 2 and vice versa... On log it shows SIP 404, Not
Found... and looking further in detail it shows it is only looking for the
endpoint in the same Node, meaning when 2001 calls 5467901 it is looking
for 5467901@66.x.x.1 on Node#1 instead of 5467901@3.x.x.9 on Node#2.


 USeR LOCation module
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NATED_CALLEE")
modparam("usrloc", "location_cluster", 2)
modparam("usrloc", "working_mode_preset", "full-sharing-cluster")

route[to_user] {
# do lookup with method filtering
if (!lookup("location","m")) {
if (!db_does_uri_exist("$ru","subscriber")) {
send_reply(404,"Not Found");
xlog("ERROR: rU is: ($rU) and ru is: $ru --> Not
Found\n");
exit;
}
if(isflagset('HUNTGROUP')) {
route(huntgroup);
}
t_reply(480, "Temporarily Unavailable");
exit;
}
$acc_extra(TYPE) = "USER";
route(relay);
}


Any help will be highly appreciated...

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


Re: [OpenSIPS-Users] - OpenSIPS-CP

2022-12-15 Thread Nitesh Divecha
Hello All,

Solved this issue by downgrading from PHP8.1 to PHP7.4.



On Wed, Dec 14, 2022 at 5:01 PM Nitesh Divecha 
wrote:

> Hello All,
>
> I'm setting up a fresh install and running into issues with OpenSIPS
> Control Panel 9.3.2.
>
> System specs:
> Ubuntu 22.04.1 LTS
> OpenSIPS 3.3.2
> OpenSIPS Control Panel (
> https://github.com/OpenSIPS/opensips-cp/archive/9.3.2.zip)
>
> CP was installed successfully and I was able to login with user/pass but
> when I click on (Users -> User management or Alias management) or any
> (System -> Address, etc) it throws PHP exceptions:
>
> [Wed Dec 14 21:49:29.216426 2022] [php:error] [pid 32857] [client
> 10.0.0.34:57311] PHP Fatal error:  Uncaught Error: Attempt to assign
> property "user_management" on null in
> /var/www/html/opensips-cp/config/tools/users/user_management/settings.inc.php:25\nStack
> trace:\n#0 /var/www/html/opensips-cp/web/common/cfg_comm.php(203):
> require()\n#1 /var/www/html/opensips-cp/web/common/cfg_comm.php(340):
> get_params_from_tool()\n#2
> /var/www/html/opensips-cp/web/common/cfg_comm.php(332):
> session_load_from_tool()\n#3
> /var/www/html/opensips-cp/web/tools/users/user_management/template/header.php(32):
> session_load()\n#4
> /var/www/html/opensips-cp/web/tools/users/user_management/user_management.php(24):
> require('...')\n#5 {main}\n  thrown in
> /var/www/html/opensips-cp/config/tools/users/user_management/settings.inc.php
> on line 25, referer: http://10.0.0.200/cp/menu.php
> [Wed Dec 14 21:49:47.057497 2022] [php:warn] [pid 32858] [client
> 10.0.0.34:57323] PHP Warning:  Undefined array key "nodes" in
> /var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
> http://10.0.0.200/cp/menu.php
> [Wed Dec 14 21:49:47.057553 2022] [php:warn] [pid 32858] [client
> 10.0.0.34:57323] PHP Warning:  Undefined array key "nodes" in
> /var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
> http://10.0.0.200/cp/menu.php
> [Wed Dec 14 21:49:47.057564 2022] [php:warn] [pid 32858] [client
> 10.0.0.34:57323] PHP Warning:  Undefined array key "nodes" in
> /var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
> http://10.0.0.200/cp/menu.php
> [Wed Dec 14 21:49:47.057629 2022] [php:error] [pid 32858] [client
> 10.0.0.34:57323] PHP Fatal error:  Uncaught Error: Attempt to assign
> property "alias_management" on null in
> /var/www/html/opensips-cp/config/tools/users/alias_management/settings.inc.php:24\nStack
> trace:\n#0 /var/www/html/opensips-cp/web/common/cfg_comm.php(203):
> require()\n#1 /var/www/html/opensips-cp/web/common/cfg_comm.php(340):
> get_params_from_tool()\n#2
> /var/www/html/opensips-cp/web/common/cfg_comm.php(332):
> session_load_from_tool()\n#3
> /var/www/html/opensips-cp/web/tools/users/alias_management/template/header.php(33):
> session_load()\n#4
> /var/www/html/opensips-cp/web/tools/users/alias_management/alias_management.php(24):
> require('...')\n#5 {main}\n  thrown in
> /var/www/html/opensips-cp/config/tools/users/alias_management/settings.inc.php
> on line 24, referer: http://10.0.0.200/cp/menu.php
> [Wed Dec 14 21:49:52.209761 2022] [php:warn] [pid 32859] [client
> 10.0.0.34:57330] PHP Warning:  Undefined array key "nodes" in
> /var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
> http://10.0.0.200/cp/menu.php
> [Wed Dec 14 21:49:52.209814 2022] [php:warn] [pid 32859] [client
> 10.0.0.34:57330] PHP Warning:  Undefined array key "nodes" in
> /var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
> http://10.0.0.200/cp/menu.php
> [Wed Dec 14 21:49:52.209821 2022] [php:warn] [pid 32859] [client
> 10.0.0.34:57330] PHP Warning:  Undefined array key "nodes" in
> /var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
> http://10.0.0.200/cp/menu.php
> [Wed Dec 14 21:49:52.209920 2022] [php:error] [pid 32859] [client
> 10.0.0.34:57330] PHP Fatal error:  Uncaught Error: Attempt to assign
> property "addresses" on null in
> /var/www/html/opensips-cp/config/tools/system/addresses/settings.inc.php:24\nStack
> trace:\n#0 /var/www/html/opensips-cp/web/common/cfg_comm.php(203):
> require()\n#1 /var/www/html/opensips-cp/web/common/cfg_comm.php(340):
> get_params_from_tool()\n#2
> /var/www/html/opensips-cp/web/common/cfg_comm.php(332):
> session_load_from_tool()\n#3
> /var/www/html/opensips-cp/web/tools/system/addresses/template/header.php(32):
> session_load()\n#4
> /var/www/html/opensips-cp/web/tools/system/addresses/address.php(24):
> require('...')\n#5 {main}\n  thrown in
> /var/www/html/opensips-cp/config/tools/system/addresses/settings.inc.php on
> line 24, referer: http://10.0.0.200/cp/menu.php
>
> Any thoughts or suggestions?
>
> Thanks in advance.
>
> Cheers,
> Nitesh
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] - OpenSIPS-CP

2022-12-14 Thread Nitesh Divecha
Hello All,

I'm setting up a fresh install and running into issues with OpenSIPS
Control Panel 9.3.2.

System specs:
Ubuntu 22.04.1 LTS
OpenSIPS 3.3.2
OpenSIPS Control Panel (
https://github.com/OpenSIPS/opensips-cp/archive/9.3.2.zip)

CP was installed successfully and I was able to login with user/pass but
when I click on (Users -> User management or Alias management) or any
(System -> Address, etc) it throws PHP exceptions:

[Wed Dec 14 21:49:29.216426 2022] [php:error] [pid 32857] [client
10.0.0.34:57311] PHP Fatal error:  Uncaught Error: Attempt to assign
property "user_management" on null in
/var/www/html/opensips-cp/config/tools/users/user_management/settings.inc.php:25\nStack
trace:\n#0 /var/www/html/opensips-cp/web/common/cfg_comm.php(203):
require()\n#1 /var/www/html/opensips-cp/web/common/cfg_comm.php(340):
get_params_from_tool()\n#2
/var/www/html/opensips-cp/web/common/cfg_comm.php(332):
session_load_from_tool()\n#3
/var/www/html/opensips-cp/web/tools/users/user_management/template/header.php(32):
session_load()\n#4
/var/www/html/opensips-cp/web/tools/users/user_management/user_management.php(24):
require('...')\n#5 {main}\n  thrown in
/var/www/html/opensips-cp/config/tools/users/user_management/settings.inc.php
on line 25, referer: http://10.0.0.200/cp/menu.php
[Wed Dec 14 21:49:47.057497 2022] [php:warn] [pid 32858] [client
10.0.0.34:57323] PHP Warning:  Undefined array key "nodes" in
/var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
http://10.0.0.200/cp/menu.php
[Wed Dec 14 21:49:47.057553 2022] [php:warn] [pid 32858] [client
10.0.0.34:57323] PHP Warning:  Undefined array key "nodes" in
/var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
http://10.0.0.200/cp/menu.php
[Wed Dec 14 21:49:47.057564 2022] [php:warn] [pid 32858] [client
10.0.0.34:57323] PHP Warning:  Undefined array key "nodes" in
/var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
http://10.0.0.200/cp/menu.php
[Wed Dec 14 21:49:47.057629 2022] [php:error] [pid 32858] [client
10.0.0.34:57323] PHP Fatal error:  Uncaught Error: Attempt to assign
property "alias_management" on null in
/var/www/html/opensips-cp/config/tools/users/alias_management/settings.inc.php:24\nStack
trace:\n#0 /var/www/html/opensips-cp/web/common/cfg_comm.php(203):
require()\n#1 /var/www/html/opensips-cp/web/common/cfg_comm.php(340):
get_params_from_tool()\n#2
/var/www/html/opensips-cp/web/common/cfg_comm.php(332):
session_load_from_tool()\n#3
/var/www/html/opensips-cp/web/tools/users/alias_management/template/header.php(33):
session_load()\n#4
/var/www/html/opensips-cp/web/tools/users/alias_management/alias_management.php(24):
require('...')\n#5 {main}\n  thrown in
/var/www/html/opensips-cp/config/tools/users/alias_management/settings.inc.php
on line 24, referer: http://10.0.0.200/cp/menu.php
[Wed Dec 14 21:49:52.209761 2022] [php:warn] [pid 32859] [client
10.0.0.34:57330] PHP Warning:  Undefined array key "nodes" in
/var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
http://10.0.0.200/cp/menu.php
[Wed Dec 14 21:49:52.209814 2022] [php:warn] [pid 32859] [client
10.0.0.34:57330] PHP Warning:  Undefined array key "nodes" in
/var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
http://10.0.0.200/cp/menu.php
[Wed Dec 14 21:49:52.209821 2022] [php:warn] [pid 32859] [client
10.0.0.34:57330] PHP Warning:  Undefined array key "nodes" in
/var/www/html/opensips-cp/config/boxes.load.php on line 50, referer:
http://10.0.0.200/cp/menu.php
[Wed Dec 14 21:49:52.209920 2022] [php:error] [pid 32859] [client
10.0.0.34:57330] PHP Fatal error:  Uncaught Error: Attempt to assign
property "addresses" on null in
/var/www/html/opensips-cp/config/tools/system/addresses/settings.inc.php:24\nStack
trace:\n#0 /var/www/html/opensips-cp/web/common/cfg_comm.php(203):
require()\n#1 /var/www/html/opensips-cp/web/common/cfg_comm.php(340):
get_params_from_tool()\n#2
/var/www/html/opensips-cp/web/common/cfg_comm.php(332):
session_load_from_tool()\n#3
/var/www/html/opensips-cp/web/tools/system/addresses/template/header.php(32):
session_load()\n#4
/var/www/html/opensips-cp/web/tools/system/addresses/address.php(24):
require('...')\n#5 {main}\n  thrown in
/var/www/html/opensips-cp/config/tools/system/addresses/settings.inc.php on
line 24, referer: http://10.0.0.200/cp/menu.php

Any thoughts or suggestions?

Thanks in advance.

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


[OpenSIPS-Users] - Server Header, on 180 Ringing

2022-11-04 Thread Nitesh Divecha
Hello All,

Happy Friday!

So while checking something I noticed that my "Server Header" is getting
overwritten on 180 Ringing.

I have the default server header defined on top, server_header="Server:
Engineering Test". It shows fine on "100 Giving it a try" but it gets
overwritten on "180 Ringing".

Example, PSTN --> OpenSIPS --> ATA.
- When the call comes in via the PSTN network, OpenSIPS replies back with
"100 Giving it a try" to PSTN and sends "INVITE (SDP)" to registered ATA.
On the reply back to PSTN it shows "Server:  Engineering Test".

- ATA replies back with "100 Trying" and "180 Ringing" to OpenSIPS. The
reply back from ATA on "180 Ringing" shows Server: OBIHAI/OBi302-3.2.5.8732
which over writes the default server_header=.

- When OpenSIPS replies back to PSTN with "180 Ringing", it shows Server:
OBIHAI/OBi302-3.2.5.8732.

Any insights on how I can prevent this from happening? I want to keep the
default server header going out on the PSTN network.

Thank you in advance...

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


Re: [OpenSIPS-Users] - topology_hiding and no ACK

2022-11-01 Thread Nitesh Divecha
Bogdan,

Ah haa! Found it and fixed it!

Much appreciated for your help... This was a good learning experience!

Next up is PSTN routing and local call routing.


Cheers,
Nitesh



On Tue, Nov 1, 2022 at 10:55 AM Bogdan-Andrei Iancu 
wrote:

> Hi Nitesh,
>
> Be sure all the remove_hf() are on the right execution path and BEFORE the
> t_relay() for the sequential requests.
>
> 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 11/1/22 2:15 PM, Nitesh Divecha wrote:
>
> Bogdan,
>
> Thanks for your feedback.
>
> After reading the docs and following this tutorial (
> https://opensips.org/Documentation/Tutorials-Topology-Hiding) I finally
> got it working. Thank you!
>
> INVITE is clean, topology is hidden and ACK is sent back and forth. Calls
> are holding good.
>
> While confirming each ACK and BYE, I noticed Originator's User-Agent is
> passed on again only on to ACK and BYE.
>
> I tried to define under:
>
> route{
>
> if (has_totag()) {
>
> if ( is_method("ACK") ) {
>
> if(remove_hf("User-Agent")){
> xlog("*** has-totag -> ACK
> User-Agent found and removed on $rm from $si (callid=$ci). ***\n");
> }
>
> }
>
> if (is_method("BYE")) {
>
> xlog("*** if is_method(BYE) on $rm from $si (callid=$ci) ***\n");
>
> if(remove_hf("User-Agent")){
>
> xlog("*** is_method BYE User-Agent found and removed on $rm from $si
> (callid=$ci). ***\n");
>
> }
>
> # do accounting even if the transaction fails
>
> do_accounting("db","failed");
>
> }
>
> }
>
> }
>
> But still Originator's User-Agent is passed on to ACK and BYE... Ignore
> the xlog(""), it is just my way of learning what each line is doing and if
> getting executed :-).
>
> Any suggestions?
>
> Cheers,
> Nitesh
>
>
>
>
>
>
>
>
>
> On Thu, Oct 27, 2022 at 11:34 AM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Nitesh,
>>
>> Where you have the loose_route() in your script right now, use
>> topology_hiding_match()
>>
>> https://opensips.org/html/docs/modules/3.2.x/topology_hiding.html#func_topology_hiding_match
>>
>> 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/27/22 3:51 PM, Nitesh Divecha wrote:
>>
>> Hey Bogdan-Andrei,
>>
>> Thanks for your feedback.
>>
>> To be honest - I don't know!
>>
>> I followed some online tutorials and tried to implement
>> "topology_hiding()" after is_method("INVITE") since the first message
>> sent to Outbound Provider is INVITE.
>>
>> I never tried topology_hiding_match().
>>
>> What is the right way to implement topology_hiding module? My scenario is
>> simple, I'm using the default cfg and making ATA register to OpenSIPS to
>> make Outbound PSTN calls.
>>
>> I guess Bootcamp is the answer :-)
>>
>> Cheers,
>> Nitesh
>>
>>
>> On Thu, Oct 27, 2022 at 4:02 AM Bogdan-Andrei Iancu 
>> wrote:
>>
>>> Hi Nitesh,
>>>
>>> Do you do topology_hiding_match() for the sequential requests (instead
>>> of the typical loose_route()) ?  As it seems you cfg fails to properly
>>> handle the in-dialog / sequential requests.
>>>
>>> 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/26/22 9:05 PM, Nitesh Divecha wrote:
>>>
>>> Hello All,
>>>
>>> I don't know if this is by design or me not implementing correctly! I'm
>>> a newbie to OpenSIPS...
>>>
>>> So I generated a new opensips_residential.cfg file and only edited it
>>> with topology_hiding("UC"); under INVITE. Plus all the extras to make ATA
>>> register successfully and SIP trunk.
>>>
>>> Every time I make a call two INVITE dialogs are created. One from ATA to
>>> OpenSIPS and second 

Re: [OpenSIPS-Users] - topology_hiding and no ACK

2022-11-01 Thread Nitesh Divecha
Bogdan,

Thanks for your feedback.

After reading the docs and following this tutorial (
https://opensips.org/Documentation/Tutorials-Topology-Hiding) I finally got
it working. Thank you!

INVITE is clean, topology is hidden and ACK is sent back and forth. Calls
are holding good.

While confirming each ACK and BYE, I noticed Originator's User-Agent is
passed on again only on to ACK and BYE.

I tried to define under:

route{

if (has_totag()) {

if ( is_method("ACK") ) {

if(remove_hf("User-Agent")){
xlog("*** has-totag -> ACK
User-Agent found and removed on $rm from $si (callid=$ci). ***\n");
}

}

if (is_method("BYE")) {

xlog("*** if is_method(BYE) on $rm from $si (callid=$ci) ***\n");

if(remove_hf("User-Agent")){

xlog("*** is_method BYE User-Agent found and removed on $rm from $si
(callid=$ci). ***\n");

}

# do accounting even if the transaction fails

do_accounting("db","failed");

}

}

}

But still Originator's User-Agent is passed on to ACK and BYE... Ignore the
xlog(""), it is just my way of learning what each line is doing and if
getting executed :-).

Any suggestions?

Cheers,
Nitesh









On Thu, Oct 27, 2022 at 11:34 AM Bogdan-Andrei Iancu 
wrote:

> Hi Nitesh,
>
> Where you have the loose_route() in your script right now, use
> topology_hiding_match()
>
> https://opensips.org/html/docs/modules/3.2.x/topology_hiding.html#func_topology_hiding_match
>
> 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/27/22 3:51 PM, Nitesh Divecha wrote:
>
> Hey Bogdan-Andrei,
>
> Thanks for your feedback.
>
> To be honest - I don't know!
>
> I followed some online tutorials and tried to implement
> "topology_hiding()" after is_method("INVITE") since the first message
> sent to Outbound Provider is INVITE.
>
> I never tried topology_hiding_match().
>
> What is the right way to implement topology_hiding module? My scenario is
> simple, I'm using the default cfg and making ATA register to OpenSIPS to
> make Outbound PSTN calls.
>
> I guess Bootcamp is the answer :-)
>
> Cheers,
> Nitesh
>
>
> On Thu, Oct 27, 2022 at 4:02 AM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Nitesh,
>>
>> Do you do topology_hiding_match() for the sequential requests (instead of
>> the typical loose_route()) ?  As it seems you cfg fails to properly handle
>> the in-dialog / sequential requests.
>>
>> 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/26/22 9:05 PM, Nitesh Divecha wrote:
>>
>> Hello All,
>>
>> I don't know if this is by design or me not implementing correctly! I'm a
>> newbie to OpenSIPS...
>>
>> So I generated a new opensips_residential.cfg file and only edited it
>> with topology_hiding("UC"); under INVITE. Plus all the extras to make ATA
>> register successfully and SIP trunk.
>>
>> Every time I make a call two INVITE dialogs are created. One from ATA to
>> OpenSIPS and second one from OpenSIPS to Outbound Provider. When a PSTN
>> call is answered, the Outbound Provider sends 200 OK back to OpenSIPS, and
>> OpenSIPS sends back 200 OK to ATA. Then ATA acknowledges with ACK back to
>> OpenSIPS BUT OpenSIPS fails to send ACK to the Outbound Provider. So
>> Outbound Provider sends 200 OK again to OpenSIPS and OpenSIPS sends 200 OK
>> to ATA then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS fails
>> to send back ACK... This dance goes on for 30 secs and until Outbound
>> Provider drops the call due to no ACK.
>>
>> On the sngrep it shows that call from ATA to OpenSIPS "COMPLETED" while
>> OpenSIPS to Outbound Provider "CALL SETUP".
>>
>> If I comment out topology_hiding("UC"); then everything works perfectly
>> and sngrep shows only one INVITE dialog from ATA to OpenSIPS to Outbound
>> Provider except the Outbound Provider can see everything that is ATA's IP
>> info, etc...
>>
>> Here is my cfg:
>>
>> route {
>> ...
>> if (dp_translate(10 ,$rU ,$rU) ) {
>> xlog("*** Dial plan translate from source $avp(src) to
>> $rU ***\n&

Re: [OpenSIPS-Users] - topology_hiding and no ACK

2022-10-27 Thread Nitesh Divecha
Hey Bogdan-Andrei,

Thanks for your feedback.

To be honest - I don't know!

I followed some online tutorials and tried to implement "topology_hiding()"
after is_method("INVITE") since the first message sent to Outbound Provider
is INVITE.

I never tried topology_hiding_match().

What is the right way to implement topology_hiding module? My scenario is
simple, I'm using the default cfg and making ATA register to OpenSIPS to
make Outbound PSTN calls.

I guess Bootcamp is the answer :-)

Cheers,
Nitesh


On Thu, Oct 27, 2022 at 4:02 AM Bogdan-Andrei Iancu 
wrote:

> Hi Nitesh,
>
> Do you do topology_hiding_match() for the sequential requests (instead of
> the typical loose_route()) ?  As it seems you cfg fails to properly handle
> the in-dialog / sequential requests.
>
> 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/26/22 9:05 PM, Nitesh Divecha wrote:
>
> Hello All,
>
> I don't know if this is by design or me not implementing correctly! I'm a
> newbie to OpenSIPS...
>
> So I generated a new opensips_residential.cfg file and only edited it
> with topology_hiding("UC"); under INVITE. Plus all the extras to make ATA
> register successfully and SIP trunk.
>
> Every time I make a call two INVITE dialogs are created. One from ATA to
> OpenSIPS and second one from OpenSIPS to Outbound Provider. When a PSTN
> call is answered, the Outbound Provider sends 200 OK back to OpenSIPS, and
> OpenSIPS sends back 200 OK to ATA. Then ATA acknowledges with ACK back to
> OpenSIPS BUT OpenSIPS fails to send ACK to the Outbound Provider. So
> Outbound Provider sends 200 OK again to OpenSIPS and OpenSIPS sends 200 OK
> to ATA then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS fails
> to send back ACK... This dance goes on for 30 secs and until Outbound
> Provider drops the call due to no ACK.
>
> On the sngrep it shows that call from ATA to OpenSIPS "COMPLETED" while
> OpenSIPS to Outbound Provider "CALL SETUP".
>
> If I comment out topology_hiding("UC"); then everything works perfectly
> and sngrep shows only one INVITE dialog from ATA to OpenSIPS to Outbound
> Provider except the Outbound Provider can see everything that is ATA's IP
> info, etc...
>
> Here is my cfg:
>
> route {
> ...
> if (dp_translate(10 ,$rU ,$rU) ) {
> xlog("*** Dial plan translate from source $avp(src) to $rU
> ***\n");
>
> $avp(furi) = "sip:xxx...@gothamcity.com";
> uac_replace_from( , "$avp(furi)");
> #strip(1);
> if (!do_routing(0)) {
> send_reply(500,"No PSTN Route found");
> exit;
> }
> # t_on_branch("change_from");
> route(relay);
> exit;
> }
> ...
> }
>
> route[relay] {
> # for INVITEs enable some additional helper routes
> if (is_method("INVITE")) {
> # create_dialog();
> topology_hiding("UC");
> if(remove_hf("User-Agent")){
> xlog("*** 4. User-Agent found and removed. ***\n");
> }
>
> if (isflagset("NAT") && has_body("application/sdp")) {
> rtpproxy_offer("ro");
> }
>
> t_on_branch("per_branch_ops");
> t_on_reply("handle_nat");
> t_on_failure("missed_call");
> }
>
> if (isflagset("NAT")) {
> add_rr_param(";nat=yes");
> }
>
> if (!t_relay()) {
> send_reply(500,"Internal Error");
> }
> exit;
> }
>
> My eyes are sore and my head is spinning... Any help will be highly
> appreciated... Thanks!
>
> Cheers,
> Nitesh
>
>
> ___
> 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


[OpenSIPS-Users] - topology_hiding and no ACK

2022-10-26 Thread Nitesh Divecha
Hello All,

I don't know if this is by design or me not implementing correctly! I'm a
newbie to OpenSIPS...

So I generated a new opensips_residential.cfg file and only edited it
with topology_hiding("UC"); under INVITE. Plus all the extras to make ATA
register successfully and SIP trunk.

Every time I make a call two INVITE dialogs are created. One from ATA to
OpenSIPS and second one from OpenSIPS to Outbound Provider. When a PSTN
call is answered, the Outbound Provider sends 200 OK back to OpenSIPS, and
OpenSIPS sends back 200 OK to ATA. Then ATA acknowledges with ACK back to
OpenSIPS BUT OpenSIPS fails to send ACK to the Outbound Provider. So
Outbound Provider sends 200 OK again to OpenSIPS and OpenSIPS sends 200 OK
to ATA then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS fails
to send back ACK... This dance goes on for 30 secs and until Outbound
Provider drops the call due to no ACK.

On the sngrep it shows that call from ATA to OpenSIPS "COMPLETED" while
OpenSIPS to Outbound Provider "CALL SETUP".

If I comment out topology_hiding("UC"); then everything works perfectly and
sngrep shows only one INVITE dialog from ATA to OpenSIPS to Outbound
Provider except the Outbound Provider can see everything that is ATA's IP
info, etc...

Here is my cfg:

route {
...
if (dp_translate(10 ,$rU ,$rU) ) {
xlog("*** Dial plan translate from source $avp(src) to $rU
***\n");

$avp(furi) = "sip:xxx...@gothamcity.com";
uac_replace_from( , "$avp(furi)");
#strip(1);
if (!do_routing(0)) {
send_reply(500,"No PSTN Route found");
exit;
}
# t_on_branch("change_from");
route(relay);
exit;
}
...
}

route[relay] {
# for INVITEs enable some additional helper routes
if (is_method("INVITE")) {
# create_dialog();
topology_hiding("UC");
if(remove_hf("User-Agent")){
xlog("*** 4. User-Agent found and removed. ***\n");
}

if (isflagset("NAT") && has_body("application/sdp")) {
rtpproxy_offer("ro");
}

t_on_branch("per_branch_ops");
t_on_reply("handle_nat");
t_on_failure("missed_call");
}

if (isflagset("NAT")) {
add_rr_param(";nat=yes");
}

if (!t_relay()) {
send_reply(500,"Internal Error");
}
exit;
}

My eyes are sore and my head is spinning... Any help will be highly
appreciated... Thanks!

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


Re: [OpenSIPS-Users] - Not sending ACK back!

2022-10-21 Thread Nitesh Divecha
Daniel,

Thanks for your detailed email. Much appreciated!

Yes I totally understand about OpenSIPS and I'm going over all the
documentations and tutorials I can find! My background is from Asterisk, so
with that mentality I'm tackling OpenSIPS.

Asterisk (Context) vs OpenSIPS (C-style script), it is a huge challenge but
getting the hang of it!

Lets pick option (3) Routing local calls (ATA to ATA)... Do you have any
examples I can follow and set up a local route? I set up two extensions
(8883456 and 7773456) via OpenSIPS Control Panel and I was able to register
two ATA's. I do have the Registrar module loaded... How can I call each
other?

 REGISTRAR module

loadmodule "registrar.so"

modparam("registrar", "default_expires", 3600)

modparam("registrar", "min_expires", 60)

modparam("registrar", "max_expires", 120)

# modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")

# modparam("registrar", "received_avp", "$avp(received_nh)")/* uncomment
the next line not to allow more than 10 contacts per AOR */

modparam("registrar", "max_contacts", 10)

modparam("registrar", "received_avp", "$avp(rcv)")

modparam("registrar", "retry_after", 30)


Regarding option (4) - I have both options. IP to IP and User/Pass
authentication provider. Using User/Pass I was able to register OpenSIPS as
UAC to a remote server and I was able to make outbound calls but call keeps
on dropping due to no ACK.

Cheers,
Nitesh





On Fri, Oct 21, 2022 at 1:26 PM Daniel Zanutti 
wrote:

> Hi Nitesh
>
> As you already know, opensips is a low level software. You have to
> understand several aspects of SIP, network, RTP, DNS that when you use
> Asterisk, most you don't need to understand deep.
>
> Trying to help you, your script is way simple for you achievements. You
> need:
> 1) Check NAT on all request + all replies. This is to fix your SIP
> messages.
>
> 2) Check if you need to apply RTPPROXY on the call. You can use the
> "engage" function on INVITE then forget about it OR you can use manual way
> with "offer" function and handle all scenarios manually. For example, call
> the "answer" function on the 200 OK. Then delete on BYE.
>
> 3) Routing local calls (ATA to ATA) you need to handle the Register first
> with "save" function, then later handle the INVITE with the "lookup"
> function, both of Registrar module.
>
> 4) PSTN can be used as a direct route or some dynamic routing solution.
> Make it work first with direct routing. Need to check how authenticate
> works on your carrier. If IP based will be fine, if user/pass you need to
> make your opensips authenticate, it's a little harder.
>
> 5) DID - You have to create some specific INBOUND rules. Calls will be
> anonymous or authenticated?
>
> 6) Fax - Better solve other issues first.
>
> Hope this gives you some direction. Look for some tutorials.
>
> Regards
>
> On Fri, Oct 21, 2022 at 11:11 AM Nitesh Divecha <
> aviator.nites...@gmail.com> wrote:
>
>> Hello All,
>>
>> I have been scratching my head for a few days now... Just to recap:
>>
>> I'm a newbie with OpenSIPS so bear with me... I got OpenSIPS 3.3.1
>> (residential) running on Debian 11 with OpenSIPS Control Panel 9.3.2 and
>> MySQL.
>>
>> My goal is to:
>> 1) Make two ATA's register and call each other (locally)... *Stopped
>> working, I think routing logic is missing.*
>> 2) Make ATA to call PSTN via an outbound SIP trunk or DID provider... *No
>> ACK sent to Outbound provider.*
>> 3) Receive inbound calls from PSTN or SIP trunk and forward it to
>> registered ATA... *Getting rejected.*
>> 4) Able to send and receive faxes from and to PSTN... *Haven't even
>> touched.*
>>
>> Fast forward... I did achieve a few of my goals but they stopped
>> working... You fix one thing and you break others...
>>
>> My current issue is OpenSIPS is not sending ACK back to the Outbound
>> provider when I make calls to PSTN thus calls are getting dropped from the
>> Outbound provider due to no ACK. This issue started when I implemented
>> topology_hiding('C"), rtpproxy_offer("ro"), uac_replace_from( ,
>> "$avp(furi)").
>>
>> Here is my code snippet:
>>
>> ### Routing Logic 
>>
>>
>> # main request routing logic
>>
>>
>> route{
>>
>>
>> #if ($rU=~"^\+[1-9][0-9]+$") {
>>
>> if (dp_translate(10 ,$rU ,$rU) ) {
>>
>> xlog("*** 2. Dial plan 

[OpenSIPS-Users] - Not sending ACK back!

2022-10-21 Thread Nitesh Divecha
Hello All,

I have been scratching my head for a few days now... Just to recap:

I'm a newbie with OpenSIPS so bear with me... I got OpenSIPS 3.3.1
(residential) running on Debian 11 with OpenSIPS Control Panel 9.3.2 and
MySQL.

My goal is to:
1) Make two ATA's register and call each other (locally)... *Stopped
working, I think routing logic is missing.*
2) Make ATA to call PSTN via an outbound SIP trunk or DID provider... *No
ACK sent to Outbound provider.*
3) Receive inbound calls from PSTN or SIP trunk and forward it to
registered ATA... *Getting rejected.*
4) Able to send and receive faxes from and to PSTN... *Haven't even
touched.*

Fast forward... I did achieve a few of my goals but they stopped working...
You fix one thing and you break others...

My current issue is OpenSIPS is not sending ACK back to the Outbound
provider when I make calls to PSTN thus calls are getting dropped from the
Outbound provider due to no ACK. This issue started when I implemented
topology_hiding('C"), rtpproxy_offer("ro"), uac_replace_from( ,
"$avp(furi)").

Here is my code snippet:

### Routing Logic 


# main request routing logic


route{


#if ($rU=~"^\+[1-9][0-9]+$") {

if (dp_translate(10 ,$rU ,$rU) ) {

xlog("*** 2. Dial plan translate from source $avp(src) to
$rU ***\n");


$avp(furi) = "sip:aaabbbc...@gothamcity.com";

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

#strip(1);

if (!do_routing(0)) {

send_reply(500,"No PSTN Route found");

exit;

}

# t_on_branch("change_from");

route(relay);

exit;

}



route[relay] {

xlog("*** 3. Entering route relay ***\n");

# for INVITEs enable some additional helper routes

if (is_method("INVITE")) {

topology_hiding("C");

if(remove_hf("User-Agent")){

xlog("*** 4. User-Agent found and removed. ***\n");

}


if (isflagset("NAT") && has_body("application/sdp")) {

rtpproxy_offer("ro");

#rtpproxy_offer();

}


t_on_branch("per_branch_ops");

t_on_reply("handle_nat");

t_on_failure("missed_call");

}


if (isflagset("NAT")) {

add_rr_param(";nat=yes");

}


if (!t_relay()) {

send_reply(500,"Internal Error");

}

exit;

}

Any thoughts or suggestions on what to check for ACK?

Cheers,
Nitesh
___
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-20 Thread Nitesh Divecha
Hello,

After reading the rtpproxy documentation again, I was able to resolve the
rtpproxy NAT issue.

-A *advaddr1[/advaddr2]*

Set advertised address of rtpproxy. Useful if the rtpproxy is behind a NAT
firewall. (Amazon EC2) When the rtpproxy receives a session request from a
SIP controller it will return the IP address(es) specified by the -A option.

CGroup: /system.slice/rtpproxy.service

 └─247521 /usr/local/bin/rtpproxy -s udp:172.31.29.47 2 -u
rtpproxy rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -A 3.xxx.xxx.49 -l
172.31.29.47 -m 1000 -M 2000 -d INFO LOG_LOCAL5



Just for my understanding... What is the difference between rtpproxy and
Mediaproxy Module in OpenSIPS? Do I need both or can I achieve the same
with Mediaproxy? I have to monitor two services now (rtpproxy and OpenSIPS).

Cheers,
Nitesh



On Wed, Oct 19, 2022 at 5:06 PM Nitesh Divecha 
wrote:

> 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
>>> <https://www.tutorialspoint.com/session_initiation_protocol/session_initiation_protocol_b2bua.htm>
>>>  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
&g

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

2022-10-20 Thread Nitesh Divecha
Bela

Much appreciated!

That fixed the "User-Agent" problem.

Cheers,
Nitesh


On Wed, Oct 19, 2022 at 8:03 PM Bela H  wrote:

> 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  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 topo

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
> <https://www.tutorialspoint.com/session_initiation_protocol/session_initiation_protocol_b2bua.htm>
>  with
> the help of a topo-hiding module with opensips as Bela shared in his email.
>
> Also, install the R

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:22222")

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
>> <https://www.tutorialspoint.com/session_initiation_protocol/session_initiation_protocol_b2bua.htm>
>>  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

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
> <https://www.tutorialspoint.com/session_initiation_protocol/session_initiation_protocol_b2bua.htm>
>  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


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

2022-10-18 Thread Nitesh Divecha
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


Re: [OpenSIPS-Users] OpenSIPS Control Panel

2022-10-18 Thread Nitesh Divecha
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 
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 <
> 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 
>> 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/
>>>
>>> On 10/7/22 9:00 PM, Nitesh Divecha wrote:
>>>
>>> Hello All,
>>>
>>> Anyone using OpenSIPS CP 9.3.2? Need small help!
>>>
>&

Re: [OpenSIPS-Users] OpenSIPS Control Panel

2022-10-14 Thread Nitesh Divecha
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 
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 
> 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/
>>
>> On 10/7/22 9:00 PM, Nitesh Divecha wrote:
>>
>> Hello All,
>>
>> Anyone using OpenSIPS CP 9.3.2? Need small help!
>>
>> I got OpenSIPS 3.3.1 running and I can make calls out to the gateway (SIP
>> trunk) without any problems.
>>
>> My provider issued me a DID with user/pass and I was able to configure
>> them under "UAC Registrant" and registered to a remote server.
>>
>> Question is - how can I route calls to "UAC Registrant"? From the
>> "Dynamic Routing" menu I can only route calls to Gateway. How can I route
>> calls to "UAC Registrant"?
>>
>> Any suggestions?
>>
>> Thank you in advance!
>>
>> Cheers,
>> Nitesh
>>
>> ___
>> 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 Control Panel

2022-10-13 Thread Nitesh Divecha
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 
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/
>
> On 10/7/22 9:00 PM, Nitesh Divecha wrote:
>
> Hello All,
>
> Anyone using OpenSIPS CP 9.3.2? Need small help!
>
> I got OpenSIPS 3.3.1 running and I can make calls out to the gateway (SIP
> trunk) without any problems.
>
> My provider issued me a DID with user/pass and I was able to configure
> them under "UAC Registrant" and registered to a remote server.
>
> Question is - how can I route calls to "UAC Registrant"? From the "Dynamic
> Routing" menu I can only route calls to Gateway. How can I route calls to
> "UAC Registrant"?
>
> Any suggestions?
>
> Thank you in advance!
>
> Cheers,
> Nitesh
>
> ___
> 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] Configuration

2022-10-13 Thread Nitesh Divecha
Hey Phil,

Have you installed the OpenSIPS Control Panel? It is pretty simple to set
up via OpenSIP CP then dealing with a cfg file.

Goto https://powerpbx.org/content/opensips-v30-debian-v10-mariadb-apache-v1
and scroll down to Control Panel and install. Once OpenSIPS CP is installed
you can add your "Inbound/Outbound trunks" and setup the route.

Hope it helps...

Cheers,
Nitesh


On Wed, Oct 12, 2022 at 5:42 PM White, Phil  wrote:

> Hi Team,
>
> May I ask for some help please?
> I am trying to configure Opensips to proxy calls to & from the PSTN.
> Being a complete novice, I'm flying somewhat blind, and things are not
> working as I expect.
>
> Currently, Opensips is working with all of my local sip phones, so I think
> I now need to configure (a) incoming calls, and (b) outgoing calls to my
> PSTN/SIP provider.
> I have included uac_auth in my configuration, together with the appropriate
> modparam("uac_auth","credential","username:domain:password") details.
> However,currently I am not seeing anything in the debug log to suggest
> that this has any effect.
>
> Can anyone help with pointers on what I need to include in the
> configuration file for each direction of call?
>
> Thanks for your help,
> Phil.
> ___
> 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 Control Panel

2022-10-07 Thread Nitesh Divecha
Hello All,

Anyone using OpenSIPS CP 9.3.2? Need small help!

I got OpenSIPS 3.3.1 running and I can make calls out to the gateway (SIP
trunk) without any problems.

My provider issued me a DID with user/pass and I was able to configure them
under "UAC Registrant" and registered to a remote server.

Question is - how can I route calls to "UAC Registrant"? From the "Dynamic
Routing" menu I can only route calls to Gateway. How can I route calls to
"UAC Registrant"?

Any suggestions?

Thank you in advance!

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


[OpenSIPS-Users] Dialplan/Routing

2022-09-27 Thread Nitesh Divecha
Hello All,

I'm a newbie with Opensips! Got good knowledge with Asterisk and SIP in
general.

Trying to figure out how to route calls out on the SIP trunk.

Running following:
"Server": "OpenSIPS (3.3.1 (x86_64/linux))"
OpenSIPS Control Panel 9.3.2
Debian 11

Opensips is configured with residential configuration and I can make the
following:
1) local SIP to SIP calls (registered SIP endpoints).
2) External DID to Opensips to local SIP endpoint.

But failing to call out from the local SIP endpoint to SIP trunk
(external). Every time I make a call I get SIP 420 Bad Extension.

I did follow all the instructions regarding Opensips-CP from (
https://powerpbx.org/content/opensips-v30-debian-v10-mariadb-apache-v1) to
setup SIP trunk, dial plan, dynamic routing and
edit "opensips_residential.cfg" but failing to send the call out.

Any suggestions?

Thanking in advance.

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