Eliram
Eliram

Reputation: 616

Re-INVITE during call results with 481 Call Does Not Exist

I've got a FreeSwitch server (1.4.26 on Ubuntu). When redirecting an incoming call to an external server, 30 minutes after the call connected, I've getting a RE-INVITE message from the target server. My FreeSwitch server responds with "481 Call Does Not Exist" and then the call is disconnected, although it was going on nicely.

I assume the RE-INVITE is sent after half the time of "Session-Expires: 3600;refresher=uac" has passed.

I tried to tell FreeSwitch to ignore re-invites, using set sip_ignore_reinvites=true before the bridge. Didn't seem to have any effect. Tried in the bridge's originate string too. Didn't help.

How can I prevent this from happening?

Here are SIP logs (1111 call 9999):

send 1069 bytes to udp/[99.99.99.99]:5060 at 15:02:29.531004:
   ------------------------------------------------------------------------
   INVITE sip:[email protected]:5060 SIP/2.0
   Via: SIP/2.0/UDP 55.55.55.55;rport;branch=z9hG4bKvjUSX912pUc9Q
   Max-Forwards: 67
   From: "12121111111" <sip:[email protected]>;tag=p02B1veKSg0tS
   To: <sip:[email protected]:5060>
   Call-ID: [email protected]_01
   CSeq: 92276610 INVITE
   Contact: <sip:[email protected]:5060>
   User-Agent: FreeSWITCH-mod_sofia/1.4.26+git~20151215T154940Z~5579a4ba46~64bit
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
   Supported: timer, path, replaces
   Allow-Events: talk, hold, conference, refer
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 223
   X-FS-Support: update_display,send_info
   Remote-Party-ID: "12121111111" <sip:[email protected]>;party=calling;screen=yes;privacy=off

   v=0
   o=FreeSWITCH 1465208343 1465208344 IN IP4 55.55.55.55
   s=FreeSWITCH
   c=IN IP4 55.55.55.55
   t=0 0
   m=audio 17006 RTP/AVP 0 101 13
   a=rtpmap:0 PCMU/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=ptime:20
   ------------------------------------------------------------------------
recv 802 bytes from udp/[99.99.99.99]:5060 at 15:02:50.184437:
   ------------------------------------------------------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 55.55.55.55;received=55.55.55.55;branch=z9hG4bKvjUSX912pUc9Q;rport=5060
   From: "12121111111" <sip:[email protected]>;tag=p02B1veKSg0tS
   To: <sip:[email protected]:5060>;tag=9307555045152742154
   Call-ID: [email protected]_01
   CSeq: 92276610 INVITE
   Content-Type: application/sdp
   Session-Expires: 3600;refresher=uas
   Contact: <sip:[email protected]:5060;user=phone;transport=udp>
   Supported: timer,100rel
   Content-Length: 288

   v=0
   o=MG4000|2.0 193121 196925 IN IP4 99.99.99.99
   s=-
   c=IN IP4 99.99.99.99
   t=0 0
   m=audio 61308 RTP/AVP 0 101
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15
   a=ptime:20
   a=X-vrzcap:vbd Ver=0 Mode=FaxPr ModemRtpRed=0
   a=X-vrzcap:identification bin=DSR2883 Prot=mgcp App=MG
   ------------------------------------------------------------------------
recv 934 bytes from udp/[99.99.99.99]:5060 at 15:32:50.190171:
   ------------------------------------------------------------------------
   INVITE sip:[email protected]:5060 SIP/2.0
   Via: SIP/2.0/UDP 99.99.99.99:5060;branch=z9hG4bKi8jups3010shhe7um2g0sb0000g00.1
   Call-ID: [email protected]_01
   From: <sip:[email protected]:5060>;tag=9307555045152742154
   To: "12121111111" <sip:[email protected]>;tag=p02B1veKSg0tS
   Content-Type: application/sdp
   Min-SE: 90
   Session-Expires: 3600;refresher=uac
   CSeq: 1 INVITE
   Contact: <sip:[email protected]:5060;user=phone;transport=udp>
   Allow: INVITE,CANCEL,BYE,ACK,REFER,UPDATE,INFO,PRACK
   Supported: timer,100rel
   Max-Forwards: 69
   User-Agent: VCS 5.10.2.10-02
   Content-Length: 288

   v=0
   o=MG4000|2.0 193121 196925 IN IP4 99.99.99.99
   s=-
   c=IN IP4 99.99.99.99
   t=0 0
   m=audio 61308 RTP/AVP 0 101
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-15
   a=ptime:20
   a=X-vrzcap:vbd Ver=0 Mode=FaxPr ModemRtpRed=0
   a=X-vrzcap:identification bin=DSR2883 Prot=mgcp App=MG
   ------------------------------------------------------------------------
send 513 bytes to udp/[99.99.99.99]:5060 at 15:32:50.190379:
   ------------------------------------------------------------------------
   SIP/2.0 481 Call Does Not Exist
   Via: SIP/2.0/UDP 99.99.99.99:5060;branch=z9hG4bKi8jups3010shhe7um2g0sb0000g00.1
   From: <sip:[email protected]:5060>;tag=9307555045152742154
   To: "12121111111" <sip:[email protected]>;tag=p02B1veKSg0tS
   Call-ID: [email protected]_01
   CSeq: 1 INVITE
   User-Agent:FreeSWITCH-mod_sofia/1.4.26+git~20151215T154940Z~5579a4ba46~64bit
   Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY
   k:timer,path,replaces
   l:0

   ------------------------------------------------------------------------
recv 374 bytes from udp/[99.99.99.99]:5060 at 15:32:50.276999:
   ------------------------------------------------------------------------
   ACK sip:[email protected]:5060 SIP/2.0
   Via: SIP/2.0/UDP 99.99.99.99:5060;branch=z9hG4bKi8jups3010shhe7um2g0sb0000g00.1
   CSeq: 1 ACK
   Call-ID: [email protected]_01
   From: <sip:[email protected]:5060>;tag=9307555045152742154
   To: "12121111111" <sip:[email protected]>;tag=p02B1veKSg0tS
   Max-Forwards: 69
   Content-Length: 0

   ------------------------------------------------------------------------
recv 477 bytes from udp/[99.99.99.99]:5060 at 15:32:50.290275:
   ------------------------------------------------------------------------
   BYE sip:[email protected]:5060 SIP/2.0
   Via: SIP/2.0/UDP 99.99.99.99:5060;branch=z9hG4bKi8jups3010shhe7um2g0sd0000010.1
   Call-ID: [email protected]_01
   From: <sip:[email protected]:5060>;tag=9307555045152742154
   To: "12121111111" <sip:[email protected]>;tag=p02B1veKSg0tS
   CSeq: 2 BYE
   Supported: timer,100rel
   Max-Forwards: 69
   Reason: SIP;cause=0;iintcode=516;isubsystem=0
   User-Agent: VCS 5.10.2.10-02
   Content-Length: 0

   ------------------------------------------------------------------------
send 510 bytes to udp/[99.99.99.99]:5060 at 15:32:50.290421:
   ------------------------------------------------------------------------
   SIP/2.0 481 Call Does Not Exist
   Via: SIP/2.0/UDP 99.99.99.99:5060;branch=z9hG4bKi8jups3010shhe7um2g0sd0000010.1
   From: <sip:[email protected]:5060>;tag=9307555045152742154
   To: "12121111111" <sip:[email protected]>;tag=p02B1veKSg0tS
   Call-ID: [email protected]_01
   CSeq: 2 BYE
   User-Agent:FreeSWITCH-mod_sofia/1.4.26+git~20151215T154940Z~5579a4ba46~64bit
   Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REGISTER,REFER,NOTIFY
   k:timer,path,replaces
   l:0 

Upvotes: 0

Views: 5292

Answers (3)

os11k
os11k

Reputation: 1358

Have you tried to turn on RFC 4028 support on Freeswitch?

https://wiki.freeswitch.org/wiki/Sofia.conf.xml#SIP_Related_options

In your sip profile:

<param name="enable-timer" value="true"/>

Upvotes: 1

Mike Dirlek
Mike Dirlek

Reputation: 11

If the above is the whole trace it is strange that now ACK is sent from FS after the 200. The re-invite is as you say a session refresh which happens on the same dialog but it is a different transaction.

Looking at the Call Id from-tag / to-tag the re-invite looks correct.

Make a tcpdump / wireshark and make sure the Re-invite is sent to the correct port and that there is an ACK after 200 ok for the initial invite

Upvotes: 1

Istvan
Istvan

Reputation: 1665

You should remove the to tag (tag=p02B1veKSg0tS) in the re-invite as this is a new transaction.

Upvotes: 0

Related Questions