Sip Cause And Response Codes In Dialplan
–_000_HE1PR0601MB26178F7B8EA230E7B91E5FBC89CF0HE1PR0601MB2617_
Content-Type: text/plain; charset=”iso-8859-1″
Content-Transfer-Encoding: quoted-printable
Hi,
I am experimenting with getting hold of the sip cause and sip response from outgoing call. How could i make a userevent printing the sip cause and/or sip response. I have tried using hangupcause, sip_cause and such , but i am not getting any data.
I would at least like to use the q.850 reason codes in the dialplan which i now am unable to do.
Any help appreciated.
[Beskrivning: Fogwise – logotype]
Marcus Kvarsell phone: +46766350384
e-mail: marcus@fogwise.se url: http://www.fogwise.se Like us on facebook: https://www.facebook.com/WiseDialer
Follow us on LinkedIn https://www.linkedin.com/company/fogwise-ab FOGWISE AB
Fleminggatan 2
SE-602 24 Norrk
2 thoughts on - Sip Cause And Response Codes In Dialplan
You don’t say which version of Asterisk you’re using, so I can’t guarantee that the following will work for you, but I got this to work using Asterisk
11.13.1:
In sip.conf, under the [general] stanza, define:
storesipcause=yes
You will get a warning to use hangupcause instead, but I haven’t got that to do the same thing, so it’s no substitute, I think.
Then, in your Dial() command, use M() to call a macro when the call gets answered. https://www.voip-info.org/wiki/view/Asterisk+cmd+Dial
In the macro definition, you can use ${HASH(SIP_CAUSE,${CDR(channel)})} to get the SIP response code. It returns values such as “SIP 200 OK”.
Hope that helps,
Antony.
Hi, i am using asterisk 15, and thank you very much for your insights. I will definately try this.
/ Marcus
—–Ursprungligt meddelande—