Re: [OpenSIPS-Users] ACK not forwarding

2017-10-31 Thread ahmeddd
hallo,
I'm ahmed and I'm working on opensips.
Actually, I sow your questions on the forum and I have a problem that I
think you have the answer.

Actually, I did a simple senario to route calls between users registered in
opensips server, but when it comes to real IP phones( that each one has its
own ip address ), it doasn't work. ( trunk ).
for example: my opensips address: 10.42.15.18
and my IP phone address is : 10.42.13.82
it is all about sip trunk I think.

I am blocked in this part and searched a lot for a solution, maybe there is
a detail that I have missed.
which function is responsible for handling requests and responses with an IP
phone ?

 I used this code :

 account only INVITEs
  
if ($rU=="49894614950666"){
$rU = $tU;
rewritehostport("10.42.13.82:5060");
$du = "sip:49894614950666@10.42.13.82;user=phone";
t_relay();
xlog("reference to  URI of 'To' header  > 
$tu");
xlog("reference to domain in URI of 'TO' header 
>  $td");
# route the call out based on RURI
route(3);
}

   

route[3]{

 seturi("sip:49894614950666@10.42.13.82;user=phone");
 $du = "sip:49894614950666@10.42.13.82;user=phone";
 #replace the domain part of RURI to point to test8s2 or test8s
 rewriteuri("sip:49894614950666@10.42.13.82;user=phone");
 xlog("route 2 :   forwarding to $tU  \n   $ruri  \n");
 xlog("Received $rm from $fu (callid: $ci)\n");
 forward();

#if(nat_uac_test("8")) {
#xlog("We have incoming SDP, let's fix if it's behind NAT\n");
#fix_nated_sdp("2");
# }

if (is_method("INVITE")) {
t_on_branch("2");
t_on_reply("2");
t_on_failure("1");
}


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

if (!t_relay()) {
sl_reply_error();
};
exit;
}


When calling from a soft phone the requested number, the server sends a
request INVITE as follow : 


INVITE sip:49894614950666@10.42.15.18;transport=TCP SIP/2.0 
Via: SIP/2.0/TCP 10.42.15.12:5060;branch=z9hG4bK-524287-1---dedd27ee7475c0f1
Max-Forwards: 70 
Contact:  
To:  
From: ;tag=2f025b44 
Call-ID: tdO14DnlADH9Okx6Sr0p4A.. 
CSeq: 1 INVITE 
Content-Type: application/sdp 
User-Agent: Z 3.15.40006 rv2.8.20 
Allow-Events: presence, kpml, talk 
Content-Length: 237 


and the target VM resend an INVITE request to Opensips server, but then, the
server start to send to himself messages and not responding the target
machine...

I wonder that the "To" field in the INVITE message is false !
opensips only sends a invite to the IP phone and ignore messages coming from
it, does not respond after with any ack.
what should I add or modify ?
thank you a lot.



--
Sent from: 
http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

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


Re: [OpenSIPS-Users] ACK not forwarding

2016-02-05 Thread Bogdan-Andrei Iancu

Hi Alex,

Yes, it is their bug and they should fix it. But if the UAC makes the 
call to PSTN, and my proxy closes the CDR but is not able to push 
forward the BYE to GW, the call will remain active on the GW side and it 
will bill me, as service provider - now, when the carrier will ask me to 
pay for that long zombie call, can I invoke "it is bad SIP that really 
should't be fixed " ?? :)


As I see it, the service provider (with the opensips proxy) should do 
whatever it take to protect the service/business, even if that means 
fixing somebody's else crap ;)


Regards,

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

On 04.02.2016 18:09, Alex Balashov wrote:

On 02/04/2016 11:08 AM, Alex Balashov wrote:


Bogdan,

That's interesting. I had no idea OpenSIPS had a module specifically
devoted to fixing bad SIP that really shouldn't be fixed. :-)


s/a module/dialog module functionality/




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


Re: [OpenSIPS-Users] ACK not forwarding

2016-02-04 Thread Schneur Rosenberg
Alax you're correct, but not all sip device manufacturers really know the
sip rfc etc, soft phones and phone manufacturers are better, but in my case
its a SIP door bell, when there is only one sip server as is the case with
most of these units that they are connected to a small business PBX like
FreePBX it works, the problem starts when there is more than one server in
the path, I spoke their tech support and its been 2 days and they still
don't have a fix yet, so its nice to have a workaround for cases like these.

On Thu, Feb 4, 2016 at 5:09 PM, Alex Balashov 
wrote:

> On 02/04/2016 11:08 AM, Alex Balashov wrote:
>
> Bogdan,
>>
>> That's interesting. I had no idea OpenSIPS had a module specifically
>> devoted to fixing bad SIP that really shouldn't be fixed. :-)
>>
>
> s/a module/dialog module functionality/
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.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] ACK not forwarding

2016-02-04 Thread Alex Balashov

On 02/04/2016 11:08 AM, Alex Balashov wrote:


Bogdan,

That's interesting. I had no idea OpenSIPS had a module specifically
devoted to fixing bad SIP that really shouldn't be fixed. :-)


s/a module/dialog module functionality/

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [OpenSIPS-Users] ACK not forwarding

2016-02-04 Thread Alex Balashov

Bogdan,

That's interesting. I had no idea OpenSIPS had a module specifically 
devoted to fixing bad SIP that really shouldn't be fixed. :-)


-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [OpenSIPS-Users] ACK not forwarding

2016-02-03 Thread Bogdan-Andrei Iancu

Hi Schneur,

Yes, you were, still the right approach, as Alex mentioned, is to report 
and have the bug fixed in the device.


Regards,

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

On 03.02.2016 22:18, Schneur Rosenberg wrote:
Thanks, so I was correct in my original question that the dialog 
module can help me :-)


On Wed, Feb 3, 2016 at 6:01 PM, Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:


Hi Schneur,

Well, there is a reasonable way to fix it on your side - use the
dialog module (have dialog state) and for sequential requests
(like the ACK in question) use the validate_dialog() -
http://www.opensips.org/html/docs/modules/2.1.x/dialog.html#id295536
- to find out the broken RURI/Routes/Contact and have them fixed
via fix_route_dialog() function -
http://www.opensips.org/html/docs/modules/2.1.x/dialog.html#id295624

Regards,

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

On 02.02.2016 20:34, Schneur Rosenberg wrote:

Thanks I will open a ticket with the hardware manufacturer, lets
hope they will fix it

On Tue, Feb 2, 2016 at 8:25 PM, Alex Balashov
mailto:abalas...@evaristesys.com>> wrote:

The RURI of an end-to-end ACK should always be equal to the
remote dialog target, i.e. in this case the Contact URI in
the 200 OK.

‎If the RURI of the ACK is not equal to the remote target,
it's not a properly formed ACK. And certainly, it should not
point to the OpenSIPS proxy itself. There's no reasonable way
to work around it: the UA in question needs to be fixed.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920  (toll-free) /
+1-678-954-0671  (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.
  Original Message
From: Schneur Rosenberg
Sent: Tuesday, February 2, 2016 13:22
To: OpenSIPS users mailling list
Reply To: OpenSIPS users mailling list
    Subject: [OpenSIPS-Users] ACK not forwarding


___
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 <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] ACK not forwarding

2016-02-03 Thread Bogdan-Andrei Iancu

Hi Schneur,

Well, there is a reasonable way to fix it on your side - use the dialog 
module (have dialog state) and for sequential requests (like the ACK in 
question) use the validate_dialog() - 
http://www.opensips.org/html/docs/modules/2.1.x/dialog.html#id295536 - 
to find out the broken RURI/Routes/Contact and have them fixed via 
fix_route_dialog() function - 
http://www.opensips.org/html/docs/modules/2.1.x/dialog.html#id295624


Regards,

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

On 02.02.2016 20:34, Schneur Rosenberg wrote:
Thanks I will open a ticket with the hardware manufacturer, lets hope 
they will fix it


On Tue, Feb 2, 2016 at 8:25 PM, Alex Balashov 
mailto:abalas...@evaristesys.com>> wrote:


The RURI of an end-to-end ACK should always be equal to the remote
dialog target, i.e. in this case the Contact URI in the 200 OK.

‎If the RURI of the ACK is not equal to the remote target, it's
not a properly formed ACK. And certainly, it should not point to
the OpenSIPS proxy itself. There's no reasonable way to work
around it: the UA in question needs to be fixed.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920  (toll-free) /
+1-678-954-0671  (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.
  Original Message
From: Schneur Rosenberg
Sent: Tuesday, February 2, 2016 13:22
To: OpenSIPS users mailling list
Reply To: OpenSIPS users mailling list
Subject: [OpenSIPS-Users] ACK not forwarding


___
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


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


Re: [OpenSIPS-Users] ACK not forwarding

2016-02-02 Thread Schneur Rosenberg
Thanks I will open a ticket with the hardware manufacturer, lets hope they
will fix it

On Tue, Feb 2, 2016 at 8:25 PM, Alex Balashov 
wrote:

> The RURI of an end-to-end ACK should always be equal to the remote dialog
> target, i.e. in this case the Contact URI in the 200 OK.
>
> ‎If the RURI of the ACK is not equal to the remote target, it's not a
> properly formed ACK. And certainly, it should not point to the OpenSIPS
> proxy itself. There's no reasonable way to work around it: the UA in
> question needs to be fixed.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
> 303 Perimeter Center North, Suite 300
> Atlanta, GA 30346
> United States
>
> Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> Sent from my BlackBerry.
>   Original Message
> From: Schneur Rosenberg
> Sent: Tuesday, February 2, 2016 13:22
> To: OpenSIPS users mailling list
> Reply To: OpenSIPS users mailling list
> Subject: [OpenSIPS-Users] ACK not forwarding
>
>
> ___
> 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] ACK not forwarding

2016-02-02 Thread Alex Balashov
The RURI of an end-to-end ACK should always be equal to the remote dialog 
target, i.e. in this case the Contact URI in the 200 OK.

‎If the RURI of the ACK is not equal to the remote target, it's not a properly 
formed ACK. And certainly, it should not point to the OpenSIPS proxy itself. 
There's no reasonable way to work around it: the UA in question needs to be 
fixed.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.
  Original Message  
From: Schneur Rosenberg
Sent: Tuesday, February 2, 2016 13:22
To: OpenSIPS users mailling list
Reply To: OpenSIPS users mailling list
Subject: [OpenSIPS-Users] ACK not forwarding


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


[OpenSIPS-Users] ACK not forwarding

2016-02-02 Thread Schneur Rosenberg
My ACK coming from this device does not get forwarded to its designated
destination, I see that the RURI is to my OpenSIPS server even though the
contact has been rewritten in the OK, is that the reason the OpenSIPS
thinks its for himself? if yes how can I workaround the issue, perhaps with
dialog module etc?

Below please find the OK and the ACK, it has a Record route and proper
contact.

U 104.131.18.123:5060 -> 80.64.118.39:64308
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 80.64.118.39:64308
;rport=64308;received=80.64.118.39;branch=z9hG4bK-1131176229.
Record-Route: .
From: SORSTestDoor1 ;tag=628175012.
To: ;tag=as3223454f.
Call-ID: 10007@192.168.1.8.
CSeq: 1018 INVITE.
Server: SIP Server 9.21/CS.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
Contact: .
Content-Type: application/sdp.
Content-Length: 236.


U 88.64.118.39:64308 -> 104.131.18.123:5060
ACK sip:2...@sip.sipserver.info SIP/2.0.
Via: SIP/2.0/UDP 80.64.118.39:64308;branch=z9hG4bK-608413784.
Route: .
From: SORSTestDoor1 ;tag=628175012.
To: ;tag=as3223454f.
Call-ID: 10007@192.168.1.8.
User-Agent: Valcom xp1.50.14-10-14-14.
CSeq: 1018 ACK.
Content-Length: 0.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users