[asterisk-dev] Peer callingpres - not used when we make SIP Outdial
Matthew Jordan
mjordan at digium.com
Wed Jul 9 17:30:12 CDT 2014
On Wed, Jul 9, 2014 at 4:34 PM, bala murugan <fightwithme at gmail.com> wrote:
> Hi ,
>
> I tried to set the parameter value callingpres and tried making outdial
> to the same peer , but the value we set to this parameter is never getting
> used when make an outdial and looked at the code and it is never getting
> used in the outdial portion , not sure if this is a BUG . I tried this on
> asterisk 11.3.0 .
>
> Kindly advise if this is a known bug
>
The 'callingpres' value is not terribly well defined, other than the following:
{quote}
;callingpres=allowed_passed_screen ; Set caller ID presentation
; See function CALLERPRES
documentation for possible
; values.
{quote}
The current behaviour is to not use the callingpres value configured
on a peer for outbound calls. Instead, the presentation used for the
outbound call is derived from the presentation settings set up on the
calling party:
static int sip_call(struct ast_channel *ast, const char *dest, int timeout)
...
p->callingpres = ast_party_id_presentation(&ast_channel_caller(ast)->id);
...
/* Supply initial connected line information if available. */
memset(&update_connected, 0, sizeof(update_connected));
ast_party_connected_line_init(&connected);
if (!ast_strlen_zero(p->cid_num)
|| (p->callingpres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED) {
update_connected.id.number = 1;
connected.id.number.valid = 1;
connected.id.number.str = (char *) p->cid_num;
connected.id.number.presentation = p->callingpres;
}
if (!ast_strlen_zero(p->cid_name)
|| (p->callingpres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED) {
update_connected.id.name = 1;
connected.id.name.valid = 1;
connected.id.name.str = (char *) p->cid_name;
connected.id.name.presentation = p->callingpres;
}
This makes some sense when you consider connected line: what we show
the connected party would be determined to some extent on what the
calling party wanted to show parties they connected to.
So is this a bug? Probably depends on your interpretation on what
should be given preference: the calling party's preferences, or what
you have configured on the peer of the party being called. Asterisk's
preference today is to use the calling party's preferences in such a
scenario.
I wouldn't classify it as a bug; probably just not the behaviour you wanted.
OTOH, I'm willing for someone more knowledgeable about party
identification and privacy settings to throw out a counter argument
here...
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-dev
mailing list