Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Core/General
    • Labels:
      None
    • Mantis ID:
      4506
    • Regression:
      No

      Description

      ChanIsAvail seems to always indicate that a SIP channel is available, this is a trace from CLI:

      – Executing ChanIsAvail("SIP/201-7c2a", "SIP/211") in new stack
      – Executing SetVar("SIP/201-7c2a", "OUTGOING-MOB=SIP/211/") in new stack
      – Executing NoOp("SIP/201-7c2a", "SIP/211-1f24") in new stack
      – Executing Goto("SIP/201-7c2a", "dial-phone-out|61277000|1") in new stack
      – Goto (dial-phone-out,61277000,1)
      – Executing Dial("SIP/201-7c2a", "SIP/211/61277000|120|wWtT") in new stack
      – Called 211/61277000
      – Got SIP response 503 "Service Unavailable" back from 192.168.1.130
      – SIP/211-24fd is circuit-busy

        Activity

        Hide
        Michael Jerris added a comment -

        I beleive the situation in this case is that the channel is available, but the sipura is returning service unavailable only when you attempt to make the call. As we discussed on IRC, this could be related to the number you are trying to call. I am not sure why you would be getting a 503 in that case. Can you please do more testing as to dialing to whahtever the sipiura is calling using an analog phone, and see in the sipura documentation under what situations it returns 503. I do beleive this is not an asterisk problem, but I would like to be sure.

        Show
        Michael Jerris added a comment - I beleive the situation in this case is that the channel is available, but the sipura is returning service unavailable only when you attempt to make the call. As we discussed on IRC, this could be related to the number you are trying to call. I am not sure why you would be getting a 503 in that case. Can you please do more testing as to dialing to whahtever the sipiura is calling using an analog phone, and see in the sipura documentation under what situations it returns 503. I do beleive this is not an asterisk problem, but I would like to be sure.
        Hide
        tgj added a comment -

        I have connected the Sipura as SIP/211 to asterisk and to the Sipuras FXO channel I have connected a GMS gateway. Now I make a call to SIP/211/61277000 that will make the GSM gateway call my GSM phone. While I am on the GSM phone I try to make another call to SIP/211 and ChanIsAvail will report that its available which is obviously wrong as I am still speaking on the GSM phone through SIP/211.
        I hope this makes sense.

        Show
        tgj added a comment - I have connected the Sipura as SIP/211 to asterisk and to the Sipuras FXO channel I have connected a GMS gateway. Now I make a call to SIP/211/61277000 that will make the GSM gateway call my GSM phone. While I am on the GSM phone I try to make another call to SIP/211 and ChanIsAvail will report that its available which is obviously wrong as I am still speaking on the GSM phone through SIP/211. I hope this makes sense.
        Hide
        DanFer added a comment -

        I have the same problem as tgj. I have several Sipuras 3000s where ChanisAvail and CheckGroup don't work. Basically if I am on a call on the FXO channel (connected to the PSTN) and I tried to place another call to that same channel I generally get 503 Service unavailable, as it should. However, every now and then (let's say 20-30% of the time) Asterisk's bridges boths calls. Once I figured what the problem was I tried to use chanisavail or CheckGroup but I am seen the same result.

        Show
        DanFer added a comment - I have the same problem as tgj. I have several Sipuras 3000s where ChanisAvail and CheckGroup don't work. Basically if I am on a call on the FXO channel (connected to the PSTN) and I tried to place another call to that same channel I generally get 503 Service unavailable, as it should. However, every now and then (let's say 20-30% of the time) Asterisk's bridges boths calls. Once I figured what the problem was I tried to use chanisavail or CheckGroup but I am seen the same result.
        Hide
        Kevin P. Fleming (Inactive) added a comment -

        There is no way that any behavior in chan_sip can influence the results of CheckGroup; group counting of channels is done outside of any channel code. If CheckGroup did not work for you, then you did not implement it properly

        ChanIsAvail is not a solution to tell you conclusively whether the channel is busy or not, it is primarily to tell you whether it would be possible to send a call there. Whether that call would end up being accepted or not is entirely up to the peer that we send the call to, and they could easily reject the call even though they do not appear to be 'busy'.

        I believe that if you want to use ChanIsAvail to determine whether the SIP peer is known and registered, it will work fine. If you want to use it for limiting simultaneous calls to the peer, it will not work reliably for you.

        Show
        Kevin P. Fleming (Inactive) added a comment - There is no way that any behavior in chan_sip can influence the results of CheckGroup; group counting of channels is done outside of any channel code. If CheckGroup did not work for you, then you did not implement it properly ChanIsAvail is not a solution to tell you conclusively whether the channel is busy or not, it is primarily to tell you whether it would be possible to send a call there. Whether that call would end up being accepted or not is entirely up to the peer that we send the call to, and they could easily reject the call even though they do not appear to be 'busy'. I believe that if you want to use ChanIsAvail to determine whether the SIP peer is known and registered, it will work fine. If you want to use it for limiting simultaneous calls to the peer, it will not work reliably for you.
        Hide
        Michael Jerris added a comment -

        This appears to be a configuration error.. chanisavail does not do what you want it to do here... a better solution would be to use app_groupcount to keep track of number of calls going to that channel. More info can be found here: http://www.voip-info.org/tiki-index.php?page=Asterisk+cmd+SetGroup.

        Show
        Michael Jerris added a comment - This appears to be a configuration error.. chanisavail does not do what you want it to do here... a better solution would be to use app_groupcount to keep track of number of calls going to that channel. More info can be found here: http://www.voip-info.org/tiki-index.php?page=Asterisk+cmd+SetGroup .

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development