[asterisk-dev] Detailed SIP disconnect reason

Kirill 'Big K' Katsnelson kkm at adaptiveai.com
Wed Feb 24 00:45:06 CST 2010


On 100223 0645, Leif Madsen wrote:
> Kirill 'Big K' Katsnelson wrote:
>> On 100222 1508, CDR wrote:
>>> I support to export the disconect reason in a variable,
>> And why specifically a variable, not through a call to CHANNEL()?
> 
> I agree, this should be in the CHANNEL() function, not a channel variable.

I previously was under an impression that CHANNEL() gives access to 
other channel variables; it does not. There is, however, the function 
IMPORT() that does the trick but only for variables. The scenario is as 
this:

- Channel A is incoming and enters the dialplan;
- A reaches Dial or Queue and creates B
- A and B are bridged and RTP flows
- The B's peer crashes, and B is hung up by the RTP timeout.
- The 'h' extension is invoked on A.

Although B still exists at that point (listed in CHANNELS()), there is 
no way to access any information contained in it from A except for 
variable access through IMPORT(). If so, the only use would be to return 
the information through a variable, short of introducing new 
inter-channel data exchange mechanism.

Am I not missing anything?

  -kkm




More information about the asterisk-dev mailing list