[asterisk-dev] resending cause codes

marek cervenka cervajs at fpf.slu.cz
Tue Nov 30 08:54:51 CST 2010


>> i'm testing sending ISDN cause codes to customer pbx (below example
>> scenario for unallocated number)
>>
>> topology:
>> PSTN-E1-AsteriskA-sip-AsteriskB-sip-SOMEPBX
>>
>> call from SOMEPBX to PSTN (to unallocated number)
>>
>> AsteriskA sends to AsteriskB
>> Status-Line: SIP/2.0 503 Service Unavailable
>>   X-Asterisk-HangupCause: Unallocated (unassigned) number
>>   X-Asterisk-HangupCauseCode: 1
>>
>> ${HANGUPCAUSE} on AsteriskB is 34 (asterisk translation of sip/503)
>>
>> how can i resend X-Asterisk-HangupCauseCode from AsteriskB to SOMEPBX?
>>
>> i'm tried this on AsteriskB
>> exten => _X.,1,Dial(SIP/AsteriskA,${EXTEN})
>> exten => _X.,n,Hangup(${SIP_HEADER(X-Asterisk-HangupCauseCode)})
>> but no success
>>
>> why i cannot read X-Asterisk-HangupCauseCode?
>> ${SIP_HEADER(X-Asterisk-HangupCauseCode)} is empty
>
> This is indeed not an asterisk-dev question.

i know :( sorry

but...asterisk-dev question may be

how can i implement parsing incoming messages and get 
X-Asterisk-HangupCauseCode?

and answer may be note from
http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause

Note: Asterisk 1.8 will allow to read SIP response codes in the dialplan 
via {HASH(SIP_CAUSE,<channel-name>)}.
Asterisk 1.8 also comes with a 'use_q850_reason' configuration option for 
generating and parsing, if available, "Reason: Q.850;cause=<cause code>".

this mean i must implement
{HASH(ISUP_CAUSE,<channel-name>)} -> parsed from Reason header

am i correct?

-- 
---------------------------------------
Marek Cervenka
=======================================




More information about the asterisk-dev mailing list