RFC4028 session-expired issue

194 views
Skip to first unread message

Waiting Wu

unread,
Dec 23, 2019, 11:08:54 PM12/23/19
to UniMRCP
Hi,

We try to using UniMRCP Server [1.5.0], APR [1.5.2] for a long request.
The session will destroy by server for the session-expired check (RFC4028).

In my unimrcpserver.xml, set the local ip "172.16.102.56", and ext-ip "180.169.210.135".
And test client at "14.23.86.60".

And we tried two connection type case for sip connect, tcp and udp.

1. For the tcp SIP connection case,
server will try to send invite to client, but failed.

2019-12-24 03:39:18:970683 [INFO]   Receive SIP Event [nua_i_state] Status 0 INVITE sent [SIP-Agent-1]
2019-12-24 03:39:18:970716 [NOTICE] SIP Call State 0x7fe650003d68 [calling]
2019-12-24 03:39:18:976968 [INFO]   Receive SIP Event [nua_r_invite] Status 503 Service Unavailable [SIP-Agent-1]
2019-12-24 03:39:18:977050 [INFO]   Receive SIP Event [nua_i_state] Status 503 Service Unavailable [SIP-Agent-1]

I have no idea where the server send this INVITE.

2. For the udp SIP connection case,

Client can receive the INVITE from server.


2019-12-19 09:56:55.417848 sent 999 bytes to udp/[14.23.86.60]:6060
Via: SIP/2.0/UDP 172.16.102.56:8060;rport;branch=z9hG4bK3B8HDHvp6ep4c^M
Max-Forwards: 70^M
From: <sip:AsrS...@180.169.210.135:8060>;tag=33y7pctQ4D5mm^M
To: <sip:IP...@180.169.210.135:8060>;tag=00000002-00000001-946969154^M
CSeq: 946434208 INVITE^M
Contact: <sip:180.169.210.135:8060;transport=udp,tcp>^M
User-Agent: EmotibotSofiaSIP 1.5.0^M
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE^M
Supported: timer, 100rel^M
Session-Expires: 600;refresher=uac^M
Min-SE: 120^M
Content-Type: application/sdp^M
Content-Disposition: session^M
Content-Length: 311^M
^M
v=0^M
o=EmotibotMRCPServer 6581929105556082769 577941025699864731 IN IP4 172.16.102.56^M
s=-^M
c=IN IP4 180.169.210.135^M
t=0 0^M
m=audio 14001 RTP/AVP 8^M
a=rtpmap:8 PCMA/8000^M
a=recvonly^M
a=mid:1^M
m=application 1544 TCP/MRCPv2 1^M
a=setup:passive^M
a=connection:new^M
a=channel:29f65d0c224511ea@speechrecog^M
a=cmid:1^M

But the IP address at the header "Via: SIP/2.0/UDP 172.16.102.56:8060" is local ip that client can't access.

So server will raise a Request timeout,

2019-12-19 09:56:47:913414 [INFO]   Receive SIP Event [nua_i_state] Status 0 INVITE sent [SIP-Agent-1]
2019-12-19 09:56:47:913444 [NOTICE] SIP Call State 0x7f5b64001a48 [calling]
2019-12-19 09:57:19:913061 [INFO]   Receive SIP Event [nua_r_invite] Status 408 Request Timeout [SIP-Agent-1]
2019-12-19 09:57:19:913106 [INFO]   Receive SIP Event [nua_i_state] Status 408 Request Timeout [SIP-Agent-1]

How to configure for this problem?

Thanks.

Arsen Chaloyan

unread,
Dec 24, 2019, 4:57:04 PM12/24/19
to UniMRCP
Hi Waiting,

My understanding is your UniMRCP server, named Emotiobot MRCPServer, is located under NAT, which somehow makes session re-INVITES fail.

Not sure if you need session expiration timers be enforced at all. If not, then you can set the timeout to a much longer value.

<sip-session-expires>3600</sip-session-expires>

1. SIP/TCP

You may need to enable SIP message dump and check what exactly is exchanged in this case.

      <sip-message-dump>sofia-sip-uas.log</sip-message-dump>

Or make a network capture.

2. SIP/UDP

What is used on the client side. Is this a UniMRCP client based application? The SIP Contact header field seems to be set up properly, which should let the client send the response to the right destination.

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unimrcp/a4f6f086-209a-469b-aa45-ad3d0cb86da0%40googlegroups.com.


--
Arsen Chaloyan
Author of UniMRCP
http://www.unimrcp.org

Waiting Wu

unread,
Dec 24, 2019, 9:58:29 PM12/24/19
to UniMRCP
Hi Arsen,

Thanks for you kindly response.

Yes, my mrcp server named Emotibot MRCPServer and located under NAT.

And I know that set the longer value for timeout can workaround for this issue.

1. SIP/TCP

Actually, I already enable the SIP message dump.
But I can't find the re-INVITE message from server.

According this log from unimrcpserver-00.log,

2019-12-24 03:39:18:970683 [INFO]   Receive SIP Event [nua_i_state] Status 0 INVITE sent [SIP-Agent-1]
2019-12-24 03:39:18:970716 [NOTICE] SIP Call State 0x7fe650003d68 [calling]
2019-12-24 03:39:18:976968 [INFO]   Receive SIP Event [nua_r_invite] Status 503 Service Unavailable [SIP-Agent-1]
2019-12-24 03:39:18:977050 [INFO]   Receive SIP Event [nua_i_state] Status 503 Service Unavailable [SIP-Agent-1]

I think this SIP was sent fail. 

Is that server try to send this INVITE message by a new connection?

For this case I will make a network capture to check it.

2. SIP/UDP

I'm not sure what the client side used. Maybe not based on UniMRCP.

I just found out that, SIP response will reference the "Via" header field first.

While the Via header field tells other elements where to send the
response, the Contact header field tells other elements where to send
future requests. [RFC 3261 page. 13]

Is it able to modified the "Via" value?

Thanks.

Arsen Chaloyan於 2019年12月25日星期三 UTC+8上午5時57分04秒寫道:
Hi Waiting,

My understanding is your UniMRCP server, named Emotiobot MRCPServer, is located under NAT, which somehow makes session re-INVITES fail.

Not sure if you need session expiration timers be enforced at all. If not, then you can set the timeout to a much longer value.

<sip-session-expires>3600</sip-session-expires>

1. SIP/TCP

You may need to enable SIP message dump and check what exactly is exchanged in this case.

      <sip-message-dump>sofia-sip-uas.log</sip-message-dump>

Or make a network capture.

2. SIP/UDP

What is used on the client side. Is this a UniMRCP client based application? The SIP Contact header field seems to be set up properly, which should let the client send the response to the right destination.

On Mon, Dec 23, 2019 at 8:08 PM Waiting Wu <nick32...@gmail.com> wrote:
Hi,

We try to using UniMRCP Server [1.5.0], APR [1.5.2] for a long request.
The session will destroy by server for the session-expired check (RFC4028).

In my unimrcpserver.xml, set the local ip "172.16.102.56", and ext-ip "180.169.210.135".
And test client at "14.23.86.60".

And we tried two connection type case for sip connect, tcp and udp.

1. For the tcp SIP connection case,
server will try to send invite to client, but failed.

2019-12-24 03:39:18:970683 [INFO]   Receive SIP Event [nua_i_state] Status 0 INVITE sent [SIP-Agent-1]
2019-12-24 03:39:18:970716 [NOTICE] SIP Call State 0x7fe650003d68 [calling]
2019-12-24 03:39:18:976968 [INFO]   Receive SIP Event [nua_r_invite] Status 503 Service Unavailable [SIP-Agent-1]
2019-12-24 03:39:18:977050 [INFO]   Receive SIP Event [nua_i_state] Status 503 Service Unavailable [SIP-Agent-1]

I have no idea where the server send this INVITE.

2. For the udp SIP connection case,

Client can receive the INVITE from server.


2019-12-19 09:56:55.417848 sent 999 bytes to udp/[14.23.86.60]:6060
Via: SIP/2.0/UDP 172.16.102.56:8060;rport;branch=z9hG4bK3B8HDHvp6ep4c^M
Max-Forwards: 70^M
From: <sip:AsrS...@180.169.210.135:8060>;tag=33y7pctQ4D5mm^M
To: <sip:IP...@180.169.210.135:8060>;tag=00000002-00000001-946969154^M
To unsubscribe from this group and stop receiving emails from it, send an email to uni...@googlegroups.com.

Arsen Chaloyan

unread,
Jan 9, 2020, 7:43:28 PM1/9/20
to UniMRCP
Hi Waiting,

1. If no SIP messages are sent out, then I would suggest to enable Sofia-SIP logs and check what is going on underneath. Use the following settings in unimrcpserver.xml under the main XML document.

  <misc>
     <sofiasip-logger loglevel="9" redirect="true">NUA,SOA,NEA,NTA,TPORT</sofiasip-logger>
  </misc>

2. A new SIP request is supposed to be sent to the destination based on the Contact header field.


Arsen Chaloyan於 2019年12月25日星期三 UTC+8上午5時57分04秒寫道:
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unimrcp/95c2878f-ea81-44c1-873c-c4179596b838%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages