Re: [OpenSIPS-Users] Topology Hiding

2022-05-11 Thread Saint Michael
Thanks
It's solved.
Federico

On Wed, May 11, 2022, 10:40 AM Daniel Zanutti 
wrote:

> https://www.opensips.org/Documentation/Tutorials-Topology-Hiding
>
> On Tue, May 10, 2022 at 2:15 PM Saint Michael  wrote:
>
>> Dear friends
>> I am using opensips 3.1.9, with rtp proxy, and without topology hiding it
>> would not talk to any carrier who has a Sonus box. I need to add topology
>> hiding urgently and my support provider is missing in action. Can somebody
>> provide instructions and code samples?
>>
>> Federico
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Topology Hiding

2022-05-11 Thread Daniel Zanutti
https://www.opensips.org/Documentation/Tutorials-Topology-Hiding

On Tue, May 10, 2022 at 2:15 PM Saint Michael  wrote:

> Dear friends
> I am using opensips 3.1.9, with rtp proxy, and without topology hiding it
> would not talk to any carrier who has a Sonus box. I need to add topology
> hiding urgently and my support provider is missing in action. Can somebody
> provide instructions and code samples?
>
> Federico
>
> ___
> 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] Topology Hiding

2022-05-10 Thread Saint Michael
Dear friends
I am using opensips 3.1.9, with rtp proxy, and without topology hiding it
would not talk to any carrier who has a Sonus box. I need to add topology
hiding urgently and my support provider is missing in action. Can somebody
provide instructions and code samples?

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


Re: [OpenSIPS-Users] Topology hiding for presence: NOTIFY/Subscription refresh not successfully matching topology hiding

2021-01-04 Thread Govindaraj, Rajesh
I triaged this issue further, the root cause was the contact was modified at 
opensips presence server using fixed_nated_contact API call as it traverses a 
non sip aware load balancer on the way. Due to this the NOTIFY request URI had 
a TCP ephemeral port and check_self API call failed and topology hiding match 
logic was not getting triggered.

Had to force the port to method check_self to 5060 and the issue got resolved. 
Not sure if there is a cleaner fix for this issue. I think the fact a non sip 
aware load balancer is in the path is the root cause. Please suggest if there 
is a way to fix this without any code change.

Thanks,

From: Govindaraj, Rajesh
Sent: Tuesday, December 29, 2020 1:15 PM
To: users@lists.opensips.org
Subject: Topology hiding for presence: NOTIFY/Subscription refresh not 
successfully matching topology hiding

Hi,

I am facing issues with topology hiding implementation for presence which was 
necessitated as existing TCP connections have to be used at Presence server and 
couldn't achieve this with record route routing and having original contact of 
application server.
Thanks for all your time and help. I am sure I am missing something small but I 
spent hours searching and reading up on Internet and would solicit your 
expertise to resolve this.

Objective: TCP transport for presence.

Topology:   opensips presence server <> opensips proxy <> IPC's 
Application Server.

Approach:

Case i: Without topology hiding and using record route:

In this case opensips proxy was adding two record route one for itself with 
sip:;transport=tcp and via header carried 
rport. Opensips presence server while sending NOTIFY was throwing as TCP error,
Read through forum and understood that initial tcp request has to be re-used. 
Studied if alias can be used and also experimented with force_tcp_alias, but no 
luck.

Case ii: With topology hiding, no record route, use new contact:

With this approach able to get back initial NOTIFY
NOTIFY 
sip:172.29.109.119:40968;transport=tcp;thinfo=VG8tbzAdIFskPyccJRwmBhBQY31mX2RBckxiT2FkblpgWnpPJBMyPScfPx03SSUFI2gjAyMcIB00XGVmZltjCXVBMwdlaCcGIA4zBCMEICA9AD4GJ0kxESN+YxUjAC8aYlEiJTMcaxgvByMHMDowUiMGM1lhFzlqOx4qBjQXaAs+RVQaNB95RWBPYWNgQWFXcVpiVmlmZFlg
 SIP/2.0

With thinfo in request URI. Contact header of opensips sip server is present.

Now as per docs, tried to do topology_hiding_match by calling 
topology_hiding_match(), get this response,

DID NOT found,

I tried to add DID_NONE but don't see any log in the syslog.

The NOTIFY with contact header of opensip sip server is sent to Application 
Server. Record_route is called on this NOTIFY and record route is added without 
DID param.

When the subscription response comes back, the sample request below,(having the 
contact of opensips presence server no thinfo from 200ok for subscribe) the 
topology_hiding_match fails and the request does not go out.
I tried to load dialog module, call create_dialog but I understand that for 
subscribe the dialog would not be created. Please correct me if I am wrong. I 
also read about route header being used in opensips 2.1 per this thread,
https://opensips.org/pipermail/users/2017-December/038606.html but this is not 
being used in opensips version 2.4.7.

Not sure what am I missing. Please advise.

10.204.182.27 - Server running opensips proxy and application server.

10.29.109.130 - Opensips presence server

NOTIFY sent to application server:

NOTIFY 
sip:10.204.182.27:5059;transport=tcp;thinfo=VG8sbzAdIFskPyccJRwmBhBQY31mX2RBckxiT2FkblpgWnpPJBMyPScfPx03SSUFI2gjAyMcIB00XGVmZltjCXVBMwdlaCcGIA4zBCMEICA9AD4GJ0kxESN+JhYxXiZDYgNrJT4BaxgvByMHMDowUiMGM1lnFCJrbVY1WiBANldFUyELIFVyRH5TY2d6XmhdbUZnW2ZjYl8-
 SIP/2.0
Record-Route: 
Record-Route: 
Via: SIP/2.0/UDP 
10.204.182.27:5060;branch=z9hG4bK354b.18876e240190157c6feb29c18068a57a.0;i=685d8901
Via: SIP/2.0/TCP 
10.42.3.115:5060;received=172.29.109.130;branch=z9hG4bK354b.faa91951.0
To: ;tag=19867159
From: ;tag=ab40-e3d19262d5e041c285ec0e9b00967d4b
CSeq: 1 NOTIFY
Call-ID: 
wlss-29dc9ccc-3d09899a4a9e634d0256bdf3c2cf8f0b@10.204.182.27
Max-Forwards: 69
Content-Length: 566
User-Agent: OpenSIPS (2.4.8 (x86_64/linux))
Event: presence
Contact: 
Subscription-State: active;expires=300
Content-Type: application/pidf+xml

Refresh subscribe:

Received SUBSCRIBE sip:sa@10.29.109.130:5060;transport=tcp SIP/2.0^M
Content-Length: 0^M
CSeq: 2 SUBSCRIBE^M
Expires: 300^M
Route: ^M
Route: ^M
Contact: 
^M
Call-ID: 
wlss-af3350b7-c077bdf207ff802e84fa32ed40d47aed@10.204.182.27^M
Max-Forwards: 70^M
From: ;tag=3427a3ff^M
To: ;tag=ab40-f97bec0eac0c0e4c851f049586838577^M
Event: presence^M
Via: SIP/2.0/UDP 
10.204.182.27:5059;wlsscid=65243f65cf6;branch=z9hG4bK186c9181e96cf3053271dcd2b59330cd

Thanks,




DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from 

[OpenSIPS-Users] Topology hiding for presence: NOTIFY/Subscription refresh not successfully matching topology hiding

2020-12-29 Thread Govindaraj, Rajesh
Hi,

I am facing issues with topology hiding implementation for presence which was 
necessitated as existing TCP connections have to be used at Presence server and 
couldn't achieve this with record route routing and having original contact of 
application server.
Thanks for all your time and help. I am sure I am missing something small but I 
spent hours searching and reading up on Internet and would solicit your 
expertise to resolve this.

Objective: TCP transport for presence.

Topology:   opensips presence server <> opensips proxy <> IPC's 
Application Server.

Approach:

Case i: Without topology hiding and using record route:

In this case opensips proxy was adding two record route one for itself with 
sip:;transport=tcp and via header carried 
rport. Opensips presence server while sending NOTIFY was throwing as TCP error,
Read through forum and understood that initial tcp request has to be re-used. 
Studied if alias can be used and also experimented with force_tcp_alias, but no 
luck.

Case ii: With topology hiding, no record route, use new contact:

With this approach able to get back initial NOTIFY
NOTIFY 
sip:172.29.109.119:40968;transport=tcp;thinfo=VG8tbzAdIFskPyccJRwmBhBQY31mX2RBckxiT2FkblpgWnpPJBMyPScfPx03SSUFI2gjAyMcIB00XGVmZltjCXVBMwdlaCcGIA4zBCMEICA9AD4GJ0kxESN+YxUjAC8aYlEiJTMcaxgvByMHMDowUiMGM1lhFzlqOx4qBjQXaAs+RVQaNB95RWBPYWNgQWFXcVpiVmlmZFlg
 SIP/2.0
With thinfo in request URI. Contact header of opensips sip server is present.

Now as per docs, tried to do topology_hiding_match by calling 
topology_hiding_match(), get this response,

DID NOT found,

I tried to add DID_NONE but don't see any log in the syslog.

The NOTIFY with contact header of opensip sip server is sent to Application 
Server. Record_route is called on this NOTIFY and record route is added without 
DID param.

When the subscription response comes back, the sample request below,(having the 
contact of opensips presence server no thinfo from 200ok for subscribe) the 
topology_hiding_match fails and the request does not go out.
I tried to load dialog module, call create_dialog but I understand that for 
subscribe the dialog would not be created. Please correct me if I am wrong. I 
also read about route header being used in opensips 2.1 per this thread,
https://opensips.org/pipermail/users/2017-December/038606.html but this is not 
being used in opensips version 2.4.7.

Not sure what am I missing. Please advise.

10.204.182.27 - Server running opensips proxy and application server.

10.29.109.130 - Opensips presence server

NOTIFY sent to application server:

NOTIFY 
sip:10.204.182.27:5059;transport=tcp;thinfo=VG8sbzAdIFskPyccJRwmBhBQY31mX2RBckxiT2FkblpgWnpPJBMyPScfPx03SSUFI2gjAyMcIB00XGVmZltjCXVBMwdlaCcGIA4zBCMEICA9AD4GJ0kxESN+JhYxXiZDYgNrJT4BaxgvByMHMDowUiMGM1lnFCJrbVY1WiBANldFUyELIFVyRH5TY2d6XmhdbUZnW2ZjYl8-
 SIP/2.0
Record-Route: 
Record-Route: 
Via: SIP/2.0/UDP 
10.204.182.27:5060;branch=z9hG4bK354b.18876e240190157c6feb29c18068a57a.0;i=685d8901
Via: SIP/2.0/TCP 
10.42.3.115:5060;received=172.29.109.130;branch=z9hG4bK354b.faa91951.0
To: ;tag=19867159
From: ;tag=ab40-e3d19262d5e041c285ec0e9b00967d4b
CSeq: 1 NOTIFY
Call-ID: wlss-29dc9ccc-3d09899a4a9e634d0256bdf3c2cf8f0b@10.204.182.27
Max-Forwards: 69
Content-Length: 566
User-Agent: OpenSIPS (2.4.8 (x86_64/linux))
Event: presence
Contact: 
Subscription-State: active;expires=300
Content-Type: application/pidf+xml

Refresh subscribe:

Received SUBSCRIBE sip:sa@10.29.109.130:5060;transport=tcp SIP/2.0^M
Content-Length: 0^M
CSeq: 2 SUBSCRIBE^M
Expires: 300^M
Route: ^M
Route: ^M
Contact: 
^M
Call-ID: wlss-af3350b7-c077bdf207ff802e84fa32ed40d47aed@10.204.182.27^M
Max-Forwards: 70^M
From: ;tag=3427a3ff^M
To: ;tag=ab40-f97bec0eac0c0e4c851f049586838577^M
Event: presence^M
Via: SIP/2.0/UDP 
10.204.182.27:5059;wlsscid=65243f65cf6;branch=z9hG4bK186c9181e96cf3053271dcd2b59330cd

Thanks,




DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from disclosure. 
If you are not an intended recipient of this e-mail, do not duplicate or 
redistribute it by any means. 
Please delete it and any attachments and notify the sender that you have 
received it in error. 
Unintended recipients are prohibited from taking action on the basis of 
information in this e-mail. 
E-mail messages may contain computer viruses or other defects, may not be 
accurately replicated on other systems, or may be intercepted, 
deleted or interfered with without the knowledge of the sender or the intended 
recipient. 
If you are not comfortable with the risks associated with e-mail messages, 
you may decide not to use e-mail to communicate with IPC. IPC reserves the 
right, 
to the extent and under circumstances permitted by applicable law, 
to retain, monitor and intercept e-mail messages to and from its systems.
___
Users mailing list
Users@lists.opensips.org

Re: [OpenSIPS-Users] topology hiding bug?

2020-11-18 Thread M S
I investigated a bit more about this and although the effects might be
similar, I'm not sure if my case and yours are triggered by the same reason.
This is how this problem can be simulated: the problem of duplicating did
part in contact happens when the callee part sends back its contact with
the same username as opensip contact.
In my case, if opensips (during topology hiding) changes contact to
 and sends it to callee,
if callee (B side) responds with 200 OK and sets its contact to be:
 which is the same
username as opensips contact, but different ip (which I guess is correct by
RFC?) then opensips changes the contact (incorrectly) to

If developers of topology hiding module read this, maybe they have some
ideas about why this happens?

Thanks,
Mark

On Wed, Nov 18, 2020 at 2:03 PM Ricardo Martinez 
wrote:

> Hi.
>
> I have a very similar problem with the topology hiding module and with the
> mid_registrar module.
>
> I don’t know if maybe I’m doing something wrong or maybe this is the way
> it has to work?.  My scenario is as follows:
>
>
>
> Private PBX – OpenSIP (Topology Hiding + MidRegistrar) --  UAC
>
>
>
> When a REGISTER came from the UAC to the PBX I see something like this:
>
>
>
> 2020/11/18 09:49:00.290304 192.XXX.XXX.4:51045 -> 192.XXX.XXX.133:5060
>
> REGISTER sip:my.domain.com:5060 SIP/2.0
>
> Via: SIP/2.0/UDP
> 192.XXX.XXX.4:51045;branch=z9hG4bK-524287-1---300f9ecbae4e0c8d;rport
>
> Max-Forwards: 70
>
> *Contact:
> ;+sip.instance="";reg-id=1*
>
> To: "Ricardo Martinez"
>
> From: "Ricardo Martinez";tag=7bb10a6e
>
> Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM
>
> CSeq: 1 REGISTER
>
> Expires: 600
>
> Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO,
> MESSAGE
>
> Supported: outbound, path
>
> User-Agent: VEX release 6.2.2.0 stamp 104875
>
> Content-Length: 0
>
>
>
>
>
> But then pass through the OpenSIPS with Topology Hiding enabled and
> Mid_registrar enabled I see:
>
>
>
> 2020/11/18 09:49:00.291478 192.XXX.XXX.134:5060 -> 192.141.65.94:5060
>
> REGISTER sip:my.domain.com:5060 SIP/2.0
>
> Via: SIP/2.0/UDP 192.XXX.XXX.134:5060;branch=z9hG4bK4943.c7a48b07.0
>
> Max-Forwards: 69
>
> *Contact: <*
> *sip:d1@192.xxx.xxx.134;thinfo=VG9obzAdIFs3YnpWYl0DRWlTfWJgXn5ZdFpkW2ZiZFtlVDEdPhInMjoMNVJwQWUEMWU3XjZZIUJiWWRmQ28lCzNOYVhhfWVbYUF1QH5QYGBuWmBZcw--*
> *><**sip:2844375008405363...@192.xxx.xxx.134:5060**>;expires=3600*
>
> To: "Ricardo Martinez"
>
> From: "Ricardo Martinez";tag=7bb10a6e
>
> Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM
>
> CSeq: 1 REGISTER
>
> Expires: 3600
>
> Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO,
> MESSAGE
>
> Supported: outbound, path
>
> User-Agent: VEX release 6.2.2.0 stamp 104875
>
> Content-Length: 0
>
>
>
>
>
> As you can see the CONTACT is duplicated and I’m getting the next error:
>
> ERROR:mid_registrar:save_restore_rpl_contacts: 200 OK reply does not
> include all req contacts! (ci:
> 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM)
>
> Nov 18 09:58:00 sbcar /usr/local/sbin/opensips[11924]:
> ERROR:mid_registrar:mid_reg_resp_in: failed to process rpl contacts for AoR
> 'd1.922'
>
>
>
>
>
> Does someone have a clue on this?
>
>
>
> Regards,
>
> Ricardo
>
>
>
> *De:* Users  *En nombre de *M S
> *Enviado el:* martes, 17 de noviembre de 2020 22:24
> *Para:* OpenSIPS users mailling list 
> *Asunto:* [OpenSIPS-Users] topology hiding bug?
>
>
>
> Dear OpenSIPS development team,
>
> I have come across a strange case that sometime when I use
> topology_hiding("UD"), it makes a mistake in changing Contact field.
>
> Scenario is:
>
>
>
> A: (Contact: ) sends Invite to private IP
> of opensips, opensips changes Contact field to: (Contact: <
> sip:90006969.did.29c.2ed2...@public.ip>) and sends Invite from public IP
> to B.
>
> Then B sends 200 OK back to Opensips public IP, with correct Contact:
> (Contact: ). so far so good.
>
> Now Opensips sends 200 OK back to A from its private IP, and changes
> Contact to:
>
> Contact: 
>
>
>
> As you see, did part is repeated twice.. and that means when A replies
> with:
>
> ACK sip:90006969.did.29c.2ed202e.did.29c.2ed202e@172.24.8.37 SIP/2.0
>
>
>
> Opensips throws an error: ERROR:dialog:dlg_onroute: malformed route param
> [29c.2ed202e.did.29c.2ed202e]
>
>
>
> Is this a bug? I am using Opensips 3.1.0.
>
>
>
> Thanks,
>
> Mark
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding bug?

2020-11-18 Thread Ricardo Martinez
Hi.

I have a very similar problem with the topology hiding module and with the
mid_registrar module.

I don’t know if maybe I’m doing something wrong or maybe this is the way it
has to work?.  My scenario is as follows:



Private PBX – OpenSIP (Topology Hiding + MidRegistrar) --  UAC



When a REGISTER came from the UAC to the PBX I see something like this:



2020/11/18 09:49:00.290304 192.XXX.XXX.4:51045 -> 192.XXX.XXX.133:5060

REGISTER sip:my.domain.com:5060 SIP/2.0

Via: SIP/2.0/UDP
192.XXX.XXX.4:51045;branch=z9hG4bK-524287-1---300f9ecbae4e0c8d;rport

Max-Forwards: 70

*Contact: >;+sip.instance="";reg-id=1*

To: "Ricardo Martinez"

From: "Ricardo Martinez";tag=7bb10a6e

Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM

CSeq: 1 REGISTER

Expires: 600

Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO,
MESSAGE

Supported: outbound, path

User-Agent: VEX release 6.2.2.0 stamp 104875

Content-Length: 0





But then pass through the OpenSIPS with Topology Hiding enabled and
Mid_registrar enabled I see:



2020/11/18 09:49:00.291478 192.XXX.XXX.134:5060 -> 192.141.65.94:5060

REGISTER sip:my.domain.com:5060 SIP/2.0

Via: SIP/2.0/UDP 192.XXX.XXX.134:5060;branch=z9hG4bK4943.c7a48b07.0

Max-Forwards: 69

*Contact: 
<**sip:d1@192.xxx.xxx.134;thinfo=VG9obzAdIFs3YnpWYl0DRWlTfWJgXn5ZdFpkW2ZiZFtlVDEdPhInMjoMNVJwQWUEMWU3XjZZIUJiWWRmQ28lCzNOYVhhfWVbYUF1QH5QYGBuWmBZcw--
*
*><**sip:2844375008405363...@192.xxx.xxx.134:5060
**>;expires=3600*

To: "Ricardo Martinez"

From: "Ricardo Martinez";tag=7bb10a6e

Call-ID: 104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM

CSeq: 1 REGISTER

Expires: 3600

Allow: OPTIONS, SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO,
MESSAGE

Supported: outbound, path

User-Agent: VEX release 6.2.2.0 stamp 104875

Content-Length: 0





As you can see the CONTACT is duplicated and I’m getting the next error:

ERROR:mid_registrar:save_restore_rpl_contacts: 200 OK reply does not
include all req contacts! (ci:
104875NWY1NThmMTJmOWMyNTdlNmY3OGIwZjZlNWIzMzk4NDM)

Nov 18 09:58:00 sbcar /usr/local/sbin/opensips[11924]:
ERROR:mid_registrar:mid_reg_resp_in: failed to process rpl contacts for AoR
'd1.922'





Does someone have a clue on this?



Regards,

Ricardo



*De:* Users  *En nombre de *M S
*Enviado el:* martes, 17 de noviembre de 2020 22:24
*Para:* OpenSIPS users mailling list 
*Asunto:* [OpenSIPS-Users] topology hiding bug?



Dear OpenSIPS development team,

I have come across a strange case that sometime when I use
topology_hiding("UD"), it makes a mistake in changing Contact field.

Scenario is:



A: (Contact: ) sends Invite to private IP of
opensips, opensips changes Contact field to: (Contact: <
sip:90006969.did.29c.2ed2...@public.ip>) and sends Invite from public IP to
B.

Then B sends 200 OK back to Opensips public IP, with correct Contact:
(Contact: ). so far so good.

Now Opensips sends 200 OK back to A from its private IP, and changes
Contact to:

Contact: 



As you see, did part is repeated twice.. and that means when A replies with:

ACK sip:90006969.did.29c.2ed202e.did.29c.2ed202e@172.24.8.37 SIP/2.0



Opensips throws an error: ERROR:dialog:dlg_onroute: malformed route param
[29c.2ed202e.did.29c.2ed202e]



Is this a bug? I am using Opensips 3.1.0.



Thanks,

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


[OpenSIPS-Users] topology hiding bug?

2020-11-17 Thread M S
Dear OpenSIPS development team,
I have come across a strange case that sometime when I use
topology_hiding("UD"), it makes a mistake in changing Contact field.
Scenario is:

A: (Contact: ) sends Invite to private IP of
opensips, opensips changes Contact field to: (Contact:
) and sends Invite from public IP
to B.
Then B sends 200 OK back to Opensips public IP, with correct Contact:
(Contact: ). so far so good.
Now Opensips sends 200 OK back to A from its private IP, and changes
Contact to:
Contact: 

As you see, did part is repeated twice.. and that means when A replies with:
ACK sip:90006969.did.29c.2ed202e.did.29c.2ed202e@172.24.8.37 SIP/2.0

Opensips throws an error: ERROR:dialog:dlg_onroute: malformed route param
[29c.2ed202e.did.29c.2ed202e]

Is this a bug? I am using Opensips 3.1.0.

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


Re: [OpenSIPS-Users] Topology Hiding and NAT

2020-04-13 Thread Bogdan-Andrei Iancu

Hi Kamlesh,

I would suspect you do something wrong in the failure_route, when 
handling the FWD cases. Maybe another change over the contact hdr in the 
INVITE ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 4/11/20 3:51 PM, Kamlesh . wrote:

Hello Team,

I have a problem with TOPOLOGY HIDING and NAT issues while using 
forwarding on busy/no-answer. I fix the NATed contact and then create 
dialog with topology hiding. The UPSTREAM (callee to caller) BYE 
relays to private IP instead of public. All the previous requests 
relay after fixing the contact. This only happens when a call is 
forwarded on BUSY/NO ANSWER Relay the packetsto opensips itself, We 
just change the request number and add some required headers to detect 
the forwarded request. So the all dialog related things are the same 
for both the request one is initial request and forwarded request. 
Anyone can help me to short out this issue. I’m ready to provide other 
information if any to solve the issue.


Regards,

Kamlesh



Disclaimer :

This e-mail and any file transmitted with it are for exclusive use of 
the intended recipient(s)
and may contain confidential and privileged information. If you are 
not the intended recipient,
please contact the sender by replying this e-mail and destroy all 
copies and original message.
Any unauthorized review,use, disclosure, dissemination, forwarding, 
printing and copying of this
email or any action taken in reliance of this e-mail is strictly 
prohibited and may be unlawful.



___
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] Topology Hiding and NAT

2020-04-11 Thread Kamlesh .
Hello Team,

I have a problem with TOPOLOGY HIDING and NAT issues while using forwarding
on busy/no-answer. I fix the NATed contact and then create dialog with
topology hiding. The UPSTREAM (callee to caller) BYE relays to private IP
instead of public. All the previous requests relay after fixing the
contact. This only happens when a call is forwarded on BUSY/NO ANSWER Relay
the packets to opensips itself, We just change the request number and add
some required headers to detect the forwarded request. So the all dialog
related things are the same for both the request one is initial request and
forwarded request. Anyone can help me to short out this issue. I’m ready to
provide other information if any to solve the issue.


Regards,

Kamlesh

-- 


Disclaimer :

This e-mail and any file transmitted with it are for 
exclusive use of the intended recipient(s)
and may contain confidential and 
privileged information. If you are not the intended recipient, 
please 
contact the sender by replying this e-mail and destroy all copies and 
original message.
Any unauthorized review,use, disclosure, dissemination, 
forwarding, printing and copying of this
email or any action taken in 
reliance of this e-mail is strictly prohibited and may be unlawful.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Topology Hiding Presence Proxy

2017-11-21 Thread Bogdan-Andrei Iancu

Hi Nate,

I missed this update from you - you did what I just asked in my last 
email :).


Could you share (off-line if needed) the pcap for SUBSCRIBE+NOTIFY and 
the opensips logs in debug level ?


Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

On 11/20/2017 08:57 PM, Nathan Baker wrote:
I just wanted to follow up on this one more time with some additional 
details.  In the topology hiding tutorial 
(http://www.opensips.org/Documentation/Tutorials-Topology-Hiding) it 
mentions that presence dialogs should be supported on top of the TM 
module:


"When running strictly on top of the TM module, the topology
hiding SIP messages will be bigger when compared to the initial
requests ( since OpenSIPS will encode all the needed information
in a parameter of the Contact header ), but all type of SIP
requests and dialogs will be supported ( INVITE dialogs, Presence
dialogs, SIP MESSAGE, etc )."


When I attempt to do this, the SUBSCRIBE works fine, but when the 
NOTIFY comes back from the server I get errors when it does the 
topology_hiding_match(), usually something like:


ERROR:core:parse_params: invalid character, ; expected, found o
ERROR:core:do_parse_rr_body: failed to parse params
ERROR:core:do_parse_rr_body: failed to parse RR headers
ERROR:topology_hiding:topo_no_dlg_seq_handling: failed parsing route set

I can see the th_contact_encode_param value in the request URI, but 
there is no route set in the NOTIFY message.  Is it expecting that 
there is one?  I guess I need to turn on debugging or dig into the 
topology hiding module code to see what's causing the errors.  Any 
help would be greatly appreciated!


Thanks,
Nate


On Fri, Nov 17, 2017 at 8:57 AM, Nathan Baker > wrote:


Hi Bogdan,

Yes, I think that's correct, although I didn't see any module that
would implement a mid-presence agent.  I don't so much need to
hide IPs, but I do need to change the Contact header, so I started
using topology_hiding for that since it has it built in.  I
originally tried to use mid_registrar but stopped for now because
it doesn't store locations in the database and doesn't support
presence (yet).  Any insight or suggestions would be greatly
appreciated, I would basically be fine with a B2BUA if there was
one that did forward registrations and presence.

Thanks,
Nate


On Nov 17, 2017 4:28 AM, "Bogdan-Andrei Iancu"
> wrote:

Hi Nathan,

Based on your description you do not want topology-hiding (to
simply hide IPs from the end-points), but a mid-presence
agent, right ?

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com


On 11/17/2017 08:13 AM, Nathan Baker wrote:

Hello,

I have been looking for some examples on how to use the
topology hiding module and proxying presence (SUBSCRIBE,
NOTIFY, etc.) together, similar to how the mid_registrar
module would handle registrations.  Does anyone have any
examples or suggestions on how to do this?

I have the clients subscribing to the server (through
OpenSIPS proxy to another presence server), but I'm not sure
how to store the subscriptions and how to route the presence
messages.  For registrations you can just do
save("location"), but is there an equivalent for
subscriptions/presence?  It seems like the handle_subscribe()
function from the presence module wouldn't apply because it's
part of a presence server, or can you just use it for storing
subscriptions but never publish anything?  I don't see a
function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are
valid and relay the messages?  If so, what is the best way to
handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate


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







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


Re: [OpenSIPS-Users] Topology Hiding Presence Proxy

2017-11-21 Thread Bogdan-Andrei Iancu

Hi Nate,

If you just need to change the Contact hdr, the topology-hiding will do 
the job - have you tried to simply use the the topology_hiding() 
function when routing the initial SUBSCRIBE request ?


Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

On 11/17/2017 03:57 PM, Nathan Baker wrote:

Hi Bogdan,

Yes, I think that's correct, although I didn't see any module that 
would implement a mid-presence agent.  I don't so much need to hide 
IPs, but I do need to change the Contact header, so I started using 
topology_hiding for that since it has it built in.  I originally tried 
to use mid_registrar but stopped for now because it doesn't store 
locations in the database and doesn't support presence (yet).  Any 
insight or suggestions would be greatly appreciated, I would basically 
be fine with a B2BUA if there was one that did forward registrations 
and presence.


Thanks,
Nate


On Nov 17, 2017 4:28 AM, "Bogdan-Andrei Iancu" > wrote:


Hi Nathan,

Based on your description you do not want topology-hiding (to
simply hide IPs from the end-points), but a mid-presence agent,
right ?

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com 

On 11/17/2017 08:13 AM, Nathan Baker wrote:

Hello,

I have been looking for some examples on how to use the topology
hiding module and proxying presence (SUBSCRIBE, NOTIFY, etc.)
together, similar to how the mid_registrar module would handle
registrations.  Does anyone have any examples or suggestions on
how to do this?

I have the clients subscribing to the server (through OpenSIPS
proxy to another presence server), but I'm not sure how to store
the subscriptions and how to route the presence messages.  For
registrations you can just do save("location"), but is there an
equivalent for subscriptions/presence?  It seems like the
handle_subscribe() function from the presence module wouldn't
apply because it's part of a presence server, or can you just use
it for storing subscriptions but never publish anything?  I don't
see a function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are
valid and relay the messages?  If so, what is the best way to
handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate


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






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


Re: [OpenSIPS-Users] Topology Hiding Presence Proxy

2017-11-20 Thread Nathan Baker
I just wanted to follow up on this one more time with some additional
details.  In the topology hiding tutorial (
http://www.opensips.org/Documentation/Tutorials-Topology-Hiding) it
mentions that presence dialogs should be supported on top of the TM module:

"When running strictly on top of the TM module, the topology hiding SIP
messages will be bigger when compared to the initial requests ( since
OpenSIPS will encode all the needed information in a parameter of the
Contact header ), but all type of SIP requests and dialogs will be
supported ( INVITE dialogs, Presence dialogs, SIP MESSAGE, etc )."


When I attempt to do this, the SUBSCRIBE works fine, but when the NOTIFY
comes back from the server I get errors when it does the
topology_hiding_match(), usually something like:

ERROR:core:parse_params: invalid character, ; expected, found o
ERROR:core:do_parse_rr_body: failed to parse params
ERROR:core:do_parse_rr_body: failed to parse RR headers
ERROR:topology_hiding:topo_no_dlg_seq_handling: failed parsing route set

I can see the th_contact_encode_param value in the request URI, but there
is no route set in the NOTIFY message.  Is it expecting that there is one?
I guess I need to turn on debugging or dig into the topology hiding module
code to see what's causing the errors.  Any help would be greatly
appreciated!

Thanks,
Nate


On Fri, Nov 17, 2017 at 8:57 AM, Nathan Baker  wrote:

> Hi Bogdan,
>
> Yes, I think that's correct, although I didn't see any module that would
> implement a mid-presence agent.  I don't so much need to hide IPs, but I do
> need to change the Contact header, so I started using topology_hiding for
> that since it has it built in.  I originally tried to use mid_registrar but
> stopped for now because it doesn't store locations in the database and
> doesn't support presence (yet).  Any insight or suggestions would be
> greatly appreciated, I would basically be fine with a B2BUA if there was
> one that did forward registrations and presence.
>
> Thanks,
> Nate
>
>
> On Nov 17, 2017 4:28 AM, "Bogdan-Andrei Iancu" 
> wrote:
>
> Hi Nathan,
>
> Based on your description you do not want topology-hiding (to simply hide
> IPs from the end-points), but a mid-presence agent, right ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> On 11/17/2017 08:13 AM, Nathan Baker wrote:
>
> Hello,
>
> I have been looking for some examples on how to use the topology hiding
> module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to
> how the mid_registrar module would handle registrations.  Does anyone have
> any examples or suggestions on how to do this?
>
> I have the clients subscribing to the server (through OpenSIPS proxy to
> another presence server), but I'm not sure how to store the subscriptions
> and how to route the presence messages.  For registrations you can just do
> save("location"), but is there an equivalent for subscriptions/presence?
> It seems like the handle_subscribe() function from the presence module
> wouldn't apply because it's part of a presence server, or can you just use
> it for storing subscriptions but never publish anything?  I don't see a
> function to look up these stored subscriptions.
>
> Would it be better to just assume that the subscriptions are valid and
> relay the messages?  If so, what is the best way to handle the routing?
>
> Any help or insight would be greatly appreciated!
>
> Thanks,
> Nate
>
>
> ___
> 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] Topology Hiding Presence Proxy

2017-11-17 Thread Nathan Baker
Hi Bogdan,

Yes, I think that's correct, although I didn't see any module that would
implement a mid-presence agent.  I don't so much need to hide IPs, but I do
need to change the Contact header, so I started using topology_hiding for
that since it has it built in.  I originally tried to use mid_registrar but
stopped for now because it doesn't store locations in the database and
doesn't support presence (yet).  Any insight or suggestions would be
greatly appreciated, I would basically be fine with a B2BUA if there was
one that did forward registrations and presence.

Thanks,
Nate


On Nov 17, 2017 4:28 AM, "Bogdan-Andrei Iancu"  wrote:

Hi Nathan,

Based on your description you do not want topology-hiding (to simply hide
IPs from the end-points), but a mid-presence agent, right ?

Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

On 11/17/2017 08:13 AM, Nathan Baker wrote:

Hello,

I have been looking for some examples on how to use the topology hiding
module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to
how the mid_registrar module would handle registrations.  Does anyone have
any examples or suggestions on how to do this?

I have the clients subscribing to the server (through OpenSIPS proxy to
another presence server), but I'm not sure how to store the subscriptions
and how to route the presence messages.  For registrations you can just do
save("location"), but is there an equivalent for subscriptions/presence?
It seems like the handle_subscribe() function from the presence module
wouldn't apply because it's part of a presence server, or can you just use
it for storing subscriptions but never publish anything?  I don't see a
function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are valid and
relay the messages?  If so, what is the best way to handle the routing?

Any help or insight would be greatly appreciated!

Thanks,
Nate


___
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] Topology Hiding Presence Proxy

2017-11-17 Thread Bogdan-Andrei Iancu

Hi Nathan,

Based on your description you do not want topology-hiding (to simply 
hide IPs from the end-points), but a mid-presence agent, right ?


Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

On 11/17/2017 08:13 AM, Nathan Baker wrote:

Hello,

I have been looking for some examples on how to use the topology 
hiding module and proxying presence (SUBSCRIBE, NOTIFY, etc.) 
together, similar to how the mid_registrar module would handle 
registrations.  Does anyone have any examples or suggestions on how to 
do this?


I have the clients subscribing to the server (through OpenSIPS proxy 
to another presence server), but I'm not sure how to store the 
subscriptions and how to route the presence messages.  For 
registrations you can just do save("location"), but is there an 
equivalent for subscriptions/presence?  It seems like the 
handle_subscribe() function from the presence module wouldn't apply 
because it's part of a presence server, or can you just use it for 
storing subscriptions but never publish anything?  I don't see a 
function to look up these stored subscriptions.


Would it be better to just assume that the subscriptions are valid and 
relay the messages?  If so, what is the best way to handle the routing?


Any help or insight would be greatly appreciated!

Thanks,
Nate


___
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] Topology Hiding Presence Proxy

2017-11-16 Thread Nathan Baker
Hello,

I have been looking for some examples on how to use the topology hiding
module and proxying presence (SUBSCRIBE, NOTIFY, etc.) together, similar to
how the mid_registrar module would handle registrations.  Does anyone have
any examples or suggestions on how to do this?

I have the clients subscribing to the server (through OpenSIPS proxy to
another presence server), but I'm not sure how to store the subscriptions
and how to route the presence messages.  For registrations you can just do
save("location"), but is there an equivalent for subscriptions/presence?
It seems like the handle_subscribe() function from the presence module
wouldn't apply because it's part of a presence server, or can you just use
it for storing subscriptions but never publish anything?  I don't see a
function to look up these stored subscriptions.

Would it be better to just assume that the subscriptions are valid and
relay the messages?  If so, what is the best way to handle the routing?

Any help or insight would be greatly appreciated!

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


Re: [OpenSIPS-Users] Topology hiding is not working with async operations

2017-10-12 Thread Bogdan-Andrei Iancu

Hi Diptesh,

async does not work in reply route at all (by design).

Regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

On 10/02/2017 03:43 PM, Dipteshkumar Patel wrote:

Hello sir

I am using opensips version 2.3.1

I am using topology hiding in my system but when i am using async 
operation for query in reply route then the topology hiding does not 
work. (Other than reply route it works fine)


Please help me to find out the issue.


*Diptesh Patel*
Jr. Software Developer
Ecosmob Technologies Ltd
Ahmedabad
Mo:*+919898962659*


___
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] Topology hiding is not working with async operations

2017-10-02 Thread Dipteshkumar Patel
Hello sir

I am using opensips version 2.3.1

I am using topology hiding in my system but when i am using async operation
for query in reply route then the topology hiding does not work. (Other
than reply route it works fine)

Please help me to find out the issue.


*Diptesh Patel*
Jr. Software Developer
Ecosmob Technologies Ltd
Ahmedabad
Mo:*+919898962659*
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Topology Hiding- ACK not going through

2017-06-06 Thread Royee Tichauer via Users
Hi,

I'm having some problems when using topology hiding. In my scenario an
INVITE comes in to the opensips (SBC) instance from another opensips
instance (Proxy). It is routed to a callee which eventually answers with a
200OK. The 200 OK is routed through the SBC to the Proxy which answers back
with an ACK. This ACK is absorbed by the SBC which (by looking at the logs)
attempts to send this ACK to the private IP of the callee instead of the
the NAT IP which was originally used for the incoming INVITE.

>From the logs I see that right before I attempt to do
'topology_hiding_match()' the 'ruri=public_IP' and after the method is
called the ruri switches to 'ruri=private_IP'.

Attached is a trace, the problematic ACK is message number 53. Below is a
partial opensips.cfg file I am using with opensips 2.1:


# - NATHELPER -
loadmodule "nathelper.so"
modparam("nathelper", "received_avp", "$avp(42)")

# - DIALOG -
loadmodule "dialog.so"
modparam("dialog", "db_mode", 0)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "profiles_no_value", "inboundcalls")


# - TOPOLOGY_HIDING -
loadmodule "topology_hiding.so"
modparam("topology_hiding", "force_dialog", 1)
modparam("topology_hiding", "th_callid_passwd", "*")
modparam("topology_hiding", "th_contact_encode_passwd", "*")
modparam("topology_hiding", "th_callid_prefix", "")

route {
  route(nat_checks);
  route(topology_check);
  .
  .
  .

  create_dialog();

  record_route();

  if (!has_totag() && is_method("INVITE")) {
topology_hiding("U");
  }

  .
  .
  .
}


route[topology_check] {

  force_rport();
  xlog("L_INFO", "[REQUEST $ci] current  ruri: $ruri");
  if (has_totag()) {
if (topology_hiding_match()) {
xlog("L_INFO", "[REQUEST $ci] $rm topology_check successful match
reinvite TH_callee_callid: $TH_callee_callid ruri: $ruri");
route(relay);
} else {
  xlog("L_INFO", "[REQUEST $ci] $rm topology_check Did not match this
request to a topology hiding dialog.");
  if ( is_method("ACK") ) {
if ( t_check_trans() ) {
  xlog("L_INFO", "[REQUEST $ci] $rm within a transaction relaying");
  route(relay);
} else {
  xlog("L_INFO", "[REQUEST $ci] $rm not within a transaction
exiting");
  exit;
}
  }
  xlog("L_INFO", "[REQUEST $ci] $rm sending 404 Not Found");
  send_reply("404","Not Found");
  exit;
}
  }

}

route[nat_checks] {

  if (nat_uac_test("1")) {
xlog("L_INFO", "[REQUEST $ci] $rm fix_nated_contact()");
fix_nated_contact();
  }
}
.
.
.


capture.pcap
Description: Binary data
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Topology Hiding - ACK not going through

2017-06-06 Thread Răzvan Crainea

Hi, Royee!

Can you turn on debugging for this call and send the logs (in private if 
privacy is an issue)?
My assumption is that the dialog is created before fix_nated_contact() 
is called, perhaps due to a siptrace() call or something, and the wrong 
contact ends up in the dialog. Or perhaps fix_nated_contact() is not 
called for some reason, although the nat test seems all right. Can you 
add some debugging between the fix_nated_contact() block, so we can make 
sure it is called?


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 06/06/2017 12:15 PM, Royee Tichauer via Users wrote:

Razvan,

Thanks for the help!

fix_nated_contact is called before create_dialog as you can also see 
from the configuration file I added in the previous email.


When using the MI command I see:

callee_contact:: sip:USERNAME@PRIVATE_IP:PORT;transport=TCP

So it seems like the dialog is created with a private IP. Any suggestions?

Thanks,

Royee




On Tue, Jun 6, 2017 at 11:06 AM Răzvan Crainea > wrote:


Hi, Royee!

Can you make sure that fix_nated_contact() is called before
create_dialog()?
Also, if you run through MI the dlg_list_ctx command, what is the
contact header stored in the dialog?

Best regards,
Răzvan

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com 

On 06/06/2017 11:02 AM, Royee Tichauer via Users wrote:

Hi,

I'm having some problems when using topology hiding. In my
scenario an INVITE comes in to the opensips (SBC) instance from
another opensips instance (Proxy). It is routed to a callee which
eventually answers with a 200OK. The 200 OK is routed through the
SBC to the Proxy which answers back with an ACK. This ACK is
absorbed by the SBC which (by looking at the logs) attempts to
send this ACK to the private IP of the callee instead of the the
NAT IP which was originally used for the incoming INVITE.

From the logs I see that right before I attempt to do
'topology_hiding_match()' the 'ruri=public_IP' and after the
method is called the ruri switches to 'ruri=private_IP'.

Attached is a trace. Below is a partial opensips.cfg file I am
using with opensips 2.1:


# - NATHELPER -
loadmodule "nathelper.so"
modparam("nathelper", "received_avp", "$avp(42)")

# - DIALOG -
loadmodule "dialog.so"
modparam("dialog", "db_mode", 0)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "profiles_no_value", "inboundcalls")


# - TOPOLOGY_HIDING -
loadmodule "topology_hiding.so"
modparam("topology_hiding", "force_dialog", 1)
modparam("topology_hiding", "th_callid_passwd", "*")
modparam("topology_hiding", "th_contact_encode_passwd", "*")
modparam("topology_hiding", "th_callid_prefix", "")

route {
  route(nat_checks);
  route(topology_check);
  .
  .
  .

  create_dialog();

  record_route();

  if (!has_totag() && is_method("INVITE")) {
topology_hiding("U");
  }

  .
  .
  .
}


route[topology_check] {

  force_rport();
  xlog("L_INFO", "[REQUEST $ci] current  ruri: $ruri");
  if (has_totag()) {
if (topology_hiding_match()) {
xlog("L_INFO", "[REQUEST $ci] $rm topology_check
successful match reinvite TH_callee_callid: $TH_callee_callid
ruri: $ruri");
route(relay);
} else {
  xlog("L_INFO", "[REQUEST $ci] $rm topology_check Did not
match this request to a topology hiding dialog.");
  if ( is_method("ACK") ) {
if ( t_check_trans() ) {
  xlog("L_INFO", "[REQUEST $ci] $rm within a transaction
relaying");
  route(relay);
} else {
  xlog("L_INFO", "[REQUEST $ci] $rm not within a
transaction exiting");
  exit;
}
  }
  xlog("L_INFO", "[REQUEST $ci] $rm sending 404 Not Found");
  send_reply("404","Not Found");
  exit;
}
  }

}

route[nat_checks] {

  if (nat_uac_test("1")) {
xlog("L_INFO", "[REQUEST $ci] $rm fix_nated_contact()");
fix_nated_contact();
  }
}
.
.
.


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




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


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


Re: [OpenSIPS-Users] Topology Hiding - ACK not going through

2017-06-06 Thread Royee Tichauer via Users
Razvan,

Thanks for the help!

fix_nated_contact is called before create_dialog as you can also see from
the configuration file I added in the previous email.

When using the MI command I see:

callee_contact:: sip:USERNAME@PRIVATE_IP:PORT;transport=TCP

So it seems like the dialog is created with a private IP. Any suggestions?

Thanks,

Royee




On Tue, Jun 6, 2017 at 11:06 AM Răzvan Crainea  wrote:

> Hi, Royee!
>
> Can you make sure that fix_nated_contact() is called before
> create_dialog()?
> Also, if you run through MI the dlg_list_ctx command, what is the contact
> header stored in the dialog?
>
> Best regards,
> Răzvan
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 06/06/2017 11:02 AM, Royee Tichauer via Users wrote:
>
> Hi,
>
> I'm having some problems when using topology hiding. In my scenario an
> INVITE comes in to the opensips (SBC) instance from another opensips
> instance (Proxy). It is routed to a callee which eventually answers with a
> 200OK. The 200 OK is routed through the SBC to the Proxy which answers back
> with an ACK. This ACK is absorbed by the SBC which (by looking at the logs)
> attempts to send this ACK to the private IP of the callee instead of the
> the NAT IP which was originally used for the incoming INVITE.
>
> From the logs I see that right before I attempt to do
> 'topology_hiding_match()' the 'ruri=public_IP' and after the method is
> called the ruri switches to 'ruri=private_IP'.
>
> Attached is a trace. Below is a partial opensips.cfg file I am using with
> opensips 2.1:
>
>
> # - NATHELPER -
> loadmodule "nathelper.so"
> modparam("nathelper", "received_avp", "$avp(42)")
>
> # - DIALOG -
> loadmodule "dialog.so"
> modparam("dialog", "db_mode", 0)
> modparam("dialog", "dlg_match_mode", 1)
> modparam("dialog", "profiles_no_value", "inboundcalls")
>
>
> # - TOPOLOGY_HIDING -
> loadmodule "topology_hiding.so"
> modparam("topology_hiding", "force_dialog", 1)
> modparam("topology_hiding", "th_callid_passwd", "*")
> modparam("topology_hiding", "th_contact_encode_passwd", "*")
> modparam("topology_hiding", "th_callid_prefix", "")
>
> route {
>   route(nat_checks);
>   route(topology_check);
>   .
>   .
>   .
>
>   create_dialog();
>
>   record_route();
>
>   if (!has_totag() && is_method("INVITE")) {
> topology_hiding("U");
>   }
>
>   .
>   .
>   .
> }
>
>
> route[topology_check] {
>
>   force_rport();
>   xlog("L_INFO", "[REQUEST $ci] current  ruri: $ruri");
>   if (has_totag()) {
> if (topology_hiding_match()) {
> xlog("L_INFO", "[REQUEST $ci] $rm topology_check successful match
> reinvite TH_callee_callid: $TH_callee_callid ruri: $ruri");
> route(relay);
> } else {
>   xlog("L_INFO", "[REQUEST $ci] $rm topology_check Did not match this
> request to a topology hiding dialog.");
>   if ( is_method("ACK") ) {
> if ( t_check_trans() ) {
>   xlog("L_INFO", "[REQUEST $ci] $rm within a transaction
> relaying");
>   route(relay);
> } else {
>   xlog("L_INFO", "[REQUEST $ci] $rm not within a transaction
> exiting");
>   exit;
> }
>   }
>   xlog("L_INFO", "[REQUEST $ci] $rm sending 404 Not Found");
>   send_reply("404","Not Found");
>   exit;
> }
>   }
>
> }
>
> route[nat_checks] {
>
>   if (nat_uac_test("1")) {
> xlog("L_INFO", "[REQUEST $ci] $rm fix_nated_contact()");
> fix_nated_contact();
>   }
> }
> .
> .
> .
>
>
> ___
> 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] Topology Hiding - ACK not going through

2017-06-06 Thread Răzvan Crainea

Hi, Royee!

Can you make sure that fix_nated_contact() is called before create_dialog()?
Also, if you run through MI the dlg_list_ctx command, what is the 
contact header stored in the dialog?


Best regards,
Răzvan

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 06/06/2017 11:02 AM, Royee Tichauer via Users wrote:

Hi,

I'm having some problems when using topology hiding. In my scenario an 
INVITE comes in to the opensips (SBC) instance from another opensips 
instance (Proxy). It is routed to a callee which eventually answers 
with a 200OK. The 200 OK is routed through the SBC to the Proxy which 
answers back with an ACK. This ACK is absorbed by the SBC which (by 
looking at the logs) attempts to send this ACK to the private IP of 
the callee instead of the the NAT IP which was originally used for the 
incoming INVITE.


From the logs I see that right before I attempt to do 
'topology_hiding_match()' the 'ruri=public_IP' and after the method is 
called the ruri switches to 'ruri=private_IP'.


Attached is a trace. Below is a partial opensips.cfg file I am using 
with opensips 2.1:



# - NATHELPER -
loadmodule "nathelper.so"
modparam("nathelper", "received_avp", "$avp(42)")

# - DIALOG -
loadmodule "dialog.so"
modparam("dialog", "db_mode", 0)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "profiles_no_value", "inboundcalls")


# - TOPOLOGY_HIDING -
loadmodule "topology_hiding.so"
modparam("topology_hiding", "force_dialog", 1)
modparam("topology_hiding", "th_callid_passwd", "*")
modparam("topology_hiding", "th_contact_encode_passwd", "*")
modparam("topology_hiding", "th_callid_prefix", "")

route {
  route(nat_checks);
  route(topology_check);
  .
  .
  .

  create_dialog();

  record_route();

  if (!has_totag() && is_method("INVITE")) {
topology_hiding("U");
  }

  .
  .
  .
}


route[topology_check] {

  force_rport();
  xlog("L_INFO", "[REQUEST $ci] current  ruri: $ruri");
  if (has_totag()) {
if (topology_hiding_match()) {
xlog("L_INFO", "[REQUEST $ci] $rm topology_check successful 
match reinvite TH_callee_callid: $TH_callee_callid ruri: $ruri");

route(relay);
} else {
  xlog("L_INFO", "[REQUEST $ci] $rm topology_check Did not match 
this request to a topology hiding dialog.");

  if ( is_method("ACK") ) {
if ( t_check_trans() ) {
  xlog("L_INFO", "[REQUEST $ci] $rm within a transaction 
relaying");

  route(relay);
} else {
  xlog("L_INFO", "[REQUEST $ci] $rm not within a transaction 
exiting");

  exit;
}
  }
  xlog("L_INFO", "[REQUEST $ci] $rm sending 404 Not Found");
  send_reply("404","Not Found");
  exit;
}
  }

}

route[nat_checks] {

  if (nat_uac_test("1")) {
xlog("L_INFO", "[REQUEST $ci] $rm fix_nated_contact()");
fix_nated_contact();
  }
}
.
.
.


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


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


Re: [OpenSIPS-Users] Topology Hiding- ACK not going through

2017-06-05 Thread Royee Tichauer via Users
Adding capture

On Mon, Jun 5, 2017 at 3:15 PM Royee Tichauer 
wrote:

> Hi,
>
> I'm having some problems when using topology hiding. In my scenario an
> INVITE comes in to the opensips (SBC) instance from another opensips
> instance (Proxy). It is routed to a callee which eventually answers with a
> 200OK. The 200 OK is routed through the SBC to the Proxy which answers back
> with an ACK. This ACK is absorbed by the SBC which (by looking at the logs)
> attempts to send this ACK to the private IP of the callee instead of the
> the NAT IP which was originally used for the incoming INVITE.
>
> From the logs I see that right before I attempt to do
> 'topology_hiding_match()' the 'ruri=public_IP' and after the method is
> called the ruri switches to 'ruri=private_IP'.
>
> Attached is a trace, the problematic ACK is message number 53. Below is a
> partial opensips.cfg file I am using with opensips 2.1:
>
>
> # - NATHELPER -
> loadmodule "nathelper.so"
> modparam("nathelper", "received_avp", "$avp(42)")
>
> # - DIALOG -
> loadmodule "dialog.so"
> modparam("dialog", "db_mode", 0)
> modparam("dialog", "dlg_match_mode", 1)
> modparam("dialog", "profiles_no_value", "inboundcalls")
>
>
> # - TOPOLOGY_HIDING -
> loadmodule "topology_hiding.so"
> modparam("topology_hiding", "force_dialog", 1)
> modparam("topology_hiding", "th_callid_passwd", "*")
> modparam("topology_hiding", "th_contact_encode_passwd", "*")
> modparam("topology_hiding", "th_callid_prefix", "")
>
> route {
>   route(nat_checks);
>   route(topology_check);
>   .
>   .
>   .
>
>   create_dialog();
>
>   record_route();
>
>   if (!has_totag() && is_method("INVITE")) {
> topology_hiding("U");
>   }
>
>   .
>   .
>   .
> }
>
>
> route[topology_check] {
>
>   force_rport();
>   xlog("L_INFO", "[REQUEST $ci] current  ruri: $ruri");
>   if (has_totag()) {
> if (topology_hiding_match()) {
> xlog("L_INFO", "[REQUEST $ci] $rm topology_check successful match
> reinvite TH_callee_callid: $TH_callee_callid ruri: $ruri");
> route(relay);
> } else {
>   xlog("L_INFO", "[REQUEST $ci] $rm topology_check Did not match this
> request to a topology hiding dialog.");
>   if ( is_method("ACK") ) {
> if ( t_check_trans() ) {
>   xlog("L_INFO", "[REQUEST $ci] $rm within a transaction
> relaying");
>   route(relay);
> } else {
>   xlog("L_INFO", "[REQUEST $ci] $rm not within a transaction
> exiting");
>   exit;
> }
>   }
>   xlog("L_INFO", "[REQUEST $ci] $rm sending 404 Not Found");
>   send_reply("404","Not Found");
>   exit;
> }
>   }
>
> }
>
> route[nat_checks] {
>
>   if (nat_uac_test("1")) {
> xlog("L_INFO", "[REQUEST $ci] $rm fix_nated_contact()");
> fix_nated_contact();
>   }
> }
> .
> .
> .
>
>
>
>
>
>
>
>
>


capture.pcap
Description: Binary data
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Topology Hiding- ACK not going through

2017-06-05 Thread Royee Tichauer via Users
Hi,

I'm having some problems when using topology hiding. In my scenario an
INVITE comes in to the opensips (SBC) instance from another opensips
instance (Proxy). It is routed to a callee which eventually answers with a
200OK. The 200 OK is routed through the SBC to the Proxy which answers back
with an ACK. This ACK is absorbed by the SBC which (by looking at the logs)
attempts to send this ACK to the private IP of the callee instead of the
the NAT IP which was originally used for the incoming INVITE.

>From the logs I see that right before I attempt to do
'topology_hiding_match()' the 'ruri=public_IP' and after the method is
called the ruri switches to 'ruri=private_IP'.

Attached is a trace, the problematic ACK is message number 53. Below is a
partial opensips.cfg file I am using with opensips 2.1:


# - NATHELPER -
loadmodule "nathelper.so"
modparam("nathelper", "received_avp", "$avp(42)")

# - DIALOG -
loadmodule "dialog.so"
modparam("dialog", "db_mode", 0)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "profiles_no_value", "inboundcalls")


# - TOPOLOGY_HIDING -
loadmodule "topology_hiding.so"
modparam("topology_hiding", "force_dialog", 1)
modparam("topology_hiding", "th_callid_passwd", "*")
modparam("topology_hiding", "th_contact_encode_passwd", "*")
modparam("topology_hiding", "th_callid_prefix", "")

route {
  route(nat_checks);
  route(topology_check);
  .
  .
  .

  create_dialog();

  record_route();

  if (!has_totag() && is_method("INVITE")) {
topology_hiding("U");
  }

  .
  .
  .
}


route[topology_check] {

  force_rport();
  xlog("L_INFO", "[REQUEST $ci] current  ruri: $ruri");
  if (has_totag()) {
if (topology_hiding_match()) {
xlog("L_INFO", "[REQUEST $ci] $rm topology_check successful match
reinvite TH_callee_callid: $TH_callee_callid ruri: $ruri");
route(relay);
} else {
  xlog("L_INFO", "[REQUEST $ci] $rm topology_check Did not match this
request to a topology hiding dialog.");
  if ( is_method("ACK") ) {
if ( t_check_trans() ) {
  xlog("L_INFO", "[REQUEST $ci] $rm within a transaction relaying");
  route(relay);
} else {
  xlog("L_INFO", "[REQUEST $ci] $rm not within a transaction
exiting");
  exit;
}
  }
  xlog("L_INFO", "[REQUEST $ci] $rm sending 404 Not Found");
  send_reply("404","Not Found");
  exit;
}
  }

}

route[nat_checks] {

  if (nat_uac_test("1")) {
xlog("L_INFO", "[REQUEST $ci] $rm fix_nated_contact()");
fix_nated_contact();
  }
}
.
.
.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Bogdan-Andrei Iancu

OK, that should work for sure.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 01/24/2017 03:02 PM, Khalil Khamlichi wrote:

sorry :

# record routing
   record_route();

# create dialog with timeout
   if ( !create_dialog("B") ) {
   send_reply("500","Internal Server Error");
   exit;
   }

# apply transformations from dialplan table
   dp_translate("0","$rU/$rU");

# route calls based on prefix
   if ( !do_routing("1","W",,"$var(rule_attrs)","$var(gw_attrs)") ) {
   send_reply("404","No Route found");
   exit;
   }

   $acc_extra(gwid)=$avp(gw_id);

   t_on_failure("GW_FAILOVER");

   do_accounting("db|log","cdr|missed",);
#NAT
   if (isbflagset(NAT)) setflag(NAT);
#NAT
#TOPOHIDE
  toopology_hiding("UC");
#TOPOHIDE
   route(RELAY);

}


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


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


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Alberto Gonzales
lunch time here, gracias khalil.

On Tue, Jan 24, 2017 at 1:02 PM, Khalil Khamlichi <
khamlichi.kha...@gmail.com> wrote:

> sorry :
>
> # record routing
>record_route();
>
># create dialog with timeout
>if ( !create_dialog("B") ) {
>send_reply("500","Internal Server Error");
>exit;
>}
>
> # apply transformations from dialplan table
>dp_translate("0","$rU/$rU");
>
># route calls based on prefix
>if ( !do_routing("1","W",,"$var(rule_attrs)","$var(gw_attrs)") ) {
>send_reply("404","No Route found");
>exit;
>}
>
>$acc_extra(gwid)=$avp(gw_id);
>
>t_on_failure("GW_FAILOVER");
>
>do_accounting("db|log","cdr|missed",);
> #NAT
>if (isbflagset(NAT)) setflag(NAT);
> #NAT
> #TOPOHIDE
> toopology_hiding("UC");
> #TOPOHIDE
>route(RELAY);
>
> }
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Khalil Khamlichi
sorry :

# record routing
   record_route();

   # create dialog with timeout
   if ( !create_dialog("B") ) {
   send_reply("500","Internal Server Error");
   exit;
   }

# apply transformations from dialplan table
   dp_translate("0","$rU/$rU");

   # route calls based on prefix
   if ( !do_routing("1","W",,"$var(rule_attrs)","$var(gw_attrs)") ) {
   send_reply("404","No Route found");
   exit;
   }

   $acc_extra(gwid)=$avp(gw_id);

   t_on_failure("GW_FAILOVER");

   do_accounting("db|log","cdr|missed",);
#NAT
   if (isbflagset(NAT)) setflag(NAT);
#NAT
#TOPOHIDE
toopology_hiding("UC");
#TOPOHIDE
   route(RELAY);

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


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Bogdan-Andrei Iancu
I see no indication of creating a dialog in your script sample :(...Are 
you sure about this ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 01/24/2017 02:20 PM, Alberto Gonzales wrote:

I am using dialog in my script,
here is the part of main function

# apply transformations from dialplan table
   dp_translate("0","$rU/$rU");

# route calls based on prefix
   if ( !do_routing("1","W",,"$var(rule_attrs)","$var(gw_attrs)") ) {
   send_reply("404","No Route found");
   exit;
   }

   $acc_extra(gwid)=$avp(gw_id);

   t_on_failure("GW_FAILOVER");

   do_accounting("db|log","cdr|missed",);
#NAT
   if (isbflagset(NAT)) setflag(NAT);
#NAT
#TOPOHIDE
toopology_hiding("UC");
#TOPOHIDE
   route(RELAY);

}



On Tue, Jan 24, 2017 at 12:09 PM, Bogdan-Andrei Iancu 
> wrote:


Hi,

It should be ok, but in your case the TH will not benefit from the
dialog module (you do not use it) - all the info to he hidden will
be appended to the Contact hdr (as extra param), while when using
the dialog support, this info is stored into the dialog.

To be honest, I never tried the combination of nathelper and TH
_without_ dialog support. But give it a try...if you get a trace,
I can check if ok.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com 

On 01/24/2017 02:03 PM, Alberto Gonzales wrote:

Thanks Bogdan, Well, I have fix_nated_contact() at the very top
of my script :
route{force_rport();   if (nat_uac_test("23")) {
   fix_nated_contact();   setflag(NAT);   }
   if (!mf_process_maxfwd_header("10")) {
   sl_send_reply("483","Too Many
Hops");   exit;   }


if (has_totag()) { # sequential request withing a dialog
should # take the path determined by record-routing 
remplazar : if (loose_route()) { if (topology_hiding_match()) { ...
...
*## esconder topologia antes de pasar la llamada*
topology_hiding("UC");   route(RELAY);}
so is my script correct ?
I just want to make sure I have a correct script before I do any
further work on this.
Thanks.
On Tue, Jan 24, 2017 at 11:52 AM, Bogdan-Andrei Iancu
> wrote:

Hi, You can do TH with nathelper, BUT be sure to create the
dialog + TH AFTER doing the fix_nated_contact(). Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 01/20/2017 12:42 PM, Alberto Gonzales wrote:

We used instruction in the book, which states at the end of
the paragraph this :
Topology hiding limitations
You cannot easily combine topology hiding with NAT traversal
because both the
processes mangle the Contact header. Topology hiding will
not hide the address and
other information contained in other headers such as the
display in the From header.
To change the From header, you can use the
uac_replace_from() function.
I think our problem comes from the fact that we are using
nathelper and also an rtpproxy in our script.
can anyone provide help about activating topology hiding
along with nathelper ?
thanks in advance.
On Fri, Jan 20, 2017 at 10:14 AM, Alberto Gonzales
> wrote:

I forgot to mention that doing this resulted in opensips
crashing after 20 minutes :)
On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales
> wrote:

Hello grupo,
We have configured topology hiding in opensips 2.2
this way :
please confirm to us this is the only thing we need
to do or is there anything else that needs to be added.
route {


if (has_totag()) { # sequential request
withing a dialog should # take the path determined
by record-routing  remplazar : if
(loose_route()) { if (topology_hiding_match()) { ...
...
*## esconder topologia antes de pasar la llamada*
topology_hiding("UC");   route(RELAY);}
also what could be a quick test to see if this
hiding is working or not.
thanks in advance.
Alberto


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Alberto Gonzales
I am using dialog in my script,
here is the part of main function

# apply transformations from dialplan table
   dp_translate("0","$rU/$rU");

   # route calls based on prefix
   if ( !do_routing("1","W",,"$var(rule_attrs)","$var(gw_attrs)") ) {
   send_reply("404","No Route found");
   exit;
   }

   $acc_extra(gwid)=$avp(gw_id);

   t_on_failure("GW_FAILOVER");

   do_accounting("db|log","cdr|missed",);
#NAT
   if (isbflagset(NAT)) setflag(NAT);
#NAT
#TOPOHIDE
toopology_hiding("UC");
#TOPOHIDE
   route(RELAY);

}




On Tue, Jan 24, 2017 at 12:09 PM, Bogdan-Andrei Iancu 
wrote:

> Hi,
>
> It should be ok, but in your case the TH will not benefit from the dialog
> module (you do not use it) - all the info to he hidden will be appended to
> the Contact hdr (as extra param), while when using the dialog support, this
> info is stored into the dialog.
>
> To be honest, I never tried the combination of nathelper and TH _without_
> dialog support. But give it a try...if you get a trace, I can check if ok.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 01/24/2017 02:03 PM, Alberto Gonzales wrote:
>
> Thanks Bogdan, Well, I have fix_nated_contact() at the very top of my
> script :
>
> route{
>
>force_rport();
>if (nat_uac_test("23")) {
>fix_nated_contact();
>setflag(NAT);
>}
>
>
>if (!mf_process_maxfwd_header("10")) {
>sl_send_reply("483","Too Many Hops");
>exit;
>}
>
> 
> 
> if (has_totag()) {
># sequential request withing a dialog should
># take the path determined by record-routing
> remplazar : if (loose_route()) {
>if (topology_hiding_match()) {
>
> ...
> ...
>   *## esconder topologia antes de pasar la llamada*
>topology_hiding("UC");
>route(RELAY);
> }
>
> so is my script correct ?
> I just want to make sure I have a correct script before I do any further
> work on this.
>
> Thanks.
>
> On Tue, Jan 24, 2017 at 11:52 AM, Bogdan-Andrei Iancu <
> bog...@opensips.org> wrote:
>
>> Hi,
>>
>> You can do TH with nathelper, BUT be sure to create the dialog + TH AFTER
>> doing the fix_nated_contact().
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 01/20/2017 12:42 PM, Alberto Gonzales wrote:
>>
>> We used instruction in the book, which states at the end of the paragraph
>> this :
>> Topology hiding limitations
>> You cannot easily combine topology hiding with NAT traversal because both
>> the
>> processes mangle the Contact header. Topology hiding will not hide the
>> address and
>> other information contained in other headers such as the display in the
>> From header.
>> To change the From header, you can use the uac_replace_from() function.
>> I think our problem comes from the fact that we are using nathelper and
>> also an rtpproxy in our script.
>> can anyone provide help about activating topology hiding along with
>> nathelper ?
>> thanks in advance.
>> On Fri, Jan 20, 2017 at 10:14 AM, Alberto Gonzales <
>> albertosgonz...@gmail.com> wrote:
>>>
>>> I forgot to mention that doing this resulted in opensips crashing after
>>> 20 minutes :)
>>> On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales <
>>> albertosgonz...@gmail.com> wrote:

 Hello grupo,
 We have configured topology hiding in opensips 2.2 this way :
 please confirm to us this is the only thing we need to do or is there
 anything else that needs to be added.
 route {
 
 
 if (has_totag()) {# sequential request withing
 a dialog should# take the path determined by
 record-routing remplazar : if (loose_route()) {
if (topology_hiding_match()) { ...
 ...
   *## esconder topologia antes de pasar la llamada*
topology_hiding("UC");route(RELAY); }
 also what could be a quick test to see if this hiding is working or not.
 thanks in advance.
 Alberto

>>> ___
>> 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] topology hiding in opensips

2017-01-24 Thread Bogdan-Andrei Iancu

Hi,

It should be ok, but in your case the TH will not benefit from the 
dialog module (you do not use it) - all the info to he hidden will be 
appended to the Contact hdr (as extra param), while when using the 
dialog support, this info is stored into the dialog.


To be honest, I never tried the combination of nathelper and TH 
_without_ dialog support. But give it a try...if you get a trace, I can 
check if ok.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 01/24/2017 02:03 PM, Alberto Gonzales wrote:
Thanks Bogdan, Well, I have fix_nated_contact() at the very top of my 
script :


route{

   force_rport();
   if (nat_uac_test("23")) {
   fix_nated_contact();
   setflag(NAT);
   }


   if (!mf_process_maxfwd_header("10")) {
   sl_send_reply("483","Too Many Hops");
   exit;
   }



if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
 remplazar : if (loose_route()) {
if (topology_hiding_match()) {

...
...
*## esconder topologia antes de pasar la llamada*
topology_hiding("UC");
   route(RELAY);
}

so is my script correct ?
I just want to make sure I have a correct script before I do any 
further work on this.


Thanks.

On Tue, Jan 24, 2017 at 11:52 AM, Bogdan-Andrei Iancu 
> wrote:


Hi,

You can do TH with nathelper, BUT be sure to create the dialog +
TH AFTER doing the fix_nated_contact().

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com 

On 01/20/2017 12:42 PM, Alberto Gonzales wrote:

We used instruction in the book, which states at the end of the
paragraph this :
Topology hiding limitations
You cannot easily combine topology hiding with NAT traversal
because both the
processes mangle the Contact header. Topology hiding will not
hide the address and
other information contained in other headers such as the display
in the From header.
To change the From header, you can use the uac_replace_from()
function.
I think our problem comes from the fact that we are using
nathelper and also an rtpproxy in our script.
can anyone provide help about activating topology hiding along
with nathelper ?
thanks in advance.
On Fri, Jan 20, 2017 at 10:14 AM, Alberto Gonzales
>
wrote:

I forgot to mention that doing this resulted in opensips
crashing after 20 minutes :)
On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales
> wrote:

Hello grupo,
We have configured topology hiding in opensips 2.2 this
way :
please confirm to us this is the only thing we need to do
or is there anything else that needs to be added.
route {


if (has_totag()) { # sequential request withing a
dialog should # take the path determined by
record-routing  remplazar : if (loose_route()) { if
(topology_hiding_match()) { ...
...
*## esconder topologia antes de pasar la llamada*
topology_hiding("UC");   route(RELAY);}
also what could be a quick test to see if this hiding is
working or not.
thanks in advance.
Alberto

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



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


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Bogdan-Andrei Iancu

Hi,

You can do TH with nathelper, BUT be sure to create the dialog + TH 
AFTER doing the fix_nated_contact().


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 01/20/2017 12:42 PM, Alberto Gonzales wrote:
We used instruction in the book, which states at the end of the 
paragraph this :


Topology hiding limitations
You cannot easily combine topology hiding with NAT traversal because 
both the
processes mangle the Contact header. Topology hiding will not hide the 
address and
other information contained in other headers such as the display in 
the From header.

To change the From header, you can use the uac_replace_from() function.

I think our problem comes from the fact that we are using nathelper 
and also an rtpproxy in our script.


can anyone provide help about activating topology hiding along with 
nathelper ?


thanks in advance.


On Fri, Jan 20, 2017 at 10:14 AM, Alberto Gonzales 
> wrote:


I forgot to mention that doing this resulted in opensips crashing
after 20 minutes :)

On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales
> wrote:

Hello grupo,

We have configured topology hiding in opensips 2.2 this way :

please confirm to us this is the only thing we need to do or
is there anything else that needs to be added.

route {


if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
 remplazar : if (loose_route()) {
if (topology_hiding_match()) {

...
...
*## esconder topologia antes de pasar la llamada*
topology_hiding("UC");
   route(RELAY);
}


also what could be a quick test to see if this hiding is
working or not.

thanks in advance.

Alberto





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


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


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-24 Thread Bogdan-Andrei Iancu

Hi Alberto,

Do you have any logs to show the crash ? also, do you get a corefile 
(see http://www.opensips.org/Documentation/TroubleShooting-Crash).


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 01/20/2017 12:14 PM, Alberto Gonzales wrote:
I forgot to mention that doing this resulted in opensips crashing 
after 20 minutes :)


On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales 
> wrote:


Hello grupo,

We have configured topology hiding in opensips 2.2 this way :

please confirm to us this is the only thing we need to do or is
there anything else that needs to be added.

route {


if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
 remplazar : if (loose_route()) {
if (topology_hiding_match()) {

...
...
*## esconder topologia antes de pasar la llamada*
topology_hiding("UC");
   route(RELAY);
}


also what could be a quick test to see if this hiding is working
or not.

thanks in advance.

Alberto




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


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


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-20 Thread Alberto Gonzales
We used instruction in the book, which states at the end of the paragraph
this :

Topology hiding limitations
You cannot easily combine topology hiding with NAT traversal because both
the
processes mangle the Contact header. Topology hiding will not hide the
address and
other information contained in other headers such as the display in the
>From header.
To change the From header, you can use the uac_replace_from() function.

I think our problem comes from the fact that we are using nathelper and
also an rtpproxy in our script.

can anyone provide help about activating topology hiding along with
nathelper ?

thanks in advance.


On Fri, Jan 20, 2017 at 10:14 AM, Alberto Gonzales <
albertosgonz...@gmail.com> wrote:

> I forgot to mention that doing this resulted in opensips crashing after 20
> minutes :)
>
> On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales <
> albertosgonz...@gmail.com> wrote:
>
>> Hello grupo,
>>
>> We have configured topology hiding in opensips 2.2 this way :
>>
>> please confirm to us this is the only thing we need to do or is there
>> anything else that needs to be added.
>>
>> route {
>> 
>> 
>> if (has_totag()) {
>># sequential request withing a dialog should
>># take the path determined by record-routing
>> remplazar : if (loose_route()) {
>>if (topology_hiding_match()) {
>>
>> ...
>> ...
>>   *## esconder topologia antes de pasar la llamada*
>>topology_hiding("UC");
>>route(RELAY);
>> }
>>
>>
>> also what could be a quick test to see if this hiding is working or not.
>>
>> thanks in advance.
>>
>> Alberto
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding in opensips

2017-01-20 Thread Alberto Gonzales
I forgot to mention that doing this resulted in opensips crashing after 20
minutes :)

On Fri, Jan 20, 2017 at 9:56 AM, Alberto Gonzales  wrote:

> Hello grupo,
>
> We have configured topology hiding in opensips 2.2 this way :
>
> please confirm to us this is the only thing we need to do or is there
> anything else that needs to be added.
>
> route {
> 
> 
> if (has_totag()) {
># sequential request withing a dialog should
># take the path determined by record-routing
> remplazar : if (loose_route()) {
>if (topology_hiding_match()) {
>
> ...
> ...
>   *## esconder topologia antes de pasar la llamada*
>topology_hiding("UC");
>route(RELAY);
> }
>
>
> also what could be a quick test to see if this hiding is working or not.
>
> thanks in advance.
>
> Alberto
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] topology hiding in opensips

2017-01-20 Thread Alberto Gonzales
Hello grupo,

We have configured topology hiding in opensips 2.2 this way :

please confirm to us this is the only thing we need to do or is there
anything else that needs to be added.

route {


if (has_totag()) {
   # sequential request withing a dialog should
   # take the path determined by record-routing
    remplazar : if (loose_route()) {
   if (topology_hiding_match()) {

...
...
  *## esconder topologia antes de pasar la llamada*
   topology_hiding("UC");
   route(RELAY);
}


also what could be a quick test to see if this hiding is working or not.

thanks in advance.

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


Re: [OpenSIPS-Users] Topology hiding and Route header

2017-01-06 Thread Adrien Martin
Hello,

Thank you for the clarification, yes it was about a pre-loaded Route header.

Regards,
-- 
Adrien Martin

On 06/01/2017 14:01, Răzvan Crainea wrote:
> Hi, Adrien!
> 
> If you are talking about a pre-loaded Route header (received from the client) 
> for an initial INVITE, then the topology_hiding() module does not remove it 
> and you have to remove it yourself.
> 
> Best regards,
> 
> Răzvan Crainea
> OpenSIPS Solutions
> www.opensips-solutions.com
> 
> On 01/06/2017 02:44 PM, Adrien Martin wrote:
>> Hello,
>>
>> I'm using the module topology_hiding with Opensips 2.2 but I'm not sure to 
>> understand properly the documentation.
>>
>> Is the header Route supposed to be removed ? (No problem removing and 
>> restoring Record-Route)
>> In my tests Route header was not removed unless I added remove_hf("Route") 
>> after topology_hiding.
>>
>> Regards,
>>
>>
>> ___
>> 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
> 



signature.asc
Description: OpenPGP digital signature
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Topology hiding and Route header

2017-01-06 Thread Răzvan Crainea

Hi, Adrien!

If you are talking about a pre-loaded Route header (received from the 
client) for an initial INVITE, then the topology_hiding() module does 
not remove it and you have to remove it yourself.


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/06/2017 02:44 PM, Adrien Martin wrote:

Hello,

I'm using the module topology_hiding with Opensips 2.2 but I'm not sure to 
understand properly the documentation.

Is the header Route supposed to be removed ? (No problem removing and restoring 
Record-Route)
In my tests Route header was not removed unless I added remove_hf("Route") 
after topology_hiding.

Regards,


___
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] Topology hiding and Route header

2017-01-06 Thread Adrien Martin
Hello,

I'm using the module topology_hiding with Opensips 2.2 but I'm not sure to 
understand properly the documentation.

Is the header Route supposed to be removed ? (No problem removing and restoring 
Record-Route)
In my tests Route header was not removed unless I added remove_hf("Route") 
after topology_hiding.

Regards,
-- 
Adrien Martin



signature.asc
Description: OpenPGP digital signature
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Topology Hiding module Call_ID encryption

2016-09-01 Thread Bogdan-Andrei Iancu

Hi Adrian,

After some digging I found that the issue was fixed in March 2016 :
https://github.com/OpenSIPS/opensips/commit/dc229a1ac6312cba9db75e49bc09b931a549375f

So, update your 2.1 to the latest minor release (or git code) and it 
should be fine :)


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.08.2016 21:36, Adrian Fretwell wrote:


Hi Bogdan,

Yes it happens every time the encrypted Call-ID ends up with an equals 
sign, but I have worked around it with a transformation that so far 
has not failed:


$(TH_callee_callid{re.subst,/=/-/g})

Kind regards,

Adrian Fretwell

On 07/08/16 18:50, Bogdan-Andrei Iancu wrote:

Hi Adrian,

The code (for the $TH_callee_callid variable) should convert the 
internal '=' into '-', but it looks like it fails. Is this happening 
all the time for you ? (I'm just looking for an easy way to reproduce).


Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 05.08.2016 18:14, Adrian Fretwell wrote:


Hello, may I ask for a little help?

Using Topology Hiding Module in Opensips 2.1.2.  I'm finding that 
looking at a tcpdump the Call_ID looks like this:


LTXCH01_c1FNUVlRXkNvaA--

But when I log $TH_callee_callid "xlog("L_INFO", "sequential: Callee 
side callid is $TH_callee_callid");" the Call_ID looks like this:


LTXCH01_c1FNUVlRXkNvaA==

Notice the dashes are replaced with equals signs.

If I rewrite the Call-ID for NOTIFY messages with the value of 
$TH_callee_callid the tcpdump will show the Call-ID with the equals 
signs (==) not the dashes


if (is_method("NOTIFY")) {
if( !remove_hf("Call-ID")) {
sl_send_reply("503", "Service Unavailable");
xlog("L_INFO", "sequential: could not remove header");
exit;
}
append_hf("Call-ID: $TH_callee_callid\r\n", "To");
}

Could this be a bug or am I doing something silly?

Kind regards,

Adrian Fretwell


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






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


Re: [OpenSIPS-Users] Topology Hiding module Call_ID encryption

2016-08-07 Thread Bogdan-Andrei Iancu

Hi Adrian,

The code (for the $TH_callee_callid variable) should convert the 
internal '=' into '-', but it looks like it fails. Is this happening all 
the time for you ? (I'm just looking for an easy way to reproduce).


Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 05.08.2016 18:14, Adrian Fretwell wrote:


Hello, may I ask for a little help?

Using Topology Hiding Module in Opensips 2.1.2.  I'm finding that 
looking at a tcpdump the Call_ID looks like this:


LTXCH01_c1FNUVlRXkNvaA--

But when I log $TH_callee_callid "xlog("L_INFO", "sequential: Callee 
side callid is $TH_callee_callid");" the Call_ID looks like this:


LTXCH01_c1FNUVlRXkNvaA==

Notice the dashes are replaced with equals signs.

If I rewrite the Call-ID for NOTIFY messages with the value of 
$TH_callee_callid the tcpdump will show the Call-ID with the equals 
signs (==) not the dashes


if (is_method("NOTIFY")) {
if( !remove_hf("Call-ID")) {
sl_send_reply("503", "Service Unavailable");
xlog("L_INFO", "sequential: could not remove header");
exit;
}
append_hf("Call-ID: $TH_callee_callid\r\n", "To");
}

Could this be a bug or am I doing something silly?

Kind regards,

Adrian Fretwell


___
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] Topology Hiding module Call_ID encryption

2016-08-05 Thread Adrian Fretwell

Hello, may I ask for a little help?

Using Topology Hiding Module in Opensips 2.1.2. I'm finding that looking 
at a tcpdump the Call_ID looks like this:


LTXCH01_c1FNUVlRXkNvaA--

But when I log $TH_callee_callid "xlog("L_INFO", "sequential: Callee 
side callid is $TH_callee_callid");" the Call_ID looks like this:


LTXCH01_c1FNUVlRXkNvaA==

Notice the dashes are replaced with equals signs.

If I rewrite the Call-ID for NOTIFY messages with the value of 
$TH_callee_callid the tcpdump will show the Call-ID with the equals 
signs (==) not the dashes


if (is_method("NOTIFY")) {
if( !remove_hf("Call-ID")) {
sl_send_reply("503", "Service Unavailable");
xlog("L_INFO", "sequential: could not remove header");
exit;
}
append_hf("Call-ID: $TH_callee_callid\r\n", "To");
}

Could this be a bug or am I doing something silly?

Kind regards,

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


Re: [OpenSIPS-Users] Topology Hiding Feature request

2016-05-19 Thread Bogdan-Andrei Iancu

Thanks!

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 19.05.2016 11:57, Pete Kelly wrote:

https://github.com/OpenSIPS/opensips/issues/880

On 18 May 2016 at 18:09, Bogdan-Andrei Iancu > wrote:


Hi Pete,

This is the second time in ~ 1 week when someone asks for this
feature ( callID change without TH ) :)..

Please open feature request issues on the GITHUB tracker.

Thanks and regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 18.05.2016 11:00, Pete Kelly wrote:

In the topology hiding module it is possible to ask OpenSIPS to
also modify the Call-ID in addition to hiding the topology.

Would it be possible to allow OpenSIPS to *only* modify the
Call-ID (and not replace the topology).

Also whilst I am asking lots of questions, is it possible to make
the Call-ID modification work without dialog support? It seems
there is already a prefix appended to the modified Call-ID, and
also an internal hash stored in order to be able to reverse any
modification - so it seems feasible it could be done on the fly
with no dialog.

Pete


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





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


Re: [OpenSIPS-Users] Topology Hiding Feature request

2016-05-19 Thread Pete Kelly
https://github.com/OpenSIPS/opensips/issues/880

On 18 May 2016 at 18:09, Bogdan-Andrei Iancu  wrote:

> Hi Pete,
>
> This is the second time in ~ 1 week when someone asks for this feature (
> callID change without TH ) :)..
>
> Please open feature request issues on the GITHUB tracker.
>
> Thanks and regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 18.05.2016 11:00, Pete Kelly wrote:
>
> In the topology hiding module it is possible to ask OpenSIPS to also
> modify the Call-ID in addition to hiding the topology.
>
> Would it be possible to allow OpenSIPS to *only* modify the Call-ID (and
> not replace the topology).
>
> Also whilst I am asking lots of questions, is it possible to make the
> Call-ID modification work without dialog support? It seems there is already
> a prefix appended to the modified Call-ID, and also an internal hash stored
> in order to be able to reverse any modification - so it seems feasible it
> could be done on the fly with no dialog.
>
> Pete
>
>
> ___
> 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] topology hiding documentation clarification

2016-05-19 Thread Pete Kelly
Yes - exactly that. If force dialog is not set on the module, then the flag
"C" has no effect

On 18 May 2016 at 18:06, Bogdan-Andrei Iancu  wrote:

> Pete,
>
> you mean you do topology_hiding("C") without a prior create_dialog() ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 18.05.2016 10:56, Pete Kelly wrote:
>
> Hi
>
> It seems the ability to modify Call-ID on topology hiding is limited to
> dialog based topology hiding only. With no dialog topology_hiding("C") will
> silently fail to modify the Call-ID header.
>
> Is it possible to update the documentation to mention this, I spent a few
> hours working it all out yesterday, it could help others who are also
> looking at this solution.
>
> Thanks
> Pete
>
>
> ___
> 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] Topology Hiding Feature request

2016-05-18 Thread Bogdan-Andrei Iancu

Hi Pete,

This is the second time in ~ 1 week when someone asks for this feature ( 
callID change without TH ) :)..


Please open feature request issues on the GITHUB tracker.

Thanks and regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 18.05.2016 11:00, Pete Kelly wrote:
In the topology hiding module it is possible to ask OpenSIPS to also 
modify the Call-ID in addition to hiding the topology.


Would it be possible to allow OpenSIPS to *only* modify the Call-ID 
(and not replace the topology).


Also whilst I am asking lots of questions, is it possible to make the 
Call-ID modification work without dialog support? It seems there is 
already a prefix appended to the modified Call-ID, and also an 
internal hash stored in order to be able to reverse any modification - 
so it seems feasible it could be done on the fly with no dialog.


Pete


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


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


Re: [OpenSIPS-Users] topology hiding documentation clarification

2016-05-18 Thread Bogdan-Andrei Iancu

Pete,

you mean you do topology_hiding("C") without a prior create_dialog() ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 18.05.2016 10:56, Pete Kelly wrote:

Hi

It seems the ability to modify Call-ID on topology hiding is limited 
to dialog based topology hiding only. With no dialog 
topology_hiding("C") will silently fail to modify the Call-ID header.


Is it possible to update the documentation to mention this, I spent a 
few hours working it all out yesterday, it could help others who are 
also looking at this solution.


Thanks
Pete


___
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] Topology Hiding Feature request

2016-05-18 Thread Pete Kelly
In the topology hiding module it is possible to ask OpenSIPS to also modify
the Call-ID in addition to hiding the topology.

Would it be possible to allow OpenSIPS to *only* modify the Call-ID (and
not replace the topology).

Also whilst I am asking lots of questions, is it possible to make the
Call-ID modification work without dialog support? It seems there is already
a prefix appended to the modified Call-ID, and also an internal hash stored
in order to be able to reverse any modification - so it seems feasible it
could be done on the fly with no dialog.

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


[OpenSIPS-Users] topology hiding documentation clarification

2016-05-18 Thread Pete Kelly
Hi

It seems the ability to modify Call-ID on topology hiding is limited to
dialog based topology hiding only. With no dialog topology_hiding("C") will
silently fail to modify the Call-ID header.

Is it possible to update the documentation to mention this, I spent a few
hours working it all out yesterday, it could help others who are also
looking at this solution.

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


Re: [OpenSIPS-Users] Topology Hiding Usage Question

2016-02-12 Thread Nathaniel L. Keeling III

Bogdan,

Thanks for explaining the purpose. I am still trying to understand the 
actual purposes and difference between SIP trunks, gateways and proxies 
and their usages. I was watching the video on Opensips as an Edge Proxy 
and was trying to implement the solution with topology hiding. I was 
also wondering, what kind of functions would the Core Engine perform 
that is not done in the edge proxy?


Thanks

Nathaniel

On 2/11/16 3:43 AM, Bogdan-Andrei Iancu wrote:

Hi Nathaniel,

When you do topology hiding, from SIP routing perspective, OpenSIPS 
will act as an end-point and not as a proxy. So, if you do TH, makes 
no sense to do record_route and loose_route and they are specific to 
proxy routing.

So,
1) no
2) what you mean "hide" ? to be replied from opensips ? you can do 
that if you are sure you do not break any end-2-end communication
3) where you put it in the script is up to you - just be sure that 
topology_hiding() function must be called only for initial INVITE 
requests.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 11.02.2016 09:13, Nathaniel L. Keeling III wrote:

Hello,

I am implementing the topology_hiding module and had a couple of 
questions. After reading the tutorial on topology hiding. it states 
that you use the topology_hiding_match() function to check for 
topology hiding. In the tutorial, this function is performed after 
performing the has_totag() check and that one exist. Normally, at 
least from a generated script, the loose_route() check is performed.


1. Do we still need to perform the loose_route() check if we are 
performing the topology_hiding_match() check?
2. If you are using the dialog module, can it hide requests that are 
not in a dialogs?
3. Would it be ok to execute topology_hiding() function within the 
route(RELAY) or should it be done else where? I am using a generated 
script as my base.


Thanks

Nathaniel Keeling

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








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


Re: [OpenSIPS-Users] Topology Hiding Usage Question

2016-02-12 Thread Bogdan-Andrei Iancu

Hi Nathaniel,

The actual routing between end point (user, gateways, etc) ? Typically 
an Edge Server is dealing with low level jobs, like network or security 
level. But it is not so smart to actually implement the service logic -> 
that's done by Core Servers.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 12.02.2016 11:07, Nathaniel L. Keeling III wrote:

Bogdan,

Thanks for explaining the purpose. I am still trying to understand the 
actual purposes and difference between SIP trunks, gateways and 
proxies and their usages. I was watching the video on Opensips as an 
Edge Proxy and was trying to implement the solution with topology 
hiding. I was also wondering, what kind of functions would the Core 
Engine perform that is not done in the edge proxy?


Thanks

Nathaniel

On 2/11/16 3:43 AM, Bogdan-Andrei Iancu wrote:

Hi Nathaniel,

When you do topology hiding, from SIP routing perspective, OpenSIPS 
will act as an end-point and not as a proxy. So, if you do TH, makes 
no sense to do record_route and loose_route and they are specific to 
proxy routing.

So,
1) no
2) what you mean "hide" ? to be replied from opensips ? you can do 
that if you are sure you do not break any end-2-end communication
3) where you put it in the script is up to you - just be sure that 
topology_hiding() function must be called only for initial INVITE 
requests.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 11.02.2016 09:13, Nathaniel L. Keeling III wrote:

Hello,

I am implementing the topology_hiding module and had a couple of 
questions. After reading the tutorial on topology hiding. it states 
that you use the topology_hiding_match() function to check for 
topology hiding. In the tutorial, this function is performed after 
performing the has_totag() check and that one exist. Normally, at 
least from a generated script, the loose_route() check is performed.


1. Do we still need to perform the loose_route() check if we are 
performing the topology_hiding_match() check?
2. If you are using the dialog module, can it hide requests that are 
not in a dialogs?
3. Would it be ok to execute topology_hiding() function within the 
route(RELAY) or should it be done else where? I am using a generated 
script as my base.


Thanks

Nathaniel Keeling

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








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




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


Re: [OpenSIPS-Users] Topology Hiding Usage Question

2016-02-11 Thread Bogdan-Andrei Iancu

Hi Nathaniel,

When you do topology hiding, from SIP routing perspective, OpenSIPS will 
act as an end-point and not as a proxy. So, if you do TH, makes no sense 
to do record_route and loose_route and they are specific to proxy routing.

So,
1) no
2) what you mean "hide" ? to be replied from opensips ? you can do that 
if you are sure you do not break any end-2-end communication
3) where you put it in the script is up to you - just be sure that 
topology_hiding() function must be called only for initial INVITE requests.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 11.02.2016 09:13, Nathaniel L. Keeling III wrote:

Hello,

I am implementing the topology_hiding module and had a couple of 
questions. After reading the tutorial on topology hiding. it states 
that you use the topology_hiding_match() function to check for 
topology hiding. In the tutorial, this function is performed after 
performing the has_totag() check and that one exist. Normally, at 
least from a generated script, the loose_route() check is performed.


1. Do we still need to perform the loose_route() check if we are 
performing the topology_hiding_match() check?
2. If you are using the dialog module, can it hide requests that are 
not in a dialogs?
3. Would it be ok to execute topology_hiding() function within the 
route(RELAY) or should it be done else where? I am using a generated 
script as my base.


Thanks

Nathaniel Keeling

___
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] Topology Hiding Usage Question

2016-02-10 Thread Nathaniel L. Keeling III

Hello,

I am implementing the topology_hiding module and had a couple of 
questions. After reading the tutorial on topology hiding. it states that 
you use the topology_hiding_match() function to check for topology 
hiding. In the tutorial, this function is performed after performing the 
has_totag() check and that one exist. Normally, at least from a 
generated script, the loose_route() check is performed.


1. Do we still need to perform the loose_route() check if we are 
performing the topology_hiding_match() check?
2. If you are using the dialog module, can it hide requests that are not 
in a dialogs?
3. Would it be ok to execute topology_hiding() function within the 
route(RELAY) or should it be done else where? I am using a generated 
script as my base.


Thanks

Nathaniel Keeling

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


Re: [OpenSIPS-Users] topology hiding not accepting BYE before 200 OK

2015-10-06 Thread Stuart Marsden
Hi

it was legacy application logic for legacy phones causing the issue

Topology hiding on 2.1 working well now ( we have jumped from opensips 1.6 .3 - 
just with mods to our own custom module)

thanks guys

Stuart


> On 5 Oct 2015, at 22:22, users-requ...@lists.opensips.org wrote:
> 
> Send Users mailing list submissions to
>   users@lists.opensips.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> or, via email, send a message with subject or body 'help' to
>   users-requ...@lists.opensips.org
> 
> You can reach the person managing the list at
>   users-ow...@lists.opensips.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Users digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Message Compression Feedback (Ionut Ionita)
>   2. Re: topology hiding not accepting BYE before 200 OK
>  (Stuart Marsden)
>   3. 500 command 'dr_gw_status' failed (Aqs Younas)
>   4. Does someone has embedded OpenSIPS 2.2 in an ARM system?
>  (Rodrigo Pimenta Carvalho)
> 
> 
> --
> 
> Message: 1
> Date: Mon, 05 Oct 2015 16:39:54 +0300
> From: Ionut Ionita <ionution...@opensips.org>
> Subject: Re: [OpenSIPS-Users] Message Compression Feedback
> To: sevpal <sev...@aol.com>,  OpenSIPS users mailling list
>   <users@lists.opensips.org>
> Message-ID: <56127daa.8060...@opensips.org>
> Content-Type: text/plain; charset=windows-1252; format=flowed
> 
> 
> Hi sevpal,
> 
> First of all, thank you for your feedback. Tried to solve the 
> issues with [0]. In the future,
> please open an issue on [1] for issues like this one.
> 
> Regards,
> Ionut Ionita
> 
> [0] 
> https://github.com/OpenSIPS/opensips/commit/db25690d3b810bba9ecb1174a6a1ec4af7b9651f
> [1] https://github.com/opensips/opensips/issues
> 
> On 02.10.2015 18:14, sevpal wrote:
>> Hi, in testing the compression module, these below messages appear in 
>> the log when using mc_compress(?1?,bhs,). However, it works 
>> (compress/decompress) when the second param is ?bhe?.
>> ERROR:compression:check_zlib_rc: not enough room in output buffer
>> ERROR:compression:mc_compress_cb: Compression failed
>> ERROR:compression:wrap_tm_func: compression failed
>> ERROR:compression:check_zlib_rc: not enough room in output buffer
>> ERROR:compression:mc_compress_cb: Compression failed
>> ERROR:compression:wrap_msg_func: compression failed. Probably not 
>> requested message
>> ERROR:core:run_raw_processing_cb: failed to run callback
>> When using mc_compress(?0?,bhs,) there is no error message, but on the 
>> receiving proxy this error is displayed.
>> ERROR:compression:check_zlib_rc: input data incomplete or corrupted
>> ERROR:compression:mc_decompress: decompression failed
>> 
>> 
>> _______
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> 
> 
> --
> 
> Message: 2
> Date: Mon, 5 Oct 2015 17:50:11 +0100
> From: Stuart Marsden <stu...@myphones.com>
> Subject: Re: [OpenSIPS-Users] topology hiding not accepting BYE before
>   200 OK
> To: users@lists.opensips.org
> Message-ID: <3fd56467-eebc-4170-904b-c0173ed5a...@myphones.com>
> Content-Type: text/plain; charset=utf-8
> 
> 
>> On 5 Oct 2015, at 17:47, Stuart Marsden <drsmars...@me.com> wrote:
>> 
>> Our actual case is 
>> 
>> phone A-> opensips -> our  soft switch -> same opensips -> phone B
>> 
>> INVITE ?> 
>> > 200  ??? > 
>> > 
>>  
>> > BYE  483
>> 200 ??? >
>> 
>> this only happens when both phones send a BYE at the same time
>> 
>> Opensips cannot process the 2nd BYE the 2nd time it sees it
>> 
>> so has been impossible to reproduce in the lab
>> 
>> wireshark sent via email
>> 
>> thanks
>> 
>> Stuart
>> 
>> 
>> 
>>> On 5 Oct 2015, at 13:46, users-requ...@lists.opensips.org wrote:
>>> 
>>> Send Users mailing list submissions to
>>> users@lists.opensips.org
>>> 
>>> To subscribe or unsubscribe via the World Wide Web, visit
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>> or, via email, send a message with subject or 

[OpenSIPS-Users] topology hiding not accepting BYE before 200 OK

2015-10-05 Thread Stuart Marsden

Hi

we are experimenting with topology hiding on 2.1

I think we see the same issue once a call is set up  if UAC and UAS both send 
BYE  at  “the same time”

we cannot reproduce at will because of the small timing window required to 
receive the 2 BYEs

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


Re: [OpenSIPS-Users] topology hiding not accepting BYE before 200 OK

2015-10-05 Thread Vlad Paiu

Hello Stuard,

What is the full SIP scenario for this ? The callee cannot send a BYE 
before the 200OK is sent ( from SIP point of view ). Can you please post 
a SIP trace for this ? A full debug OpenSIPS log would also help.


Regards,

Vlad Paiu
OpenSIPS Developer

On 05.10.2015 11:46, Stuart Marsden wrote:

Hi

we are experimenting with topology hiding on 2.1

I think we see the same issue once a call is set up  if UAC and UAS both send 
BYE  at  “the same time”

we cannot reproduce at will because of the small timing window required to 
receive the 2 BYEs

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



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


Re: [OpenSIPS-Users] topology hiding not accepting BYE before 200 OK

2015-10-05 Thread Stuart Marsden

> On 5 Oct 2015, at 17:47, Stuart Marsden <drsmars...@me.com> wrote:
> 
> Our actual case is 
> 
> phone A-> opensips -> our  soft switch -> same opensips -> phone B
> 
> INVITE —> 
> <—RINGING
> 200  ——— > 
> <— ACK
> 
>   
> <— BYE
> BYE  483
> 200 ——— >
> 
> this only happens when both phones send a BYE at the same time
> 
> Opensips cannot process the 2nd BYE the 2nd time it sees it
> 
> so has been impossible to reproduce in the lab
> 
> wireshark sent via email
> 
> thanks
> 
> Stuart
> 
> 
> 
>> On 5 Oct 2015, at 13:46, users-requ...@lists.opensips.org wrote:
>> 
>> Send Users mailing list submissions to
>>  users@lists.opensips.org
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>>  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> or, via email, send a message with subject or body 'help' to
>>  users-requ...@lists.opensips.org
>> 
>> You can reach the person managing the list at
>>  users-ow...@lists.opensips.org
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Users digest..."
>> 
>> 
>> Today's Topics:
>> 
>> 1. Re: topology hiding not accepting BYE before 200 OK (Vlad Paiu)
>> 2. Regarding chachedb_mongdb use . (Sasmita Panda)
>> 3. Re: Regarding chachedb_mongdb use . (Vlad Paiu)
>> 4. Re: Regarding chachedb_mongdb use . (Sasmita Panda)
>> 
>> 
>> --
>> 
>> Message: 1
>> Date: Mon, 05 Oct 2015 14:51:47 +0300
>> From: Vlad Paiu <vladp...@opensips.org>
>> Subject: Re: [OpenSIPS-Users] topology hiding not accepting BYE before
>>  200 OK
>> To: users@lists.opensips.org
>> Message-ID: <56126453.2050...@opensips.org>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>> 
>> Hello Stuard,
>> 
>> What is the full SIP scenario for this ? The callee cannot send a BYE 
>> before the 200OK is sent ( from SIP point of view ). Can you please post 
>> a SIP trace for this ? A full debug OpenSIPS log would also help.
>> 
>> Regards,
>> 
>> Vlad Paiu
>> OpenSIPS Developer
>> 
>> On 05.10.2015 11:46, Stuart Marsden wrote:
>>> Hi
>>> 
>>> we are experimenting with topology hiding on 2.1
>>> 
>>> I think we see the same issue once a call is set up  if UAC and UAS both 
>>> send BYE  at  ?the same time?
>>> 
>>> we cannot reproduce at will because of the small timing window required to 
>>> receive the 2 BYEs
>>> 
>>> Stuart
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>> 
>> 
>> 
>> --
>> 
>> Message: 2
>> Date: Mon, 5 Oct 2015 17:28:51 +0530
>> From: Sasmita Panda <spa...@3clogic.com>
>> Subject: [OpenSIPS-Users] Regarding chachedb_mongdb use .
>> To: OpenSIPS users mailling list <users@lists.opensips.org>
>> Message-ID:
>>  

Re: [OpenSIPS-Users] Topology Hiding / 302

2015-09-28 Thread Bogdan-Andrei Iancu

That is true Pete,

Could you open a bug report on the GITHUB tracker please ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 28.09.2015 14:27, Pete Kelly wrote:



On 28 September 2015 at 12:23, Bogdan-Andrei Iancu 
> wrote:


Hi Pete,

You mean that ideally the username part of Contact URI should be
preserve through TH ?


Yes, and also the domain, which would need to be preserved if the UAS 
wanted to 302 to a completely different URI?



Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 23.09.2015 11:40, Pete Kelly wrote:

This is something I have noticed for a while now and came across
it again the other day.

Basically if you are using topology hiding and the UAS sends a
302, the data (new $ru) in the Contact header is not persisted to
the UAC, meaning topology hiding is not valid in a scenario where
a 302 may be found.

Is there a known way to get round this currently (am I missing
something in the docs!)


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





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


Re: [OpenSIPS-Users] Topology Hiding / 302

2015-09-28 Thread Bogdan-Andrei Iancu

Hi Pete,

You mean that ideally the username part of Contact URI should be 
preserve through TH ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 23.09.2015 11:40, Pete Kelly wrote:
This is something I have noticed for a while now and came across it 
again the other day.


Basically if you are using topology hiding and the UAS sends a 302, 
the data (new $ru) in the Contact header is not persisted to the UAC, 
meaning topology hiding is not valid in a scenario where a 302 may be 
found.


Is there a known way to get round this currently (am I missing 
something in the docs!)



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


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


Re: [OpenSIPS-Users] Topology Hiding / 302

2015-09-28 Thread Pete Kelly
On 28 September 2015 at 12:23, Bogdan-Andrei Iancu 
wrote:

> Hi Pete,
>
> You mean that ideally the username part of Contact URI should be preserve
> through TH ?
>

Yes, and also the domain, which would need to be preserved if the UAS
wanted to 302 to a completely different URI?


>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 23.09.2015 11:40, Pete Kelly wrote:
>
> This is something I have noticed for a while now and came across it again
> the other day.
>
> Basically if you are using topology hiding and the UAS sends a 302, the
> data (new $ru) in the Contact header is not persisted to the UAC, meaning
> topology hiding is not valid in a scenario where a 302 may be found.
>
> Is there a known way to get round this currently (am I missing something
> in the docs!)
>
>
> ___
> 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] Topology Hiding / 302

2015-09-28 Thread Pete Kelly
Done https://github.com/OpenSIPS/opensips/issues/656

On 28 September 2015 at 12:32, Bogdan-Andrei Iancu 
wrote:

> That is true Pete,
>
> Could you open a bug report on the GITHUB tracker please ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 28.09.2015 14:27, Pete Kelly wrote:
>
>
>
> On 28 September 2015 at 12:23, Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Pete,
>>
>> You mean that ideally the username part of Contact URI should be preserve
>> through TH ?
>>
>
> Yes, and also the domain, which would need to be preserved if the UAS
> wanted to 302 to a completely different URI?
>
>
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 23.09.2015 11:40, Pete Kelly wrote:
>>
>> This is something I have noticed for a while now and came across it again
>> the other day.
>>
>> Basically if you are using topology hiding and the UAS sends a 302, the
>> data (new $ru) in the Contact header is not persisted to the UAC, meaning
>> topology hiding is not valid in a scenario where a 302 may be found.
>>
>> Is there a known way to get round this currently (am I missing something
>> in the docs!)
>>
>>
>> ___
>> 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] Topology Hiding / 302

2015-09-28 Thread Bogdan-Andrei Iancu

OK, thank you !

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 28.09.2015 14:58, Pete Kelly wrote:

Done https://github.com/OpenSIPS/opensips/issues/656

On 28 September 2015 at 12:32, Bogdan-Andrei Iancu 
> wrote:


That is true Pete,

Could you open a bug report on the GITHUB tracker please ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 28.09.2015 14:27, Pete Kelly wrote:



On 28 September 2015 at 12:23, Bogdan-Andrei Iancu
> wrote:

Hi Pete,

You mean that ideally the username part of Contact URI should
be preserve through TH ?


Yes, and also the domain, which would need to be preserved if the
UAS wanted to 302 to a completely different URI?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 23.09.2015 11:40, Pete Kelly wrote:

This is something I have noticed for a while now and came
across it again the other day.

Basically if you are using topology hiding and the UAS sends
a 302, the data (new $ru) in the Contact header is not
persisted to the UAC, meaning topology hiding is not valid
in a scenario where a 302 may be found.

Is there a known way to get round this currently (am I
missing something in the docs!)


___
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] Topology Hiding / 302

2015-09-23 Thread Pete Kelly
This is something I have noticed for a while now and came across it again
the other day.

Basically if you are using topology hiding and the UAS sends a 302, the
data (new $ru) in the Contact header is not persisted to the UAC, meaning
topology hiding is not valid in a scenario where a 302 may be found.

Is there a known way to get round this currently (am I missing something in
the docs!)
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding not accepting BYE before 200 OK

2015-07-27 Thread Trevor Steyn
Hi Anyone have any ideas on the below issue?

On 23/07/2015 17:12, Trevor Steyn wrote:
 Hi Guys,

 I seem to be having some trouble with the new topology_hiding module in
 opensips 2.1

 here is the call scenario

 UAC -- Opensips -- UAS

 UAC Sends Invite to UAS with topology hiding module
 UAS sends 180 with to-tag
 UAC sends BYE

 When the Bye is sent opensips loops the call till max forwards is reached

 from what i can see from the debugs the  Bye from UAC is accepted and
 matches the topology_hiding_match function but does not rewrite the
 destination IP so when the message passes t_relay() its sending the Bye
 to Itself from Itself.

 I have tried this without topology hiding and the BYE is relayed as it
 should
 .

 My route looks as follows


 route{
 script_trace( 3, $rm from $si, ruri=$ru, me);

 if (!mf_process_maxfwd_header(10)) {
 sl_send_reply(483,Too Many Hops);
 exit;
 }

 if ( check_source_address(1,$avp(trunk_attrs)) ) {
 # request comes from trunks
 setflag(IS_TRUNK);
 } else if ( is_from_gw() ) {
 # request comes from GWs
 } else {
 #send_reply(403,Forbidden);
 xlog(Message is not from Trunk or GW $si);
 #exit;
 }

 if (has_totag()) {
 # sequential request withing a dialog should
 # take the path determined by record-routing
 #if (loose_route()) {
 if(topology_hiding_match()) {

 # validate the sequential request against dialog
 if ( $DLG_status!=NULL  !validate_dialog() ) {
 xlog(In-Dialog $rm from $si (callid=$ci) is not valid
 according to dialog\n);
 ## exit;
 }

 if (is_method(BYE)) {
 setflag(ACC_DO); # do accounting ...
 setflag(ACC_FAILED); # ... even if the transaction fails
 } else if (is_method(INVITE)) {
 # even if in most of the cases is useless, do RR for
 # re-INVITEs alos, as some buggy clients do change route set
 # during the dialog.
 record_route();
 }

 # lets handle re-invites and offer proxy
 if (has_body(application/sdp))  {
 # Begin rtp session update gyrations
 if (method == INVITE) {
 # INVITE w/ SDP, so early neg
 # This is offer, reply is answer
 rtpproxy_offer(iewlz20);
 t_on_reply(1);
 } else if (method == ACK) {
 # ACK w/ SDP, so late neg (done now)
 # This is answer
 rtpproxy_answer(iewlz20);
 }
 }


 # route it out to whatever destination was set by loose_route()
 # in $du (destination URI).
 route(RELAY);
 } else {
 if ( is_method(ACK) ) {
 if ( t_check_trans() ) {
 # non loose-route, but stateful ACK; must be an ACK
 after
 # a 487 or e.g. 404 from upstream server
 t_relay();
 exit;
 } else {
 # ACK without matching transaction -
 # ignore and discard
 exit;
 }
 }
 sl_send_reply(404,Not here);
 }
 exit;
 }

  INITIAL REQUESTS

 if ( !isflagset(IS_TRUNK) ) {
 ## accept new calls only from trunks
 send_reply(403,Not from trunk);
 exit;
 }

 # CANCEL processing
 if (is_method(CANCEL)) {
 if (t_check_trans())
 t_relay();
 exit;
 } else if (!is_method(INVITE)) {
 send_reply(405,Method Not Allowed);
 exit;
 }

 if ($rU==NULL) {
 # request with no Username in RURI
 sl_send_reply(484,Address Incomplete);
 exit;
 }

 t_check_trans();

 # preloaded route checking
 if (loose_route()) {
 xlog(L_ERR,
 Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]);
 if (!is_method(ACK))
 sl_send_reply(403,Preload Route denied);
 exit;
 }

 # record routing
 record_route();

 setflag(ACC_DO); # do accounting



 # create dialog with timeout
 if ( !create_dialog(B) ) {
 send_reply(500,Internal Server Error);
 exit;
 }


 if (is_avp_set($avp(trunk_attrs))  $avp(trunk_attrs)=~^[0-9]+$) {
 get_profile_size(trunkCalls,$si,$var(size));
 if ( $(var(size){s.int}) = $(avp(trunk_attrs){s.int}) ) {
 send_reply(486,Busy Here);
 exit;
 }
 }
 set_dlg_profile(trunkCalls,$si);




 # apply transformations from dialplan table
 dp_translate(0,$rU/$rU);

 # route calls based on prefix
 if ( !do_routing(1) ) {
  

[OpenSIPS-Users] topology hiding not accepting BYE before 200 OK

2015-07-23 Thread Trevor Steyn
Hi Guys,

I seem to be having some trouble with the new topology_hiding module in
opensips 2.1

here is the call scenario

UAC -- Opensips -- UAS

UAC Sends Invite to UAS with topology hiding module
UAS sends 180 with to-tag
UAC sends BYE

When the Bye is sent opensips loops the call till max forwards is reached

from what i can see from the debugs the  Bye from UAC is accepted and
matches the topology_hiding_match function but does not rewrite the
destination IP so when the message passes t_relay() its sending the Bye
to Itself from Itself.

I have tried this without topology hiding and the BYE is relayed as it
should
.

My route looks as follows


route{
script_trace( 3, $rm from $si, ruri=$ru, me);

if (!mf_process_maxfwd_header(10)) {
sl_send_reply(483,Too Many Hops);
exit;
}

if ( check_source_address(1,$avp(trunk_attrs)) ) {
# request comes from trunks
setflag(IS_TRUNK);
} else if ( is_from_gw() ) {
# request comes from GWs
} else {
#send_reply(403,Forbidden);
xlog(Message is not from Trunk or GW $si);
#exit;
}

if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
#if (loose_route()) {
if(topology_hiding_match()) {
   
# validate the sequential request against dialog
if ( $DLG_status!=NULL  !validate_dialog() ) {
xlog(In-Dialog $rm from $si (callid=$ci) is not valid
according to dialog\n);
## exit;
}
   
if (is_method(BYE)) {
setflag(ACC_DO); # do accounting ...
setflag(ACC_FAILED); # ... even if the transaction fails
} else if (is_method(INVITE)) {
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
record_route();
}

# lets handle re-invites and offer proxy
if (has_body(application/sdp))  {
# Begin rtp session update gyrations
if (method == INVITE) {
# INVITE w/ SDP, so early neg
# This is offer, reply is answer
rtpproxy_offer(iewlz20);
t_on_reply(1);
} else if (method == ACK) {
# ACK w/ SDP, so late neg (done now)
# This is answer
rtpproxy_answer(iewlz20);
}
}


# route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(RELAY);
} else {
if ( is_method(ACK) ) {
if ( t_check_trans() ) {
# non loose-route, but stateful ACK; must be an ACK
after
# a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction -
# ignore and discard
exit;
}
}
sl_send_reply(404,Not here);
}
exit;
}

 INITIAL REQUESTS

if ( !isflagset(IS_TRUNK) ) {
## accept new calls only from trunks
send_reply(403,Not from trunk);
exit;
}

# CANCEL processing
if (is_method(CANCEL)) {
if (t_check_trans())
t_relay();
exit;
} else if (!is_method(INVITE)) {
send_reply(405,Method Not Allowed);
exit;
}

if ($rU==NULL) {
# request with no Username in RURI
sl_send_reply(484,Address Incomplete);
exit;
}

t_check_trans();

# preloaded route checking
if (loose_route()) {
xlog(L_ERR,
Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]);
if (!is_method(ACK))
sl_send_reply(403,Preload Route denied);
exit;
}

# record routing
record_route();

setflag(ACC_DO); # do accounting


   
# create dialog with timeout
if ( !create_dialog(B) ) {
send_reply(500,Internal Server Error);
exit;
}

   
if (is_avp_set($avp(trunk_attrs))  $avp(trunk_attrs)=~^[0-9]+$) {
get_profile_size(trunkCalls,$si,$var(size));
if ( $(var(size){s.int}) = $(avp(trunk_attrs){s.int}) ) {
send_reply(486,Busy Here);
exit;
}
}
set_dlg_profile(trunkCalls,$si);
   
   

   
# apply transformations from dialplan table
dp_translate(0,$rU/$rU);

# route calls based on prefix
if ( !do_routing(1) ) {
send_reply(404,No Route found);
exit;
}

t_on_failure(GW_FAILOVER);

if (is_method(INVITE)) {
force_send_socket(udp:XXX.XXX.XXX.XXX:5060);
#rtpproxy_engage('ierz20');

Re: [OpenSIPS-Users] Topology hiding example

2014-08-27 Thread Satish Patel
I'm on same boat, I really want to use topology hiding but it's not working and 
missing BYE because its deleting route: in sip dialogs. 

There is not any good document out there so for now we are going with 
freeswitch. 

Sent from my iPhone

On Aug 26, 2014, at 4:59 AM, Eugene Prokopiev e...@itx.ru wrote:

 Hi,
 
 I have the installed opensips between external public network (where
 client devices are located) and internal private network with
 softswitch. I need to forward all incoming requests frim public
 network to softswitch and forward answers back, but I need to replace
 public addresses in sip/sdp headers for incoming requests and outgoing
 answers and forward rtp packets.
 
 Where can I find full actual example of this scenario?
 
 -- 
 WBR,
 Eugene Prokopiev
 
 ___
 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] Topology hiding example

2014-08-26 Thread Eugene Prokopiev
Hi,

I have the installed opensips between external public network (where
client devices are located) and internal private network with
softswitch. I need to forward all incoming requests frim public
network to softswitch and forward answers back, but I need to replace
public addresses in sip/sdp headers for incoming requests and outgoing
answers and forward rtp packets.

Where can I find full actual example of this scenario?

-- 
WBR,
Eugene Prokopiev

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


Re: [OpenSIPS-Users] topology hiding

2014-02-10 Thread BJ Quinn
Ok so it looks like 1.10 may have been the problem. Things seem to be working 
with the same config on 1.9. I'm still getting that funny /304 in the route 
header, but now I've discovered that it's the software initiating the call that 
is adding that /304 (it only added it when it's in proxy mode, so I didn't see 
it in the other invites generated by this software from before I tried to put 
it behind the opensips proxy). 

So now here's my question. I'd like to simply strip out the /304 from the route 
header that comes from the software initiating the call (I don't think I can 
change that software). But that would require modifying the route header 
manually AND with topology hiding. Is that allowed? Do I do one or the other 
first? 

Thanks! 

-BJ 

- Original Message -

From: BJ Quinn bjqu...@seidal.com 
To: OpenSIPS users mailling list users@lists.opensips.org 
Sent: Saturday, February 8, 2014 12:33:38 PM 
Subject: Re: [OpenSIPS-Users] topology hiding 

According to http://lists.opensips.org/pipermail/users/2013-October/026992.html 
it appears that there's a bug in 1.10 for dialog based topology hiding? Maybe 
that's my problem? 

I'm using the RHEL RPMs for 1.10 stable. Maybe the issue mentioned in that post 
isn't my issue, or maybe the fix has been applied to the 1.10 RPMs? Or maybe I 
should downgrade to 1.9 and try again? 

-BJ 

- Original Message -

From: BJ Quinn bjqu...@seidal.com 
To: OpenSIPS users mailling list users@lists.opensips.org 
Sent: Friday, February 7, 2014 4:37:45 PM 
Subject: Re: [OpenSIPS-Users] topology hiding 

The traffic goes from the server making the call to the opensips proxy to the 
carrier. The /304 doesn't exist in the original invite from the server that 
makes the call. Do you want to see the packets from the calling server to the 
opensips box to the carrier? 

But most importantly, I'm still having trouble getting topology hiding to work. 
I made the change you suggested, but it appears that opensips is throwing away 
all responses it's receiving from the carrier, which means that opensips thinks 
the call never got set up and the invite was never accepted, and then it 
eventually responds 408 to the original calling server. In fact the invite WAS 
accepted, and the carrier sent back a 200 ok, but opensips threw it away and 
never acknowledged it. The outgoing invite from the opensips server looks 
correct -- opensips has modified the route and contact headers to its own IP, 
but obviously it doesn't know what to do with the responses that are coming 
back to it. 

The /304 issue is odd and could be causing us issues with certain carriers, but 
right now I'd like to get topology hiding working with even ONE carrier, and I 
can't do that yet. All I did was add the section you showed in your response -- 

if (loose_route() || match_dialog()) { 
if ($DLG_status==NULL) { 
xlog( cannot match request to a dialog \n); 
# something wrong - might want to drop such requests 
} 

... as a replacement to ... 

if (loose_route()) { 

And I added -- 

if (is_method(INVITE)) { 

topology_hiding(); 
} 

... right after -- 

# account only INVITEs 
if (is_method(INVITE)) { 

setflag(ACC_DO); # do accounting 
} 


All this is from the stock config file, with only my listen IPs and a couple 
aliases added, and obviously the dialog module loaded as well to allow for 
topology hiding. 

Thanks! 

-BJ 

- Original Message -

From: Vlad Paiu vladp...@opensips.org 
To: users@lists.opensips.org 
Sent: Wednesday, February 5, 2014 6:19:41 AM 
Subject: Re: [OpenSIPS-Users] topology hiding 

Hello, 

The sequential processing part is a little bit wrong - you should have 

if (loose_route() || match_dialog()) { 
if ($DLG_status==NULL) { 
xlog( cannot match request to a dialog \n); 
# something wrong - might want to drop such requests 
} 


Can you please also post a trace of the traffic flow when the Route 
header gets that bogus \304 header ? Trying to replicate this on my side 
and see what's wrong. 

Best Regards, 

Vlad Paiu 
OpenSIPS Developer 
http://www.opensips-solutions.com 


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

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


Re: [OpenSIPS-Users] topology hiding

2014-02-08 Thread BJ Quinn
According to http://lists.opensips.org/pipermail/users/2013-October/026992.html 
it appears that there's a bug in 1.10 for dialog based topology hiding? Maybe 
that's my problem? 

I'm using the RHEL RPMs for 1.10 stable. Maybe the issue mentioned in that post 
isn't my issue, or maybe the fix has been applied to the 1.10 RPMs? Or maybe I 
should downgrade to 1.9 and try again? 

-BJ 

- Original Message -

From: BJ Quinn bjqu...@seidal.com 
To: OpenSIPS users mailling list users@lists.opensips.org 
Sent: Friday, February 7, 2014 4:37:45 PM 
Subject: Re: [OpenSIPS-Users] topology hiding 

The traffic goes from the server making the call to the opensips proxy to the 
carrier. The /304 doesn't exist in the original invite from the server that 
makes the call. Do you want to see the packets from the calling server to the 
opensips box to the carrier? 

But most importantly, I'm still having trouble getting topology hiding to work. 
I made the change you suggested, but it appears that opensips is throwing away 
all responses it's receiving from the carrier, which means that opensips thinks 
the call never got set up and the invite was never accepted, and then it 
eventually responds 408 to the original calling server. In fact the invite WAS 
accepted, and the carrier sent back a 200 ok, but opensips threw it away and 
never acknowledged it. The outgoing invite from the opensips server looks 
correct -- opensips has modified the route and contact headers to its own IP, 
but obviously it doesn't know what to do with the responses that are coming 
back to it. 

The /304 issue is odd and could be causing us issues with certain carriers, but 
right now I'd like to get topology hiding working with even ONE carrier, and I 
can't do that yet. All I did was add the section you showed in your response -- 

if (loose_route() || match_dialog()) { 
if ($DLG_status==NULL) { 
xlog( cannot match request to a dialog \n); 
# something wrong - might want to drop such requests 
} 

... as a replacement to ... 

if (loose_route()) { 

And I added -- 

if (is_method(INVITE)) { 

topology_hiding(); 
} 

... right after -- 

# account only INVITEs 
if (is_method(INVITE)) { 

setflag(ACC_DO); # do accounting 
} 


All this is from the stock config file, with only my listen IPs and a couple 
aliases added, and obviously the dialog module loaded as well to allow for 
topology hiding. 

Thanks! 

-BJ 

- Original Message -

From: Vlad Paiu vladp...@opensips.org 
To: users@lists.opensips.org 
Sent: Wednesday, February 5, 2014 6:19:41 AM 
Subject: Re: [OpenSIPS-Users] topology hiding 

Hello, 

The sequential processing part is a little bit wrong - you should have 

if (loose_route() || match_dialog()) { 
if ($DLG_status==NULL) { 
xlog( cannot match request to a dialog \n); 
# something wrong - might want to drop such requests 
} 


Can you please also post a trace of the traffic flow when the Route 
header gets that bogus \304 header ? Trying to replicate this on my side 
and see what's wrong. 

Best Regards, 

Vlad Paiu 
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] topology hiding

2014-02-07 Thread BJ Quinn
The traffic goes from the server making the call to the opensips proxy to the 
carrier. The /304 doesn't exist in the original invite from the server that 
makes the call. Do you want to see the packets from the calling server to the 
opensips box to the carrier? 

But most importantly, I'm still having trouble getting topology hiding to work. 
I made the change you suggested, but it appears that opensips is throwing away 
all responses it's receiving from the carrier, which means that opensips thinks 
the call never got set up and the invite was never accepted, and then it 
eventually responds 408 to the original calling server. In fact the invite WAS 
accepted, and the carrier sent back a 200 ok, but opensips threw it away and 
never acknowledged it. The outgoing invite from the opensips server looks 
correct -- opensips has modified the route and contact headers to its own IP, 
but obviously it doesn't know what to do with the responses that are coming 
back to it. 

The /304 issue is odd and could be causing us issues with certain carriers, but 
right now I'd like to get topology hiding working with even ONE carrier, and I 
can't do that yet. All I did was add the section you showed in your response -- 

if (loose_route() || match_dialog()) { 
if ($DLG_status==NULL) { 
xlog( cannot match request to a dialog \n); 
# something wrong - might want to drop such requests 
} 

... as a replacement to ... 

if (loose_route()) { 

And I added -- 

if (is_method(INVITE)) { 

topology_hiding(); 
} 

... right after -- 

# account only INVITEs 
if (is_method(INVITE)) { 

setflag(ACC_DO); # do accounting 
} 


All this is from the stock config file, with only my listen IPs and a couple 
aliases added, and obviously the dialog module loaded as well to allow for 
topology hiding. 

Thanks! 

-BJ 

- Original Message -

From: Vlad Paiu vladp...@opensips.org 
To: users@lists.opensips.org 
Sent: Wednesday, February 5, 2014 6:19:41 AM 
Subject: Re: [OpenSIPS-Users] topology hiding 

Hello, 

The sequential processing part is a little bit wrong - you should have 

if (loose_route() || match_dialog()) { 
if ($DLG_status==NULL) { 
xlog( cannot match request to a dialog \n); 
# something wrong - might want to drop such requests 
} 


Can you please also post a trace of the traffic flow when the Route 
header gets that bogus \304 header ? Trying to replicate this on my side 
and see what's wrong. 

Best Regards, 

Vlad Paiu 
OpenSIPS Developer 
http://www.opensips-solutions.com 

On 03.02.2014 20:36, BJ Quinn wrote: 
 Oh and the only manual manipulation of the route headers was an attempt to 
 get rid of that \304 in the header. 
 
 I think the \304 thing may be a red herring for now. I still can't get the 
 topology hiding to work. Below is my config file. It's literally the default 
 config file with nothing changed but I've put in my IP address on the listen 
 line, added a couple of aliases, added UAC module to try to change the from 
 header (that works) and the dialog module and a couple of modifications to 
 the route to make topology hiding work (not working for me). 
 
 Am I putting this in the wrong part of the route? 
 
 Thx 
 
 -BJ Quinn 
 
 --- 
 debug=3 
 log_stderror=no 
 log_facility=LOG_LOCAL0 
 
 fork=yes 
 children=4 
 
 auto_aliases=no 
 
 listen=udp:xx.xx.xx.9:5060 
 
 disable_tcp=yes 
 
 disable_tls=yes 
 
 alias=xx.xx.xx.76:5060 
 alias=xx.xx.xx.77:5060 
 
 mpath=/usr/lib64/opensips/modules 
 
 loadmodule signaling.so 
 
 loadmodule sl.so 
 
 loadmodule tm.so 
 modparam(tm, fr_timer, 5) 
 modparam(tm, fr_inv_timer, 30) 
 modparam(tm, restart_fr_on_each_reply, 0) 
 modparam(tm, onreply_avp_mode, 1) 
 
 loadmodule rr.so 
 modparam(rr, append_fromtag, 0) 
 
 loadmodule maxfwd.so 
 
 loadmodule sipmsgops.so 
 
 loadmodule mi_fifo.so 
 modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) 
 modparam(mi_fifo, fifo_mode, 0666) 
 
 loadmodule uri.so 
 modparam(uri, use_uri_table, 0) 
 
 loadmodule usrloc.so 
 modparam(usrloc, nat_bflag, NAT) 
 modparam(usrloc, db_mode, 0) 
 
 loadmodule registrar.so 
 modparam(registrar, tcp_persistent_flag, TCP_PERSISTENT) 
 
 loadmodule acc.so 
 modparam(acc, early_media, 0) 
 modparam(acc, report_cancels, 0) 
 modparam(acc, detect_direction, 0) 
 modparam(acc, failed_transaction_flag, ACC_FAILED) 
 modparam(acc, log_flag, ACC_DO) 
 modparam(acc, log_missed_flag, ACC_MISSED) 
 
 # added to rewrite from header 
 loadmodule uac.so 
 loadmodule uac_auth.so 
 modparam(uac,restore_mode,manual) 
 
 #added for topology hiding 
 loadmodule dialog.so 
 
 route{ 
 if (!mf_process_maxfwd_header(10)) { 
 sl_send_reply(483,Too Many Hops); 
 exit; 
 } 
 
 if (has_totag()) { 
 if (loose_route()) { 
 # added for topology hiding 
 if ($DLG_status==NULL  !match_dialog() ) { 
 xlog( cannot match request to a dialog \n); 
 } 
 #/added for topology hiding 
 
 if (is_method(BYE)) { 
 setflag(ACC_DO); 
 setflag(ACC_FAILED); 
 } else if (is_method(INVITE)) { 
 record_route(); 
 } 
 
 route(relay

Re: [OpenSIPS-Users] topology hiding

2014-02-05 Thread Vlad Paiu
   
#remove_hf(Route);
#append_hf(Route: sip:xx.xx.xx.9;lr);
create_dialog();
topology_hiding();
exit;
 }

if (!uri==myself) {
append_hf(P-hint: outbound\r\n);
route(relay);
}

if (is_method(PUBLISH|SUBSCRIBE))
{
sl_send_reply(503, Service Unavailable);
exit;
}

if (is_method(REGISTER))
{
if (   0 ) setflag(TCP_PERSISTENT);
if (!save(location))
sl_reply_error();

exit;
}

if ($rU==NULL) {
sl_send_reply(484,Address Incomplete);
exit;
}

if (!lookup(location,m)) {
t_newtran();
t_reply(404, Not Found);
exit;
}

setflag(ACC_MISSED);
route(relay);
}


route[relay] {
if (is_method(INVITE)) {
t_on_branch(per_branch_ops);
t_on_reply(handle_nat);
t_on_failure(missed_call);
}

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




branch_route[per_branch_ops] {
xlog(new branch at $ru\n);
}


onreply_route[handle_nat] {

xlog(incoming reply\n);
}


failure_route[missed_call] {
if (t_was_cancelled()) {
exit;
}
}


---

- Original Message -
From: BJ Quinn bjqu...@seidal.com
To: OpenSIPS users mailling list users@lists.opensips.org
Sent: Monday, February 3, 2014 10:27:22 AM
Subject: Re: [OpenSIPS-Users] topology hiding

Thanks, I'll do that. What about the topology hiding? Am I doing that 
incorrectly?

-BJ

- Original Message -
From: Vlad Paiu vladp...@opensips.org
To: users@lists.opensips.org
Sent: Monday, February 3, 2014 7:46:41 AM
Subject: Re: [OpenSIPS-Users] topology hiding

Hello,

No, you should not regex out those bogus characters, this seems like a
bug - could you please send us to SIP trace for your scenario so I can
understand how and when it's happening ? Are you currently doing any
manual manipulation on the Route headers in your script ?

Also, if possible, Please open an issue on
https://github.com/OpenSIPS/opensips/issue for this so we can better
keep track of it.


Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 01.02.2014 02:26, BJ Quinn wrote:

Hi,

I'd like to use topology_hiding(), but I can't quite understand how to 
integrate it into the routing part of the configuration file. I have my 
opensips box on a public IP and some machines initiating calls through the 
opensips box that are also on public IPs, so no NAT going on or anything like 
that. However, a couple of the carriers we're trying to use don't like seeing 
the IP address of the machines initiating the call (in Route and Contact 
headers, etc.) and that's causing problems including some carriers don't think 
the call has set up properly (even though it goes through), which leads to 
missing BYEs. Anyway, seems like topology_hiding() is a great idea anyway, 
regardless of the fact that I've had a carrier specifically request it.

I'm using 1.10. So I've started with the basic Residential scenario made from 
osipsconfig. I didn't check any of the options (like ENABLE_TCP, USE_ALIASES, 
etc.) and modified only my IP address and added a couple of aliases for the 
machines making the calls. I added the following outside of the routing logic 
to load the dialog module to make topology_hiding() available.

loadmodule dialog.so

Then, under if(has_totag()) { if (loose_route()) { I added --

if ($DLG_status==NULL  !match_dialog() ) {
xlog( cannot match request to a dialog \n);
}

And outside of the if(has_totag()) section I added --

if (is_method(INVITE)) {
create_dialog();
topology_hiding();
}

Without these added sections, things are fine on some carriers and with other 
carriers I have the problems described above which causes me to want to enable 
topology hiding. With these added sections, I get 408 timeouts since it appears 
that the opensips box is responding NOT HERE to the carrier's 200 OKs.

Also, possibly unrelated, in either case I'm getting a weird \304 added to my 
Route header. Should I just replace the Route header and regex that out?

Route: sip:xx.xx.xx.xx:\304;lr

Thanks!

-BJ Quinn

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


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


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


___
Users mailing list
Users

Re: [OpenSIPS-Users] topology hiding

2014-02-03 Thread Vlad Paiu

Hello,

No, you should not regex out those bogus characters, this seems like a 
bug - could you please send us to SIP trace for your scenario so I can 
understand how and when it's happening ? Are you currently doing any 
manual manipulation on the Route headers in your script ?


Also, if possible, Please open an issue on 
https://github.com/OpenSIPS/opensips/issue for this so we can better 
keep track of it.



Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com

On 01.02.2014 02:26, BJ Quinn wrote:

Hi,

I'd like to use topology_hiding(), but I can't quite understand how to 
integrate it into the routing part of the configuration file. I have my 
opensips box on a public IP and some machines initiating calls through the 
opensips box that are also on public IPs, so no NAT going on or anything like 
that. However, a couple of the carriers we're trying to use don't like seeing 
the IP address of the machines initiating the call (in Route and Contact 
headers, etc.) and that's causing problems including some carriers don't think 
the call has set up properly (even though it goes through), which leads to 
missing BYEs. Anyway, seems like topology_hiding() is a great idea anyway, 
regardless of the fact that I've had a carrier specifically request it.

I'm using 1.10.  So I've started with the basic Residential scenario made from 
osipsconfig. I didn't check any of the options (like ENABLE_TCP, USE_ALIASES, 
etc.) and modified only my IP address and added a couple of aliases for the 
machines making the calls.  I added the following outside of the routing logic 
to load the dialog module to make topology_hiding() available.

   loadmodule dialog.so

Then, under if(has_totag()) { if (loose_route()) { I added --

   if ($DLG_status==NULL  !match_dialog() ) {
 xlog( cannot match request to a dialog \n);
   }

And outside of the if(has_totag()) section I added --

   if (is_method(INVITE)) {
 create_dialog();
 topology_hiding();
   }

Without these added sections, things are fine on some carriers and with other 
carriers I have the problems described above which causes me to want to enable 
topology hiding.  With these added sections, I get 408 timeouts since it 
appears that the opensips box is responding NOT HERE to the carrier's 200 OKs.

Also, possibly unrelated, in either case I'm getting a weird \304 added to my 
Route header.  Should I just replace the Route header and regex that out?

Route: sip:xx.xx.xx.xx:\304;lr

Thanks!

-BJ Quinn

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



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


Re: [OpenSIPS-Users] topology hiding

2014-02-03 Thread BJ Quinn
Thanks, I'll do that.  What about the topology hiding?  Am I doing that 
incorrectly?

-BJ

- Original Message - 
From: Vlad Paiu vladp...@opensips.org 
To: users@lists.opensips.org 
Sent: Monday, February 3, 2014 7:46:41 AM 
Subject: Re: [OpenSIPS-Users] topology hiding 

Hello, 

No, you should not regex out those bogus characters, this seems like a 
bug - could you please send us to SIP trace for your scenario so I can 
understand how and when it's happening ? Are you currently doing any 
manual manipulation on the Route headers in your script ? 

Also, if possible, Please open an issue on 
https://github.com/OpenSIPS/opensips/issue for this so we can better 
keep track of it. 


Best Regards, 

Vlad Paiu 
OpenSIPS Developer 
http://www.opensips-solutions.com 

On 01.02.2014 02:26, BJ Quinn wrote: 
 Hi, 
 
 I'd like to use topology_hiding(), but I can't quite understand how to 
 integrate it into the routing part of the configuration file. I have my 
 opensips box on a public IP and some machines initiating calls through the 
 opensips box that are also on public IPs, so no NAT going on or anything like 
 that. However, a couple of the carriers we're trying to use don't like seeing 
 the IP address of the machines initiating the call (in Route and Contact 
 headers, etc.) and that's causing problems including some carriers don't 
 think the call has set up properly (even though it goes through), which leads 
 to missing BYEs. Anyway, seems like topology_hiding() is a great idea anyway, 
 regardless of the fact that I've had a carrier specifically request it. 
 
 I'm using 1.10. So I've started with the basic Residential scenario made from 
 osipsconfig. I didn't check any of the options (like ENABLE_TCP, USE_ALIASES, 
 etc.) and modified only my IP address and added a couple of aliases for the 
 machines making the calls. I added the following outside of the routing logic 
 to load the dialog module to make topology_hiding() available. 
 
 loadmodule dialog.so 
 
 Then, under if(has_totag()) { if (loose_route()) { I added -- 
 
 if ($DLG_status==NULL  !match_dialog() ) { 
 xlog( cannot match request to a dialog \n); 
 } 
 
 And outside of the if(has_totag()) section I added -- 
 
 if (is_method(INVITE)) { 
 create_dialog(); 
 topology_hiding(); 
 } 
 
 Without these added sections, things are fine on some carriers and with other 
 carriers I have the problems described above which causes me to want to 
 enable topology hiding. With these added sections, I get 408 timeouts since 
 it appears that the opensips box is responding NOT HERE to the carrier's 200 
 OKs. 
 
 Also, possibly unrelated, in either case I'm getting a weird \304 added to 
 my Route header. Should I just replace the Route header and regex that out? 
 
 Route: sip:xx.xx.xx.xx:\304;lr 
 
 Thanks! 
 
 -BJ Quinn 
 
 ___ 
 Users mailing list 
 Users@lists.opensips.org 
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users 


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


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


Re: [OpenSIPS-Users] topology hiding

2014-02-03 Thread BJ Quinn
;
}

if ($rU==NULL) {
sl_send_reply(484,Address Incomplete);
exit;
}

if (!lookup(location,m)) {
t_newtran();
t_reply(404, Not Found);
exit;
} 

setflag(ACC_MISSED);
route(relay);
}


route[relay] {
if (is_method(INVITE)) {
t_on_branch(per_branch_ops);
t_on_reply(handle_nat);
t_on_failure(missed_call);
}

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




branch_route[per_branch_ops] {
xlog(new branch at $ru\n);
}


onreply_route[handle_nat] {

xlog(incoming reply\n);
}


failure_route[missed_call] {
if (t_was_cancelled()) {
exit;
}
}


---

- Original Message - 
From: BJ Quinn bjqu...@seidal.com 
To: OpenSIPS users mailling list users@lists.opensips.org 
Sent: Monday, February 3, 2014 10:27:22 AM 
Subject: Re: [OpenSIPS-Users] topology hiding 

Thanks, I'll do that. What about the topology hiding? Am I doing that 
incorrectly? 

-BJ 

- Original Message - 
From: Vlad Paiu vladp...@opensips.org 
To: users@lists.opensips.org 
Sent: Monday, February 3, 2014 7:46:41 AM 
Subject: Re: [OpenSIPS-Users] topology hiding 

Hello, 

No, you should not regex out those bogus characters, this seems like a 
bug - could you please send us to SIP trace for your scenario so I can 
understand how and when it's happening ? Are you currently doing any 
manual manipulation on the Route headers in your script ? 

Also, if possible, Please open an issue on 
https://github.com/OpenSIPS/opensips/issue for this so we can better 
keep track of it. 


Best Regards, 

Vlad Paiu 
OpenSIPS Developer 
http://www.opensips-solutions.com 

On 01.02.2014 02:26, BJ Quinn wrote: 
 Hi, 
 
 I'd like to use topology_hiding(), but I can't quite understand how to 
 integrate it into the routing part of the configuration file. I have my 
 opensips box on a public IP and some machines initiating calls through the 
 opensips box that are also on public IPs, so no NAT going on or anything like 
 that. However, a couple of the carriers we're trying to use don't like seeing 
 the IP address of the machines initiating the call (in Route and Contact 
 headers, etc.) and that's causing problems including some carriers don't 
 think the call has set up properly (even though it goes through), which leads 
 to missing BYEs. Anyway, seems like topology_hiding() is a great idea anyway, 
 regardless of the fact that I've had a carrier specifically request it. 
 
 I'm using 1.10. So I've started with the basic Residential scenario made from 
 osipsconfig. I didn't check any of the options (like ENABLE_TCP, USE_ALIASES, 
 etc.) and modified only my IP address and added a couple of aliases for the 
 machines making the calls. I added the following outside of the routing logic 
 to load the dialog module to make topology_hiding() available. 
 
 loadmodule dialog.so 
 
 Then, under if(has_totag()) { if (loose_route()) { I added -- 
 
 if ($DLG_status==NULL  !match_dialog() ) { 
 xlog( cannot match request to a dialog \n); 
 } 
 
 And outside of the if(has_totag()) section I added -- 
 
 if (is_method(INVITE)) { 
 create_dialog(); 
 topology_hiding(); 
 } 
 
 Without these added sections, things are fine on some carriers and with other 
 carriers I have the problems described above which causes me to want to 
 enable topology hiding. With these added sections, I get 408 timeouts since 
 it appears that the opensips box is responding NOT HERE to the carrier's 200 
 OKs. 
 
 Also, possibly unrelated, in either case I'm getting a weird \304 added to 
 my Route header. Should I just replace the Route header and regex that out? 
 
 Route: sip:xx.xx.xx.xx:\304;lr 
 
 Thanks! 
 
 -BJ Quinn 
 
 ___ 
 Users mailing list 
 Users@lists.opensips.org 
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users 


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


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


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


[OpenSIPS-Users] topology hiding

2014-01-31 Thread BJ Quinn
Hi, 

I'd like to use topology_hiding(), but I can't quite understand how to 
integrate it into the routing part of the configuration file. I have my 
opensips box on a public IP and some machines initiating calls through the 
opensips box that are also on public IPs, so no NAT going on or anything like 
that. However, a couple of the carriers we're trying to use don't like seeing 
the IP address of the machines initiating the call (in Route and Contact 
headers, etc.) and that's causing problems including some carriers don't think 
the call has set up properly (even though it goes through), which leads to 
missing BYEs. Anyway, seems like topology_hiding() is a great idea anyway, 
regardless of the fact that I've had a carrier specifically request it. 

I'm using 1.10.  So I've started with the basic Residential scenario made from 
osipsconfig. I didn't check any of the options (like ENABLE_TCP, USE_ALIASES, 
etc.) and modified only my IP address and added a couple of aliases for the 
machines making the calls.  I added the following outside of the routing logic 
to load the dialog module to make topology_hiding() available.

  loadmodule dialog.so

Then, under if(has_totag()) { if (loose_route()) { I added --

  if ($DLG_status==NULL  !match_dialog() ) {
xlog( cannot match request to a dialog \n);
  }

And outside of the if(has_totag()) section I added --

  if (is_method(INVITE)) {
create_dialog();
topology_hiding();
  }

Without these added sections, things are fine on some carriers and with other 
carriers I have the problems described above which causes me to want to enable 
topology hiding.  With these added sections, I get 408 timeouts since it 
appears that the opensips box is responding NOT HERE to the carrier's 200 OKs.

Also, possibly unrelated, in either case I'm getting a weird \304 added to my 
Route header.  Should I just replace the Route header and regex that out?

Route: sip:xx.xx.xx.xx:\304;lr

Thanks!

-BJ Quinn

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


[OpenSIPS-Users] topology hiding and contact header

2013-02-05 Thread Brett Nemeroff
Hello All,
I noticed that when invoking topology_hiding from the dialog module that
the contact header is rewritten without a userpart in the URI. I've had
some carriers complain about the lack of a userpart. What is the reasoning
for removing the userpart of the URI and is there any way to safely add it
back without breaking in-dialog requests?

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


Re: [OpenSIPS-Users] topology hiding and contact header

2013-02-05 Thread Bogdan-Andrei Iancu

Hi Brett,

1) a SIP URI without username is perfect valid.

2) as Contact URI is just for IP routing purposes, a username part is 
totally useless.


3) preserving the username may leak topo info (you never know what is 
the username content).


4) see the simple attached patch to force a static dummy username.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 02/05/2013 11:09 AM, Brett Nemeroff wrote:

Hello All,
I noticed that when invoking topology_hiding from the dialog module 
that the contact header is rewritten without a userpart in the URI. 
I've had some carriers complain about the lack of a userpart. What is 
the reasoning for removing the userpart of the URI and is there any 
way to safely add it back without breaking in-dialog requests?


Thanks,
Brett


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Index: modules/dialog/dlg_tophiding.c
===
--- modules/dialog/dlg_tophiding.c	(revision 9736)
+++ modules/dialog/dlg_tophiding.c	(working copy)
@@ -93,7 +93,7 @@
 			return 0;
 	}
 
-	prefix_len = 5; /* sip: */
+	prefix_len = 10; /* sip:user@ */
 	prefix = pkg_malloc(prefix_len);
 	if (!prefix) {
 		LM_ERR(no more pkg\n);
@@ -107,7 +107,7 @@
 		goto error;
 	}
 
-	memcpy(prefix,sip:,prefix_len);
+	memcpy(prefix,sip:user@,prefix_len);
 	
 	p_init = p = suffix;
 	*p++ = ';';
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] topology hiding and contact header

2013-02-05 Thread Brett Nemeroff
Bogdan,
Thanks for this! This confirms my belief. Hopefully the static userpart
will meet the carrier's need. If it doesn't, would it be complicated to
preserve the original userpart?

Thanks for your help!
-Brett


On Tue, Feb 5, 2013 at 3:38 AM, Bogdan-Andrei Iancu bog...@opensips.orgwrote:

 **
 Hi Brett,

 1) a SIP URI without username is perfect valid.

 2) as Contact URI is just for IP routing purposes, a username part is
 totally useless.

 3) preserving the username may leak topo info (you never know what is
 the username content).

 4) see the simple attached patch to force a static dummy username.

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com


 On 02/05/2013 11:09 AM, Brett Nemeroff wrote:

 Hello All,
 I noticed that when invoking topology_hiding from the dialog module that
 the contact header is rewritten without a userpart in the URI. I've had
 some carriers complain about the lack of a userpart. What is the reasoning
 for removing the userpart of the URI and is there any way to safely add it
 back without breaking in-dialog requests?

  Thanks,
 Brett


 ___
 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] topology hiding and contact header

2013-02-05 Thread Bogdan-Andrei Iancu
It is not really complicated to do, but I do not see the reason (why a 
static dummy user should better than the client one, from carrier 
perspective).


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 02/05/2013 11:49 AM, Brett Nemeroff wrote:

Bogdan,
Thanks for this! This confirms my belief. Hopefully the static 
userpart will meet the carrier's need. If it doesn't, would it be 
complicated to preserve the original userpart?


Thanks for your help!
-Brett


On Tue, Feb 5, 2013 at 3:38 AM, Bogdan-Andrei Iancu 
bog...@opensips.org mailto:bog...@opensips.org wrote:


Hi Brett,

1) a SIP URI without username is perfect valid.

2) as Contact URI is just for IP routing purposes, a username part
is totally useless.

3) preserving the username may leak topo info (you never know
what is the username content).

4) see the simple attached patch to force a static dummy username.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 02/05/2013 11:09 AM, Brett Nemeroff wrote:

Hello All,
I noticed that when invoking topology_hiding from the dialog
module that the contact header is rewritten without a userpart in
the URI. I've had some carriers complain about the lack of a
userpart. What is the reasoning for removing the userpart of the
URI and is there any way to safely add it back without breaking
in-dialog requests?

Thanks,
Brett


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



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


Re: [OpenSIPS-Users] Topology hiding and unsuccessful dialog termination

2013-01-30 Thread microx
Hi all, 

I have found a solution to my problem by using insert_hf at the outbound
proxy rather than the proxy server.
When receiving a BYE request, the outbound proxy is able to correctly fill
in insert_hf() with the corresponding 
proxy server after looking up $du.

Best wishes,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-and-unsuccessful-dialog-termination-tp7584064p7584283.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] Topology hiding and unsuccessful dialog termination

2013-01-30 Thread Bogdan-Andrei Iancu

Hi Chen-Che,

Not sure if that's the right solution, as looking at the trace I see the 
BYE is not properly handled. I suspect a scripting issue or so, as for 
the BYE processing I do not see any logs from the dialog module - are 
you sure you do dialog_match() for the BYE ??


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 01/30/2013 11:13 AM, microx wrote:

Hi all,

I have found a solution to my problem by using insert_hf at the outbound
proxy rather than the proxy server.
When receiving a BYE request, the outbound proxy is able to correctly fill
in insert_hf() with the corresponding
proxy server after looking up $du.

Best wishes,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-and-unsuccessful-dialog-termination-tp7584064p7584283.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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



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


Re: [OpenSIPS-Users] Topology hiding and unsuccessful dialog termination

2013-01-30 Thread microx
Hi Bogdan-Andrei, 

The topology_hiding() is executed at the proxy server to conceal the IP
address of the proxy server.
Thus, the dialog_match() is done at the proxy server rather than the proxy
server. With the solution 
mentioned earlier, the proxy server is able to terminate the dialog
successfully. If you require any 
information, please feel free to tell me. Thanks.

Best wishes,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-and-unsuccessful-dialog-termination-tp7584064p7584304.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] Topology hiding and unsuccessful dialog termination

2013-01-28 Thread microx
Dear Bogdan-Andrei,

Sorry for the late reply. My temporary solution is to use insert_hf(xxx,
To) when the proxy server receives a 
BYE message without any route hdr. I forget to mention that 
in fact, the BYE message without any route hdr will be looped between the
outbound proxy and the proxy server (as the attached files). I use $du =
$ru at the outbound proxy to avoid the loop and make it relay to the
caller.

The attached files are the log generated at the proxy server and the
captured packets at the outbound proxy and 
proxy server. Note that I comment $du=$ru at the outbound proxy to
demonstrate the origincal case.

Sincerely thanks for you help!!

log_proxyserver
http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7584174/log_proxyserver
  
Wireshark_outboundproxy
http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7584174/Wireshark_outboundproxy
  
Wireshark_proxyserver
http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7584174/Wireshark_proxyserver
  

Best regards,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-and-unsuccessful-dialog-termination-tp7584064p7584174.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] Topology hiding and unsuccessful dialog termination

2013-01-24 Thread Bogdan-Andrei Iancu

Hi Chen-Che

So the BYE (from callee), when sent out from outbound server to proxy 
server has no Route header ?


Could you post a SIP trace showing the call on outbound proxy (you can 
send it off list, for privacy reasons) - this will help me to understand 
the failure and the reason.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 01/23/2013 05:13 PM, microx wrote:

Hi Bogdan-Andrei,

I'm not familiar with B2B and thus do not use any B2B-related modules (eg.,
B2B_LOGIC and B2B_ENTITIES).
In my scenario, the outbound proxy is only responsible for hiding the IP
address of the proxy server by
using topology_hiding(). All other functions such as user registration and
authentication, dialog handling and RTP proxy offering are handled by the
proxy server.

The BYE message is correctly sent from the callee to the caller
(callee-outbound proxy-proxy server-outbound proxy-caller). However,
because topology hiding is invoked at the outbound proxy, the BYE message
from the callee has no Route hdr. When receiving the BYE message forwarded
by the outbound
proxy, the proxy server cannot find the associated dialog due to that the
BYE message has no Route hdr.
So the proxy server fails to terminate the dialog associated with the
received BYE message.

I guess that topology hiding and dialog handling need to be done at the same
SIP element using OpenSIPS.
I hope that there exists some solution to make my scenario workable. Any
suggestion is welcome. Thanks so much.

Best regards,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-and-unsuccessful-dialog-termination-tp7584064p7584090.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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



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


Re: [OpenSIPS-Users] Topology hiding and unsuccessful dialog termination

2013-01-23 Thread Bogdan-Andrei Iancu

Hi Chen-Che,

Why does the BYE from callee fails and where ? Is it correctly sent to 
outbound proxy? does the outbound proxy sends the BYE to proxy server 
(with on Route hdr) ? does the BYE come back to outbound proxy ?


A more important question - does the proxy server do proxy or acts as a 
B2B ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 01/23/2013 08:57 AM, microx wrote:

Hi all,

I'm facing a problem as follows. The scenario is below.
   Proxy server
   Outbound proxy
caller  callee
The packet flow from caller to callee is ``caller-outbound proxy-proxy
server-outbound proxy-callee''.
The outbound proxy invokes topology_hiding() and match_dialog() to prevent
the call from knowing the
IP address of the proxy server and enable successful packet forwarding. In
this scenario, the proxy server
must call record_route() when receiving an INVITE message.
Otherwise, the BYE message from the caller will not go under loose_route()
and thus the corresponding
dialog will not be terminated.

With record_route(), the BYE message from caller can be handled properly by
the proxy server. However,
my issues is that *the BYE message from callee* (no route field in the
header) cannot be handled
successfully so that the proxy server does not terminate the corresponding
dialog (as I wish).

Please kindly help to solve this problem. Many thanks in advance.

Best regards,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-and-unsuccessful-dialog-termination-tp7584064.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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



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


Re: [OpenSIPS-Users] Topology hiding and unsuccessful dialog termination

2013-01-23 Thread microx
Hi Bogdan-Andrei,

I'm not familiar with B2B and thus do not use any B2B-related modules (eg.,
B2B_LOGIC and B2B_ENTITIES).
In my scenario, the outbound proxy is only responsible for hiding the IP
address of the proxy server by 
using topology_hiding(). All other functions such as user registration and
authentication, dialog handling and RTP proxy offering are handled by the
proxy server.

The BYE message is correctly sent from the callee to the caller
(callee-outbound proxy-proxy server-outbound proxy-caller). However,
because topology hiding is invoked at the outbound proxy, the BYE message
from the callee has no Route hdr. When receiving the BYE message forwarded
by the outbound 
proxy, the proxy server cannot find the associated dialog due to that the
BYE message has no Route hdr.
So the proxy server fails to terminate the dialog associated with the
received BYE message.

I guess that topology hiding and dialog handling need to be done at the same
SIP element using OpenSIPS. 
I hope that there exists some solution to make my scenario workable. Any
suggestion is welcome. Thanks so much.

Best regards,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-and-unsuccessful-dialog-termination-tp7584064p7584090.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


[OpenSIPS-Users] Topology hiding and unsuccessful dialog termination

2013-01-22 Thread microx
Hi all, 

I'm facing a problem as follows. The scenario is below.
  Proxy server
  Outbound proxy
   caller  callee
The packet flow from caller to callee is ``caller-outbound proxy-proxy
server-outbound proxy-callee''.
The outbound proxy invokes topology_hiding() and match_dialog() to prevent
the call from knowing the 
IP address of the proxy server and enable successful packet forwarding. In
this scenario, the proxy server 
must call record_route() when receiving an INVITE message. 
Otherwise, the BYE message from the caller will not go under loose_route()
and thus the corresponding 
dialog will not be terminated.

With record_route(), the BYE message from caller can be handled properly by
the proxy server. However, 
my issues is that *the BYE message from callee* (no route field in the
header) cannot be handled 
successfully so that the proxy server does not terminate the corresponding
dialog (as I wish).

Please kindly help to solve this problem. Many thanks in advance.

Best regards,
Chen-Che



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-and-unsuccessful-dialog-termination-tp7584064.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


[OpenSIPS-Users] Topology hiding using dialog module - 200 OK of a BYE

2012-08-29 Thread Madis Spiegel

Hi,

Is there a way of hiding the topology of a 200 OK response of a BYE 
message using the dialog module? As far as I understand, dialog is 
destroyed when OpenSIPS receives the BYE, and 200 OK is just relayed 
after that and topology hiding can not be applied.


Thanks

--
Madis Spiegel

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


Re: [OpenSIPS-Users] Topology hiding one side

2012-06-19 Thread Bogdan-Andrei Iancu

Hi,

Then open a Feature Request on SF tracker - maybe we will consider a 
patch for this.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 06/18/2012 12:13 PM, hart323 wrote:

Hello Bogdan and thanks for your answer.

Unfortunately :( SIPproxy is Avaya SES and as fas as i know it has limited
capabilities to work with custom headers like X-Contact, so I would not be
able to use info in those headers.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-one-side-tp7580395p7580412.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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



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


Re: [OpenSIPS-Users] Topology hiding one side

2012-06-18 Thread Bogdan-Andrei Iancu

Hi,

No, there is no way to do one side topology hiding right now.

What you can do is to use dialog module (with topology_hiding()) and 
copy (for requests from UAC to proxy) the contact info (that will be 
hidden by opensips) in a non standard header (like X-Contact), to that 
proxy will see the original contact from UAC.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 06/17/2012 04:03 PM, hart323 wrote:

Hello all!

I wonder can I make Opensips to hide one side (public) from the inside
(private) at the same time I want inside servers to have information about
UAs on the public? Some sort of topology hiding on one side.

UACs(public)-  (public)Opensips(private)-  SIPproxy(Registrar,pstn
gw,...)

1) SIPproxy must see end UACs CONTACT field
2) Opensips must hide all the private staff (RECORD-ROUTES, VIA,... ), so
that UACs see like if they talk only to Opensips.

As far as I could understand Dialog topology_hiding() and B2BUA module, I
can't make that scenario with those commands? I need to manually fix
headers with private info?

Any thoughts?
Thanks!

--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-one-side-tp7580395.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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



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


Re: [OpenSIPS-Users] Topology hiding one side

2012-06-18 Thread hart323
Hello Bogdan and thanks for your answer.

Unfortunately :( SIPproxy is Avaya SES and as fas as i know it has limited
capabilities to work with custom headers like X-Contact, so I would not be
able to use info in those headers.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-one-side-tp7580395p7580412.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


[OpenSIPS-Users] Topology hiding one side

2012-06-17 Thread hart323
Hello all! 

I wonder can I make Opensips to hide one side (public) from the inside
(private) at the same time I want inside servers to have information about
UAs on the public? Some sort of topology hiding on one side. 

UACs(public) - (public)Opensips(private) - SIPproxy(Registrar,pstn
gw,...) 

1) SIPproxy must see end UACs CONTACT field 
2) Opensips must hide all the private staff (RECORD-ROUTES, VIA,... ), so
that UACs see like if they talk only to Opensips. 

As far as I could understand Dialog topology_hiding() and B2BUA module, I
can't make that scenario with those commands? I need to manually fix
headers with private info? 

Any thoughts? 
Thanks!

--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-hiding-one-side-tp7580395.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


[OpenSIPS-Users] Topology hiding, media proxy and the SDP o= line

2012-05-10 Thread Jacek Konieczny
Hello,

I have an opensips with mediaproxy configured as a SIP gateway between
our PBXes and PSTN trunk providers. I would like to hide our internal
network topology, though I would prefer not to change whole
configuration to B2B. Opensips 1.7 provided the topology_hiding()
function in the dialog module, which mostly does the trick.

Though, a simple detail remained in our requests, that I don't like 
– the original IP address in the 'o=' line of the request SDP body ('c='
line is already modified for the media proxy).

Is there any way to do anything about this? It seems this IP address
does not provide any important information.

Greets,
Jacek

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


Re: [OpenSIPS-Users] Topology hiding, media proxy and the SDP o= line

2012-05-10 Thread Saúl Ibarra Corretgé
Hi,

On May 10, 2012, at 10:35 AM, Jacek Konieczny wrote:

 Hello,
 
 I have an opensips with mediaproxy configured as a SIP gateway between
 our PBXes and PSTN trunk providers. I would like to hide our internal
 network topology, though I would prefer not to change whole
 configuration to B2B. Opensips 1.7 provided the topology_hiding()
 function in the dialog module, which mostly does the trick.
 
 Though, a simple detail remained in our requests, that I don't like 
 – the original IP address in the 'o=' line of the request SDP body ('c='
 line is already modified for the media proxy).
 
 Is there any way to do anything about this? It seems this IP address
 does not provide any important information.
 

The o= field contains information about the originator of the session 
(http://tools.ietf.org/html/rfc4566#section-5.2) and it's not used for routing, 
so you may leave it as-is. If you really want to hide it you can probably use 
something from the textops/sipmsgops modules to do it, but you'll need to 
remember to do it all the time, because some strict parser may reject your 
request if you change the origin line in the middle of a dialog.


Regards,

--
Saúl Ibarra Corretgé
AG Projects




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


Re: [OpenSIPS-Users] Topology Hiding with dialog and b2b

2011-11-15 Thread ddgiants
FYI to anyone searching or Googling on dialog, b2b or topology hiding. This
was resolved and pushed to 1.7. It now does topology hiding while writing
cdrs.

I plan on putting a topology hiding, cdr writing and multiple redirect
processing tutorial on line. I know I struggled piecing together several
blogs and email list entries.

Thanks Vlad for all of your help!!!

Darren

--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-Hiding-with-dialog-and-b2b-tp6978468p6996728.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] Topology Hiding with dialog and b2b

2011-11-14 Thread ddgiants
Vlad,
Were you able to find anything. I am available all day of you need anything.
I have this project that is 99% complete except for this part. The whole
topology hiding and processing multiple redirects is killing me. The called
party hanging up is the last piece. Everything works when using b2b except
the called party BYE. From what I read you can not use b2b with dialog(which
causes the called party BYE issue). Also, errors spit out that I can not
write cdr's without dialog. So that lead me to previous posts about using
dialog and it's topology hiding feature.

Tx
Darren

--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Topology-Hiding-with-dialog-and-b2b-tp6978468p6992543.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

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


Re: [OpenSIPS-Users] Topology Hiding with dialog and b2b

2011-11-11 Thread Vlad Paiu

Hello,

It seems like the TM memory has been corrupted.
Can you please provide the core so we can further investigate this issue ?

Regards,

Vlad Paiu
OpenSIPS Developer


On 11/09/2011 06:16 PM, ddgiants wrote:

I have a scenario where I built a proxy that invites to an LCR which replies
with 300 multiple and proxy then sends out one at a time based on q value
AND topology hides and writes cdrs for dipped(lcr) call, missed calls and
completed calls. All seems to work ok except when the called party ends the
call. I read that you can not use b2b hiding with dialog module. So I tried
to just use the topology_hiding function within dialog instead of b2b. It
cores on simple config but works on my more elaborate one. I have no clue
why. I am running 1.7 on OpenSuSE 11.3. Below is opensips.cfg, core and
backtrace.

Google search Keywords for those like me
opensips generate create core dump gdb backtrace
run opensips -w directory/for/core/file/


*OPENSIPS.CFG*
# $Id: opensips-b2b.cfg $

# Debugging mode:
debug=3
memlog= 6
fork=yes
auto_aliases=no
log_stderror=yes
disable_core_dump=no

disable_dns_blacklist=yes

listen=192.168.1.116:5060
# alias=OSIPS_REALM
#port=OSIPS_PORT


sip_warning=0
#server_header=SRV_SIGNATURE
#user_agent_header=PP_USER_AGENT

#mhomed=yes
#memlog=2
check_via=no
dns=off
rev_dns=off
children=4
disable_tcp=yes
log_facility=LOG_LOCAL0
# for more info: opensips -h

# -- module loading --

mpath=/usr/local/lib/opensips/modules/

# Need acc and dialog to write cdrs
# Need uri to use has_totag
loadmodule db_mysql.so
loadmodule avpops.so
loadmodule exec.so
#loadmodule xlog.so
loadmodule textops.so
loadmodule maxfwd.so
loadmodule rr.so
loadmodule sl.so
loadmodule tm.so
loadmodule signaling.so
loadmodule usrloc.so
loadmodule registrar.so
loadmodule mi_fifo.so
loadmodule uac_redirect.so
loadmodule localcache.so
loadmodule nathelper.so
loadmodule acc.so
loadmodule dialog.so
loadmodule uri.so

# - setting module-specific parameters ---
modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)
modparam(avpops,db_url,mysql://kwk:kwk@localhost/kwk_proxy)


#modparam(acc, db_url, mysql://opensips:opensips@localhost/opensips)
#modparam(acc, failed_transaction_flag, 1)
#modparam(acc, log_level, 1)
#modparam(acc, db_missed_flag, 1)
#modparam(acc, log_missed_flag, 1)
#modparam(acc, log_flag, 1)
#modparam(acc, db_flag, 1)
#modparam(acc, cdr_flag, 1)
#modparam(acc, db_extra, contacts=$avp(contacts); src_ip=$avp(src_ip);
uri_user_portion=$rU; dest_ip=$rd; orig_callid=$avp(orig_ci);
cust_rate=$avp(cust_rate); vendor_rate=$av
p(vendor_rate))
#modparam(acc, db_table_acc, cdrs)
#modparam(acc, db_table_missed_calls, cdrs)

modparam(usrloc, db_mode, 0)
modparam(tm, pass_provisional_replies, 1)


route {
   if (!mf_process_maxfwd_header(10)) {
 sl_send_reply(483,Too Many Hops);
 exit;
   };
   if (msg:len= 2380 ) {
 sl_send_reply(513, Message too big);
 exit;
   };

   if(!has_totag()  is_method(INVITE)) {
 topology_hiding();
 #setflag(1);
 $du = sip:192.168.1.208;
 $rd = 192.168.1.208;
 route(1);
 exit;
   }

   if (has_totag()  (uri == myself)
is_method(INVITE|ACK|BYE|UPDATE)) {
 if(match_dialog()) {
   xlog( in-dialog topology hiding request - $DLG_dir\n);
   route(1);
   exit;
 }
   }
}#end route

route[1] {
   if (!t_relay()) {
 sl_reply_error();
   };
   t_on_reply(1);
   exit;
}

onreply_route[1] {
   if(t_check_status(200)) {
 if(search(Content-type: application/sdp)) {
   fix_nated_sdp(8, 192.168.1.116);
 }
   }
}

*CORE*
hp-opensuse:/usr/local/etc/opensips # gdb opensips /tmp/core
GNU gdb (GDB) SUSE (7.1-3.12)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i586-suse-linux.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/sbin/opensips...done.
[New Thread 3239]
Missing separate debuginfo for /lib/libdl.so.2
Try: zypper install -C
debuginfo(build-id)=20519b5f2874a1cf29e149802cfbef0db142633f
Missing separate debuginfo for /lib/libresolv.so.2
Try: zypper install -C
debuginfo(build-id)=e31b0c6ef67cd17db53a672233c2dea4fb8a068d
Missing separate debuginfo for /lib/libc.so.6
Try: zypper install -C
debuginfo(build-id)=62a8bfd7732322fa6b9c39d39a830a8028804534
Missing separate debuginfo for /lib/ld-linux.so.2
Try: zypper install -C
debuginfo(build-id)=22e2b3718e8271a0d899156a796b0a90bc4dc391
Missing separate debuginfo for /usr/local/lib/opensips/modules/db_mysql.so
Try: zypper install -C
debuginfo(build-id)=942e89ae15da75c4e36f97502d2e7cfea7957d7b
Missing separate debuginfo for /usr/lib/libmysqlclient.so.16
Try: zypper install -C

[OpenSIPS-Users] Topology Hiding with dialog and b2b

2011-11-09 Thread ddgiants
I have a scenario where I built a proxy that invites to an LCR which replies
with 300 multiple and proxy then sends out one at a time based on q value
AND topology hides and writes cdrs for dipped(lcr) call, missed calls and
completed calls. All seems to work ok except when the called party ends the
call. I read that you can not use b2b hiding with dialog module. So I tried
to just use the topology_hiding function within dialog instead of b2b. It
cores on simple config but works on my more elaborate one. I have no clue
why. I am running 1.7 on OpenSuSE 11.3. Below is opensips.cfg, core and
backtrace.

Google search Keywords for those like me
opensips generate create core dump gdb backtrace
run opensips -w directory/for/core/file/


*OPENSIPS.CFG*
# $Id: opensips-b2b.cfg $

# Debugging mode:
debug=3
memlog= 6
fork=yes
auto_aliases=no
log_stderror=yes
disable_core_dump=no

disable_dns_blacklist=yes

listen=192.168.1.116:5060
# alias=OSIPS_REALM
#port=OSIPS_PORT


sip_warning=0
#server_header=SRV_SIGNATURE
#user_agent_header=PP_USER_AGENT

#mhomed=yes
#memlog=2
check_via=no
dns=off
rev_dns=off
children=4
disable_tcp=yes
log_facility=LOG_LOCAL0
# for more info: opensips -h

# -- module loading --

mpath=/usr/local/lib/opensips/modules/

# Need acc and dialog to write cdrs
# Need uri to use has_totag
loadmodule db_mysql.so
loadmodule avpops.so
loadmodule exec.so
#loadmodule xlog.so
loadmodule textops.so
loadmodule maxfwd.so
loadmodule rr.so
loadmodule sl.so
loadmodule tm.so
loadmodule signaling.so
loadmodule usrloc.so
loadmodule registrar.so
loadmodule mi_fifo.so
loadmodule uac_redirect.so
loadmodule localcache.so
loadmodule nathelper.so
loadmodule acc.so
loadmodule dialog.so
loadmodule uri.so

# - setting module-specific parameters ---
modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)
modparam(avpops,db_url,mysql://kwk:kwk@localhost/kwk_proxy)


#modparam(acc, db_url, mysql://opensips:opensips@localhost/opensips)
#modparam(acc, failed_transaction_flag, 1)
#modparam(acc, log_level, 1)
#modparam(acc, db_missed_flag, 1)
#modparam(acc, log_missed_flag, 1)
#modparam(acc, log_flag, 1)
#modparam(acc, db_flag, 1)
#modparam(acc, cdr_flag, 1)
#modparam(acc, db_extra, contacts=$avp(contacts); src_ip=$avp(src_ip);
uri_user_portion=$rU; dest_ip=$rd; orig_callid=$avp(orig_ci);
cust_rate=$avp(cust_rate); vendor_rate=$av
p(vendor_rate))
#modparam(acc, db_table_acc, cdrs)
#modparam(acc, db_table_missed_calls, cdrs)

modparam(usrloc, db_mode, 0)
modparam(tm, pass_provisional_replies, 1)


route {
  if (!mf_process_maxfwd_header(10)) {
sl_send_reply(483,Too Many Hops);
exit;
  };
  if (msg:len = 2380 ) {
sl_send_reply(513, Message too big);
exit;
  };

  if(!has_totag()  is_method(INVITE)) {
topology_hiding();
#setflag(1);
$du = sip:192.168.1.208;
$rd = 192.168.1.208;
route(1);
exit;
  }

  if (has_totag()   (uri == myself)  
is_method(INVITE|ACK|BYE|UPDATE)) {
if(match_dialog()) {
  xlog( in-dialog topology hiding request - $DLG_dir\n);
  route(1);
  exit;
}
  }
}#end route

route[1] {
  if (!t_relay()) {
sl_reply_error();
  };
  t_on_reply(1);
  exit;
}

onreply_route[1] {
  if(t_check_status(200)) {
if(search(Content-type: application/sdp)) {
  fix_nated_sdp(8, 192.168.1.116);
}
  }
}

*CORE*
hp-opensuse:/usr/local/etc/opensips # gdb opensips /tmp/core
GNU gdb (GDB) SUSE (7.1-3.12)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i586-suse-linux.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/sbin/opensips...done.
[New Thread 3239]
Missing separate debuginfo for /lib/libdl.so.2
Try: zypper install -C
debuginfo(build-id)=20519b5f2874a1cf29e149802cfbef0db142633f
Missing separate debuginfo for /lib/libresolv.so.2
Try: zypper install -C
debuginfo(build-id)=e31b0c6ef67cd17db53a672233c2dea4fb8a068d
Missing separate debuginfo for /lib/libc.so.6
Try: zypper install -C
debuginfo(build-id)=62a8bfd7732322fa6b9c39d39a830a8028804534
Missing separate debuginfo for /lib/ld-linux.so.2
Try: zypper install -C
debuginfo(build-id)=22e2b3718e8271a0d899156a796b0a90bc4dc391
Missing separate debuginfo for /usr/local/lib/opensips/modules/db_mysql.so
Try: zypper install -C
debuginfo(build-id)=942e89ae15da75c4e36f97502d2e7cfea7957d7b
Missing separate debuginfo for /usr/lib/libmysqlclient.so.16
Try: zypper install -C
debuginfo(build-id)=4fa4c47b1643dc0739e94f82f955c7d81f236a85
Missing separate debuginfo for /lib/libz.so.1
Try: zypper install -C
debuginfo(build-id)=afddd839a6c18dd308b04b5289c56cc3abd1384f
Missing separate debuginfo for /lib/libcrypt.so.1
Try: zypper 

[OpenSIPS-Users] topology hiding

2011-07-11 Thread Mark Holloway
For basic topology hiding the documentation says it is called by the 
following.. 
if(is_method(INVITE)  src_ip==10.10.10.10)
   b2b_init_request(top hiding);
What I didn't see is where in the Routing Logic this is inserted and if 
something else must be commented out, or is this simple added to it.  Also, I'm 
assuming I need to add b2b_entities and b2b_logic in the opensips.cfg file. 

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


Re: [OpenSIPS-Users] topology hiding

2011-07-11 Thread duane . larson
The latest development version of OpenSIPS has topology hiding in the  
Dialog Module. That might be your best bet.


http://www.opensips.org/html/docs/modules/devel/dialog.html#id251279



On Jul 11, 2011 6:22pm, Mark Holloway m...@markholloway.com wrote:
For basic topology hiding the documentation says it is called by the  
following..



if(is_method(INVITE)  src_ip==10.10.10.10)
b2b_init_request(top hiding);What I didn't see is where in the Routing  
Logic this is inserted and if something else must be commented out, or is  
this simple added to it. Also, I'm assuming I need to add b2b_entities  
and b2b_logic in the opensips.cfg file.






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


Re: [OpenSIPS-Users] Topology hiding - B2B_LOGIC

2011-02-11 Thread Kamen Petrov

 Ok guys,

 Few issues still (after updating from trunk).

 As suggested, I removed the engage_rtp_proxy from the b2b opensips
 instance.

 I noticed the following debug from the opensips:
 Feb 11 12:49:06 sms /root/opensips-1.6.4-tls/opensips[21621]:
 ERROR:db_postgres:db_postgres_store_result: 0x7b9360 - invalid query,
 execution aborted
 Feb 11 12:49:06 sms /root/opensips-1.6.4-tls/opensips[21621]:
 ERROR:db_postgres:db_postgres_store_result: 0x7b9360: PGRES_FATAL_ERROR
 Feb 11 12:49:06 sms /root/opensips-1.6.4-tls/opensips[21621]:
 ERROR:db_postgres:db_postgres_store_result: 0x7b9360: ERROR:  null value in
 column e3_sid violates not-null constraint#012

 Looking on the postgres log, here is the failed SQL statement:
 2011-02-11 12:49:06 UTC ERROR:  null value in column e3_sid violates
 not-null constraint
 2011-02-11 12:49:06 UTC STATEMENT:  insert into b2b_logic
 (si_key,scenario,sparam0,sparam1,sparam2,sparam3,sparam4,sdp,sstate,next_sstate,e1_type,e1_sid,e1_to,e1_from,e1_key,e2_type,e2_sid,e2_to,e2_from,e2_key
 ) values ('545.0','','','','','','','',-3,0,0,'','
 sip:17864776626@190.124.220.12:5060','sip:359883327749@69.25.128.234
 ','B2B.608.661',1,'','sip:17864776626@190.124.220.12:5060','
 sip:359883327749@69.25.128.234','B2B.545.4207959')

 I am using the default b2b postgres tables.

 So next, I have the following config on the rtpproxy opensips (not the b2b
 one):
 #
 *route[1] {
 fix_nated_contact();

 if (is_method(INVITE)) {
 rewritehostport(184.106.168.144:5061);
 if (rtpproxy_offer(eo,184.106.168.144))
 t_on_reply(1);
 }
 else if (method == BYE || method == CANCEL) {
 unforce_rtp_proxy();
 }
..
 }

 onreply_route[1] {
 if (!(status=~183 || status=~200)) {
 drop;
 }

 rtpproxy_answer(FA);

 }*
 #

 As result, when I initiate a call, I get the following on the syslog:

 Feb 11 12:52:48 sms /root/opensips-1.6.4-tls/opensips[21754]:
 INFO:nathelper:rtpp_test: rtp proxy udp:184.106.168.144:22332 found,
 support for it enabled
 Feb 11 12:52:48 sms /root/opensips-1.6.4-tls/opensips[21753]:
 INFO:nathelper:rtpp_test: rtp proxy udp:184.106.168.144:22332 found,
 support for it enabled
 
 Feb 11 12:53:05 sms /root/opensips-1.6.4-tls/opensips[21746]:
 DBG:nathelper:force_rtp_proxy: Forcing body:#012[v=0#015#012o=-
 229796569696953 1 IN IP4 190.124.220.12#015#012s=-#015#012c=IN IP4
 190.124.220.12
 #015#012t=0 0#015#012m=audio 18338 RTP/AVP 0 101#015#012a=rtpmap:0
 PCMU/8000#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101 0-16]
 Feb 11 12:53:05 sms /root/opensips-1.6.4-tls/opensips[21746]:
 DBG:core:parse_to: display={011359883327749}, ruri={
 sip:359883327749@69.25.128.233}
 Feb 11 12:53:05 sms rtpproxy[21731]: DBUG:handle_command: received command
 21746_6 LA 4512c49c3cd0db1b410744fe0ced15bf@69.25.128.233 190.124.220.12
 18338 as612bc040;1 B2B.599.537;1
 Feb 11 12:53:05 sms kernel: [7145167.526106] rtpproxy[21731]: segfault at 0
 ip 004053e9 sp 7fff71948b00 error 4 in rtpproxy[40+e000]
 
 
 Feb 11 12:53:05 sms /root/opensips-1.6.4-tls/opensips[21748]:
 DBG:tm:t_reply_matching: hash 23820 label 1987919557 branch 0
 Feb 11 12:53:05 sms /root/opensips-1.6.4-tls/opensips[21748]:
 DBG:tm:t_reply_matching: REF_UNSAFE:[0x7fc0f89b4f10] after is 2
 Feb 11 12:53:05 sms /root/opensips-1.6.4-tls/opensips[21748]:
 DBG:tm:t_reply_matching: reply matched (T=0x7fc0f89b4f10)!
 Feb 11 12:53:05 sms /root/opensips-1.6.4-tls/opensips[21748]:
 DBG:tm:t_check: end=0x7fc0f89b4f10
 Feb 11 12:53:05 sms /root/opensips-1.6.4-tls/opensips[21748]:
 DBG:tm:reply_received: org. status uas=100, uac[0]=0 local=0 is_invite=1)
 Feb 11 12:53:06 sms /root/opensips-1.6.4-tls/opensips[21746]:
 ERROR:nathelper:send_rtpp_command: timeout waiting reply from a RTP proxy
 Feb 11 12:53:06 sms /root/opensips-1.6.4-tls/opensips[21746]:
 ERROR:nathelper:send_rtpp_command: proxy udp:184.106.168.144:22332 does
 not respond, disable it
 Feb 11 12:53:06 sms /root/opensips-1.6.4-tls/opensips[21746]:
 ERROR:nathelper:send_rtpp_command: can't send command to a RTP proxy
 Connection refused
  repeating over 100
 times

 Obviously the RTPproxy dies.
 What I noticed is, when i remove
 *rtpproxy_answer(FA);*
 from the onreply_route, the RTPproxy does not dies.

 Any ideas what I am doing wrong ?

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


  1   2   >