On 10 Nov 2010, at 20:09, Steven Ayre wrote:
<action application="set" data="hangup_on_bridge=false" /> <action application="bridge" data="..." /> <action application="set" data="sip_bye_h_X-Remote-Reason=${bridge_hangup_cause}" /> <action application="hangup" />
It won't have any effect if the A-leg hangs up though (the call will end during the bridge so won't reach the sip_h set).
If the B-leg hangs up it'll take the B-leg cause and set it in a X-Remote-Reason header of the BYE to the A-leg. Note the bye needs sip_bye_h_ not the usual sip_h_ prefix.
Hi Steven, Thanks for the advice - seems it's not getting far enough to set the header, looks like the originate itself fails;
2010-11-12 21:17:03.143772 [INFO] mod_dptools.c:2355 Originate Failed. Cause: NO_USER_RESPONSE
But in the SIP i'm getting this back from the ITSP; SIP/2.0 480 Temporarily Unavailable. Via: SIP/2.0/UDP 10.0.0.148;rport=5060;branch=z9hG4bKgr8NmB1964Hge;received=10.0.0.148. From: "A" <sip:A@10.0.0.148>;tag=gQZc0K4X2gF2D. To: <sip:B@10.0.0.131>;tag=8S8P051IJW30000E1D00001l1RKICZL1UU3V64. Call-ID: 16dfe84a-6945-122e-ad83-0011433127d9. CSeq: 4462259 INVITE. Reason: Q.850;cause=31. Content-Length: 0. And FreeSWITCH is then sending this back to my calling device; SIP/2.0 480 Temporarily Unavailable. Via: SIP/2.0/UDP 10.0.0.140:5060;branch=z9hG4bK26c545d4;rport=5060. From: "A" <sip:A@10.0.0.140>;tag=as246a165b. To: <sip:B@10.0.0.148>;tag=Fe6KyrKt57rFj. Call-ID: 39ae1b6f29920d836099bf6a247c8c63@10.0.0.140. CSeq: 102 INVITE. User-Agent: FreeSWITCH. Accept: application/sdp. Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY. Supported: timer, precondition, path, replaces. Allow-Events: talk, refer. Reason: Q.850;cause=16;text="NORMAL_CLEARING". Content-Length: 0. Remote-Party-ID: "B" <sip:B@10.0.0.148>;party=calling;privacy=off;screen=no. Note the disparity between the two causes in the Reason: header... Ross