From b56f61185641d06e10105b6e5444e3fcccbe6616 Mon Sep 17 00:00:00 2001 From: Rusty Newton Date: Fri, 27 May 2016 12:25:55 -0500 Subject: res_pjsip: Add clarifying documentation to PJSIP_HEADER help text Added notes about when you can read or write headers. Specifically about being able to read on the inbound channel and write on an outbound channel. ASTERISK-26063 #close Reported by: Private Name Tested by: Rusty Newton Change-Id: Ibeb64af17d1f6451028b3c29855a3f151a01d8c5 --- res/res_pjsip_header_funcs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/res/res_pjsip_header_funcs.c b/res/res_pjsip_header_funcs.c index 7d164b12a..648f1c860 100644 --- a/res/res_pjsip_header_funcs.c +++ b/res/res_pjsip_header_funcs.c @@ -39,7 +39,8 @@ /*** DOCUMENTATION - Gets, adds, updates or removes the specified SIP header from a PJSIP session. + Gets headers from an inbound PJSIP channel. Adds, updates or removes the + specified SIP header from an outbound PJSIP channel. @@ -75,6 +76,10 @@ + PJSIP_HEADER allows you to read specific SIP headers from the inbound + PJSIP channel as well as write(add, update, remove) headers on the outbound + channel. One exception is that you can read headers that you have already + added on the outbound channel. Examples: ; ; Set 'somevar' to the value of the 'From' header. @@ -120,7 +125,7 @@ If you call PJSIP_HEADER in a normal dialplan context you'll be operating on the caller's (incoming) channel which - may not be what you want. To operate on the callee's (outgoing) + may not be what you want. To operate on the callee's (outgoing) channel call PJSIP_HEADER in a pre-dial handler. Example: ; -- cgit v1.2.3