Posted: Wed May 27, 2009 6:31 am Post subject: [asterisk-dev] ChanIsAvail: No AVAILCHAN when channel is in
When the channel is in any state > 1 , i.e. up and connected, the value of the relevant channel variables is as follows:-AVAILCHAN=""
AVAILORIGCHAN=""
AVAILSTATUS=(the enumerated value corrosponding to the state)
enum ast_channel_state { AST_STATE_DOWN, /*!< Channel is down and available */ AST_STATE_RESERVED, /*!< Channel is down, but reserved */ AST_STATE_OFFHOOK, /*!< Channel is off hook */ AST_STATE_DIALING, /*!< Digits (or equivalent) have been dialed */ AST_STATE_RING, /*!< Line is ringing */ AST_STATE_RINGING, /*!< Remote end is ringing */ AST_STATE_UP, /*!< Line is up */ AST_STATE_BUSY, /*!< Line is busy */ AST_STATE_DIALING_OFFHOOK, /*!< Digits (or equivalent) have been dialed while offhook */ AST_STATE_PRERING, /*!< Channel has detected an incoming call and is waiting for ring */ AST_STATE_MUTE = (1 << 16), /*!< Do not transmit voice data */};
Looking at the code, the application does not set the AVAILCHAN & AVAILORIGCHAN channel variables (tmp_availchan and tmp_availorig) when the state is > 1
Any clues why its been done so?
For reference:-
host123f4a*CLI> core show application ChanIsAvailhost123f4a*CLI> -= Info about application 'ChanIsAvail' =-[Synopsis] Check channel availability[Description] ChanIsAvail(Technology/resource[&Technology2/resource2...][,options]):This application will check to see if any of the specified channels are available. Options: a - Check for all available channels, not only the first one. s - Consider the channel unavailable if the channel is in use at all. t - Simply checks if specified channels exist in the channel list (implies option s). This application sets the following channel variable upon completion: AVAILCHAN - the name of the available channel, if one exists AVAILORIGCHAN - the canonical channel name that was used to create the channel AVAILSTATUS - the status code for the available channel
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum