Search code examples
voipsipfreeswitch

Problem: FreeSWITCH does not resend 'Decline' or 'Busy here'


I have 2 UACs connected to FreeSWITCH. Party 1 calls party 2. Party 2 rejects a call (either with 'Decline' or 'Busy here'). But FreeSWITCH does not send 'Decline' to party 1. Instead, it sends OK with SDP, which actually initiates a call.

How to fix that?

FreeSWITCH to party 2:

send 1250 bytes to udp/[192.168.1.48]:5062 at 09:13:34.543613:
------------------------------------------------------------------------
INVITE sip:[email protected]:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.249;rport;branch=z9hG4bKv7gByc79t6eXr
Max-Forwards: 69
From: "Extension 1008" <sip:[email protected]>;tag=U7g4v185eNZ5g
To: <sip:[email protected]:5062>
Call-ID: 18afdb77-0ac0-122f-1e9a-000c29db1701
CSeq: 13339743 INVITE
Contact: <sip:[email protected]:5060>
User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-765908f 2011-05-22 19-10-52 -0500
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 316
X-FS-Support: update_display
Remote-Party-ID: "Extension 1008" <sip:[email protected]>;party=calling;screen=yes;privacy=off

v=0
o=1007 4735834019219554122 4070593914327911447 IN IP4 192.168.1.249
s=Session SIP/SDP
c=IN IP4 127.0.0.1
t=0 0
m=audio 50000 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-15
a=ptime:20
a=silenceSupp:off - - - -
m=video 50002 RTP/AVP 96
a=rtpmap:96 H264/90000
   ------------------------------------------------------------------------
2011-06-06 13:13:34.543847 [DEBUG] sofia.c:4770 Channel sofia/internal/sip:[email protected]:5062 entering state [calling][0]
recv 324 bytes from udp/[192.168.1.48]:5062 at 09:13:34.553519:
   ------------------------------------------------------------------------
   SIP/2.0 100 Trying
   Via: SIP/2.0/UDP 192.168.1.249;rport=5060;branch=z9hG4bKv7gByc79t6eXr
   From: "Extension 1008" <sip:[email protected]>;tag=U7g4v185eNZ5g
   To: <sip:[email protected]:5062>
   Call-ID: 18afdb77-0ac0-122f-1e9a-000c29db1701
   CSeq: 13339743 INVITE
   User-Agent: VideoPhone-V8438 22.21.14.6
   Content-Length: 0

   ------------------------------------------------------------------------
recv 420 bytes from udp/[192.168.1.48]:5062 at 09:13:35.240868:
   ------------------------------------------------------------------------
   SIP/2.0 180 Ringing
   Via: SIP/2.0/UDP 192.168.1.249;rport=5060;branch=z9hG4bKv7gByc79t6eXr
   From: "Extension 1008" <sip:[email protected]>;tag=U7g4v185eNZ5g
   To: <sip:[email protected]:5062>;tag=743843232
   Call-ID: 18afdb77-0ac0-122f-1e9a-000c29db1701
   CSeq: 13339743 INVITE
   Contact: <sip:[email protected]:5062>
   User-Agent: VideoPhone-V8438 22.21.14.6
   Allow-Events: talk,hold,conference,refer
   Content-Length: 0

recv 341 bytes from udp/[192.168.1.48]:5062 at 09:13:41.200601:
   ------------------------------------------------------------------------
   SIP/2.0 486 Busy Here
   Via: SIP/2.0/UDP 192.168.1.249;rport=5060;branch=z9hG4bKv7gByc79t6eXr
   From: "Extension 1008" <sip:[email protected]>;tag=U7g4v185eNZ5g
   To: <sip:[email protected]:5062>;tag=743843232
   Call-ID: 18afdb77-0ac0-122f-1e9a-000c29db1701
   CSeq: 13339743 INVITE
   User-Agent: VideoPhone-V8438 22.21.14.6
   Content-Length: 0

   ------------------------------------------------------------------------
send 327 bytes to udp/[192.168.1.48]:5062 at 09:13:41.200761:
   ------------------------------------------------------------------------
   ACK sip:[email protected]:5062 SIP/2.0
   Via: SIP/2.0/UDP 192.168.1.249;rport;branch=z9hG4bKv7gByc79t6eXr
   Max-Forwards: 69
   From: "Extension 1008" <sip:[email protected]>;tag=U7g4v185eNZ5g
   To: <sip:[email protected]:5062>;tag=743843232
   Call-ID: 18afdb77-0ac0-122f-1e9a-000c29db1701
   CSeq: 13339743 ACK
   Content-Length: 0

   ------------------------------------------------------------------------

And then FreeSWITCH to party 1:

send 1197 bytes to udp/[192.168.1.39]:5062 at 09:13:41.207906:
------------------------------------------------------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 192.168.1.39:5062;branch=z9hG4bK-383538-d58eaeea024dbe8f3861035d3b20adb1
   From: "Bob" <sip:[email protected]>;tag=1adc1070-7399-45d9-ba9d-90211de2cabf
   To: "1005" <sip:[email protected]>;tag=tyQBU6Q2Hc9jN
   Call-ID: [email protected]
   CSeq: 2 INVITE
   Contact: <sip:[email protected]:5060;transport=udp>
   User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-765908f 2011-05-22 19-10-52 -0500
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
   Supported: timer, precondition, path, replaces
   Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 271
   Remote-Party-ID: "Outbound Call" <sip:[email protected]>;party=calling;privacy=off;screen=no

   v=0
   o=FreeSWITCH 1307321799 1307321800 IN IP4 192.168.1.249
   s=FreeSWITCH
   c=IN IP4 192.168.1.249
   t=0 0
   m=audio 29822 RTP/AVP 8 101
   a=rtpmap:8 PCMA/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=silenceSupp:off - - - -
   a=ptime:20
   m=video 0 RTP/AVP 19
   ------------------------------------------------------------------------
2011-06-06 13:13:41.192538 [DEBUG] sofia.c:4770 Channel sofia/internal/[email protected] entering state [completed][200]
recv 443 bytes from udp/[192.168.1.39]:5062 at 09:13:41.219020:
   ------------------------------------------------------------------------
   ACK sip:[email protected]:5060;transport=udp SIP/2.0
   Call-ID: [email protected]
   CSeq: 2 ACK
   Via: SIP/2.0/UDP 192.168.1.39:5062;branch=z9hG4bK-383538-8498d2bc22a8c5b2f1be02c79112808d
   From: "Bob" <sip:[email protected]>;tag=1adc1070-7399-45d9-ba9d-90211de2cabf
   To: "1005" <sip:[email protected]>;tag=tyQBU6Q2Hc9jN
   Max-Forwards: 70
   Contact: "Bob" <sip:[email protected]:5062>;expires=0
   Content-Length: 0

   ------------------------------------------------------------------------

Solution

  • I haven't use freeswitch, but most systems have allow for a "next destination" to be set when a call to the initial destination fails. This implies that when you place a call to party 2 (at 1005) the "Busy Here" causes freeswitch to connect the call to whatever the "next destination" is.

    The 200 OK sent by freeswitch has its own IP in the SDP (c=IN IP4 192.168.1.249) implying a local destination (e.g. voicemail).

    A quick google of freeswitch docs identifies an "action failover on failed action". This is probably what is occurring...