Jonas Kellens
2014-Sep-02 08:03 UTC
[asterisk-users] Custom SIP-header not present in call Asterisk to Asterisk
Hello, I have a situation where a call comes in to my Asterisk server B. This call comes from another Asterisk server A. I want to tell to this server A why my server B hangs up. So just before hanging up, I add a custom SIP-header : exten => s,n,SIPAddHeader(X-My-Hangup: MaxChan) exten => s,n,Hangup() But I notice that this extra SIP-header is not send within the SIP-reponse : SIP/2.0 603 Declined Via: SIP/2.0/UDP xx.xx.xx.98:5060;branch=z9hG4bK168884d7;received=xx.xx.xx.98;rport=5060 From: "5006" <sip:5006 at xx.xx.xx.98>;tag=as50c98b4c To: <sip:0419 at xx.xx.xx.238>;tag=as3c6e57b0 Call-ID: 6d1039bb22716c6e6dec69fb3e78a8d7 at xx.xx.xx.98:5060 CSeq: 102 INVITE Server: myasterisk Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces, timer Content-Length: 0 How can I make this work ? Thanks. Jonas. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140902/baf7de09/attachment.html>
Steven Howes
2014-Sep-02 09:34 UTC
[asterisk-users] Custom SIP-header not present in call Asterisk to Asterisk
On 2 Sep 2014, at 09:03, Jonas Kellens <jonas.kellens at telenet.be> wrote:> So just before hanging up, I add a custom SIP-header : > > exten => s,n,SIPAddHeader(X-My-Hangup: MaxChan) > exten => s,n,Hangup()SIPAddHeader only works for INVITE as far as I know. Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140902/e4626c80/attachment.html>
Eric Wieling
2014-Sep-02 12:22 UTC
[asterisk-users] Custom SIP-header not present in call Asterisk to Asterisk
Try Hangup(123) where 123 is whatever "hangup cause" you want to send back to the caller. The calliing Asterisk server will get the valuse back in HANGUPCAUSE variable. From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jonas Kellens Sent: Tuesday, September 02, 2014 8:03 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Custom SIP-header not present in call Asterisk to Asterisk Hello, I have a situation where a call comes in to my Asterisk server B. This call comes from another Asterisk server A. I want to tell to this server A why my server B hangs up. So just before hanging up, I add a custom SIP-header : exten => s,n,SIPAddHeader(X-My-Hangup: MaxChan) exten => s,n,Hangup() But I notice that this extra SIP-header is not send within the SIP-reponse : -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140902/2130a86c/attachment.html>