[asterisk-dev] resending cause codes
Olle E. Johansson
oej at edvina.net
Tue Nov 30 08:34:05 CST 2010
30 nov 2010 kl. 14.40 skrev Bruce McAlister:
> I've not tried what you are trying to do, but, should
>
> exten => _X.,1,Dial(SIP/AsteriskA,${EXTEN})
>
> not be
>
> exten => _X.,1,Dial(SIP/AsteriskA/${EXTEN})
>
>
>
> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of marek cervenka
> Sent: 30 November 2010 09:21
> To: asterisk-dev at lists.digium.com
> Subject: [asterisk-dev] resending cause codes
>
> hello,
>
> i know that my question is partially "user question" but i think i
> want something which isn't possible now. please give me a direction how to
> implement
>
> 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.
SIP_HEADER only works for the initial INVITE, not for any headers in any other SIP messages.
/O
More information about the asterisk-dev
mailing list