[Asterisk-code-review] app dial: 'I' option to block all connected line updates in ... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Thu Sep 27 16:31:23 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/10286 )

Change subject: app_dial: 'I' option to block all connected line updates in both directions
......................................................................


Patch Set 2:

> > After the channels are bridged, the
 > > connected line updates cannot be blocked.
 > Why?

I have already indicated why you cannot suppress connected line update events after the initial connection.
https://gerrit.asterisk.org/#/c/asterisk/+/9558/

 > 
 > > Besides you can already simulate blocking connected line updates
 > > with the interception routines if you need to by resetting the
 > > party id's back to your preferred values.
 > I can not block connected line updates with the interception
 > routines.
 > Because interception routines is called after connected line
 > information
 > already modified.

You seem to be missing the point of an interception routine.  An interception routine is there so you can modify the connected line information to WHATEVER you want before it gets passed to the channel driver.  Since you want the data to be fixed, you simply have to set it to your fixed information.  You can have that fixed information readily at hand either as routine arguments or in channel variables you setup before the call is placed.  I don't generally recommend database lookups here as the interception routine should be quick.

https://blogs.asterisk.org/2017/03/29/dialplan-handler-routines-allow-customization/

exten = _x.,1,NoOp()
; I supplied all the optional fields for the 'b' predial routine option so you can see what they are.
; Since I put it in the same exten I only really needed to specify the predial label and not CONTEXT and EXTEN.
same = n,Dial(PJSIP/charlie,,b(${CONTEXT}^${EXTEN}^predial(arg1^arg2)))
same = n,Hangup()

same = n(predial),NoOp(ARG1='${ARG1}' ARG2='${ARG2}')
same = n,Set(NAME=charlie_fixed_name)
same = n,Set(NUMBER=charlie_fixed_number)
same = n,Set(CONNECTED_LINE_SEND_SUB=subroutines,colp_fixed,1)
same = n,Set(CONNECTED_LINE_SEND_SUB_ARGS=${NAME},${NUMBER})
same = n,Set(CONNECTEDLINE(name,i)=${NAME})
same = n,Set(CONNECTEDLINE(num)=${NUMBER})
same = n,Return()

[subroutines]
exten = colp_fixed,1,NoOp(ARG1='${ARG1}' ARG2='${ARG2}')
same = n,Set(CONNECTEDLINE(name,i)=${ARG1})
same = n,Set(CONNECTEDLINE(num,i)=${ARG2})
same = n,Return()


-- 
To view, visit https://gerrit.asterisk.org/10286
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I6ce9e151a2220ce9e95aa66666933cfb9e2a4a01
Gerrit-Change-Number: 10286
Gerrit-PatchSet: 2
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Thu, 27 Sep 2018 21:31:23 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180927/ef0dae73/attachment.html>


More information about the asterisk-code-review mailing list