From: Jonathan Rose Date: Thu, 16 Aug 2012 19:05:21 +0000 (+0000) Subject: chan_sip: Use pvt outgoing_call variable to set Remote-Party-ID Header X-Git-Tag: 10.9.0-rc1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3ea90e46a9b7a429faa9feab28aea7e6b8cec8e;p=thirdparty%2Fasterisk.git chan_sip: Use pvt outgoing_call variable to set Remote-Party-ID Header Previously the pvt SIP_OUTGOING flag was used instead, which will frequently flip during reinvites. (closes issue AST-897) Reported by: Thomas Arimont ........ Merged revisions 371357 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@371358 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4b3bf47925..0c7e77c264 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11315,7 +11315,7 @@ static int add_rpid(struct sip_request *req, struct sip_pvt *p) } add_header(req, "P-Asserted-Identity", ast_str_buffer(tmp)); } else { - ast_str_set(&tmp, -1, "\"%s\" ;party=%s", lid_name, lid_num, fromdomain, ast_test_flag(&p->flags[0], SIP_OUTGOING) ? "calling" : "called"); + ast_str_set(&tmp, -1, "\"%s\" ;party=%s", lid_name, lid_num, fromdomain, p->outgoing_call ? "calling" : "called"); switch (lid_pres) { case AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED: