Klaus Darilion schrieb:
> One of the problems with hangupcause is, that is might get changed from 
> one Asterisk to another - e.g. Hangup(3) generates a SIP 404 response 
> which gets translated to hangupcause 1. So, a mechanism to signal 
> Asterisk hangupcauses from one Asterisk to another Asterisk would be nice.
> 
> IIRC I once saw a prorietary Asterisk header (X-Hangupcause or similar) 
> in a SIP response, but I could find it currently.

asterisk 1:

SIPAddHeader(X-Hangupcause: 1);
Dial(SIP/${ext...@asterisk2);

asterisk 2:

if ("${CHANNEL(channeltype)}" = "SIP") {
        if ("${SIP_HEADER(X-Hangupcause)}" != "") {
                Set(HANGUPCAUSE=${SIP_HEADER(X-Hangupcause)});
        }
}


   Philipp Kempgen

-- 
AMOOCON 2009, May 4-5, Rostock / Germany   ->  http://www.amoocon.de
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to