3cx send bye instead of cancel to end unanswered call

Discussion in '3CX Phone System - General' started by mk@wind.no, Dec 4, 2009.

Thread Status:
Not open for further replies.
  1. mk@wind.no

    Joined:
    Dec 4, 2009
    Messages:
    2
    Likes Received:
    0
    When i end an unanswered external call from a client on the 3cx, the called party still rings (for at least about 30 seconds).

    I have traced the calls and found that the client is sending a "cancel" request to the 3cx, and get a "200 ok" and "487 request terminated" as it should. The call is terminated from the clients point of wiew. The 3cx then sends a "bye" request (instead of a "Cancel" request?) to the sip provider and the sip provider returns "200 ok" to the "bye" request. The 3cx seems to disconnect (green light in the status wiew). The problem is that the sip provider does not disconnect the ringing on the outbound leg. It seems to me that unanswered calls should be terminated by a "cancel" rather than a "bye" request. Is it possible to make the 3cx send a "cancel" request instead of a "bye" request if an external call is canceled before it is answered? Or is there other workarounds?

    Morten
     
  2. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,111
    Likes Received:
    143
    Hi

    We are going to arrange this behavior.

    Attached is a patch that does exactly what you are mentioning.

    Go to program files, 3CX, bin and replace rar
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Cjay

    Cjay New Member

    Joined:
    Feb 24, 2007
    Messages:
    189
    Likes Received:
    0
    By the looks of things this patch may have fixed another obscure issue that has been puzzling me since upgrading to v8.0.9941 recently:

    Calls made from a 3cx extension out to an external number via my VoIP provider which were unanswered (so 3cx calling party hangs up first) resulted in the pair of UDP ports used for RTP traffic remaining active - so unable to be used for further calls [shown in netstat -a as (for example) UDP 3cx-Server: 9006 *:*]

    Eventually after enough outgoing unanswered calls the entire port range assigned for the 'external leg of VoIP provider calls' would be blocked and further outgoing calls would fail with a 'no ports available' error message in the log - at which point a 3cx process restart was needed to clear the blockage.

    Has anyone else seen this?

    Chris
     
  4. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,111
    Likes Received:
    143
    HI

    Thanks for your comments - this is an interesting point. However I can assure you that there are no port leaks coming from the 3CX Call manager core. This is something we stress test very often. i am completely sure about this.

    What is the provider you are using? I will explain why...

    It could be that the provider gets confused with the cancel / Bye /and when and how they are sent.

    The previous implementation we had (When a bye was sent upon creation of a dialog as opposed to what the patch does ie sends a cancel if final response is not yet received) is not incorrect either. In the SIP RFC 3261, this particular behaviour is mentioned. However we decided to change this to sending a cancel because this is also mentioned in the sip RFC. Also cancel sent before final response is widely used so for interop purposes we decided to change (So this patch will be in the next release we will make of 3CX Phone System).

    Ithink that the port leaks in your case are caused by this. It makes sense also because the leaks you are seing are in the RTP external ports. If your provider wants the CANCEL before final responses, but instead receives a BYE upon creation of Dialog/session or provisional responses, then this may confuse the internal workings of the provider causing it not to terminate the session correctly. This is the only thing I can think of to explain what is happening in your environment.

    What provider are you using? Let me know what you think on this. Can you send us a capture showing a rejected call? Also if you can still reproduce this issue, send us verbose logs showing the problem.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Cjay

    Cjay New Member

    Joined:
    Feb 24, 2007
    Messages:
    189
    Likes Received:
    0
    Nicky,

    Thanks for your comments. I am using VoipDiscount as my provider and the port blocking is quite reproducible - I have Wireshark captures of the SIP dialogue with both versions of the 3cxphonesystem.exe as well as verbose log files. The patched version you attached to this thread is fine whereas the stock version cause this port blocking problem when a 3cx caller hangs up on an outgoing but unanswered call.

    I can email you the Wireshark capture files if you want - they are not big!

    Regards,
    Chris
     
  6. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,111
    Likes Received:
    143
    Hi

    If you are working well with the patch then we have no problems because the next release we will make is going to have this by default.

    Therefore for now keep the patch handy so if you have other installations to do, you apply it.

    It seems that Voip Discount expects a cancel in this scenario - We are on the right track. Next version will have this by default

    Thanks for your update.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. mk@wind.no

    Joined:
    Dec 4, 2009
    Messages:
    2
    Likes Received:
    0
    Hi

    Thank you very much for the quick reply. I have implemented the patch and calls are terminated as they should. Thanks!

    Morten
     
  8. bangsjaman

    Joined:
    Jun 1, 2009
    Messages:
    37
    Likes Received:
    0
    Yes, that was exactly the same problem I had.

    The patch also solved the problem for me. Using Supported 3CX Voip provider: Nettel, Denmark.

    When will the next version be released with this patch included?
     
  9. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,111
    Likes Received:
    143
    Hi

    You have the patch to work with in the meantime.

    We are working to release a new version - we are making downloadable component updates in the system so this is why it is taking a bit long. however we are nearing - maybe in 2 weeks time we will have an upload ready

    thanks 4 d feedback
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.