]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_pjsip: Add PJSIPHangup dialplan app and manager action
authorGeorge Joseph <gjoseph@sangoma.com>
Tue, 31 Oct 2023 21:08:14 +0000 (15:08 -0600)
committerGeorge Joseph <gjoseph@sangoma.com>
Tue, 7 Nov 2023 16:32:19 +0000 (16:32 +0000)
commitaf7e89ebf82f9d23e1f81c7cc6ec20b4ffdf70e6
treebc64b5d1eec84846f964c2da7a6e13890bb8b0e2
parent19507ae160f796363a7332276c5d5628e2e84b0e
chan_pjsip: Add PJSIPHangup dialplan app and manager action

See UserNote below.

Exposed the existing Hangup AMI action in manager.c so we can use
all of it's channel search and AMI protocol handling without
duplicating that code in dialplan_functions.c.

Added a lookup function to res_pjsip.c that takes in the
string represenation of the pjsip_status_code enum and returns
the actual status code.  I.E.  ast_sip_str2rc("DECLINE") returns
603.  This allows the caller to specify PJSIPHangup(decline) in
the dialplan, just like Hangup(call_rejected).

Also extracted the XML documentation to its own file since it was
almost as large as the code itself.

UserNote: A new dialplan app PJSIPHangup and AMI action allows you
to hang up an unanswered incoming PJSIP call with a specific SIP
response code in the 400 -> 699 range.
channels/chan_pjsip.c
channels/pjsip/dialplan_functions.c
channels/pjsip/dialplan_functions.xml [new file with mode: 0644]
channels/pjsip/include/dialplan_functions.h
include/asterisk/manager.h
include/asterisk/res_pjsip.h
main/manager.c
res/res_pjsip.c