<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">The answer to this is actually pretty
simple: adding Referred-By in outgoing SIP REFERs is simply not
implemented in chan_pjsip's chan_pjsip_transfer() function.<br>
<br>
As far as the syntax required for the Transfer() application,
that's probably a case where that needs to be clarified in
documentation. There are lots of places in PJSIP configuration
where we require full SIP URIs rather than just IP addresses or
bare URIs (user@domain).<br>
<br>
On 08/25/2015 10:00 AM, Dan Cropp wrote:<br>
</div>
<blockquote
cite="mid:09CB4F1B52EDEE40A8CD0772960C106E01450D2763@Mail2010.amtelco.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">I asked the question on asterisk–users but
did not receive a response, so I am sending the question here.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am running Asterisk 13.5.0.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">A call comes in, Asterisk answers it.
After some actions, the call needs to be Transferred (SIP
REFER) to another number. The other switch is responsible for
accepting the Transfer and tromboning the lines internally.
It will also send a BYE so Asterisk no longer has the call.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The behavior works when I have the endpoint
configured at chan_sip. It does not work when the endpoint is
configured as PJSIP. I worked with the other switch vendor
and he determined chan_sip includes the Referred-By header.
PJSIP does not include the Referred-By header. The other
switch requires the Referred-By header to be present.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I tried setting the channel’s
SIPREFERREDBYHDR variable before the Transfer command and that
still did not force the Referred-By header to be part of the
REFER packet.<o:p></o:p></p>
<p class="MsoNormal">I tried the PJSIP_HEADER add and it still
did not add the Referred-By header to the REFER packet.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there a PJSIP setting to force the
Referred-By to be part of the REFER packet?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">chan_sip (succeeds)<o:p></o:p></p>
<p class="MsoNormal">19:27:32.512123 IP (tos 0x0, ttl 64, id
11492, offset 0, flags [none], proto UDP (17), length 630)<o:p></o:p></p>
<p class="MsoNormal"> 192.168.xxx.xxx.sip >
192.168.yyy.yyy.sip: SIP, length: 602<o:p></o:p></p>
<p class="MsoNormal"> REFER <a moz-do-not-send="true"
href="sip:3400@192.168.yyy.yyy:5060">sip:3400@192.168.yyy.yyy:5060</a>
SIP/2.0<o:p></o:p></p>
<p class="MsoNormal"> Via: SIP/2.0/UDP
192.168.xxx.xxx:5060;branch=z9hG4bK58f4bd1d<o:p></o:p></p>
<p class="MsoNormal"> Max-Forwards: 70<o:p></o:p></p>
<p class="MsoNormal"> From: <<a moz-do-not-send="true"
href="sip:3344@192.168.xxx.xxx">sip:3344@192.168.xxx.xxx</a>>;tag=as44000cf4<o:p></o:p></p>
<p class="MsoNormal"> To: <<a moz-do-not-send="true"
href="sip:3400@192.168.yyy.yyy">sip:3400@192.168.yyy.yyy</a>>;tag=7Iy0JkwDC<o:p></o:p></p>
<p class="MsoNormal"> Contact: <<a
moz-do-not-send="true" href="sip:3344@192.168.xxx.xxx:5060">sip:3344@192.168.xxx.xxx:5060</a>><o:p></o:p></p>
<p class="MsoNormal"> Call-ID: <a moz-do-not-send="true"
href="mailto:jdEuqpAK-0002-@192.168.yyy.yyy">jdEuqpAK-0002-@192.168.yyy.yyy</a><o:p></o:p></p>
<p class="MsoNormal"> CSeq: 102 REFER<o:p></o:p></p>
<p class="MsoNormal"> User-Agent: Asterisk PBX 13.5.0<o:p></o:p></p>
<p class="MsoNormal"> Date: Thu, 20 Aug 2015 19:27:32 GMT<o:p></o:p></p>
<p class="MsoNormal"> Refer-To: <<a
moz-do-not-send="true" href="sip:370@192.168.yyy.yyy">sip:370@192.168.yyy.yyy</a>><o:p></o:p></p>
<p class="MsoNormal"> Referred-By: <<a
moz-do-not-send="true" href="sip:3344@192.168.xxx.xxx:5060">sip:3344@192.168.xxx.xxx:5060</a>><o:p></o:p></p>
<p class="MsoNormal"> Allow: INVITE, ACK, CANCEL,
OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE<o:p></o:p></p>
<p class="MsoNormal"> Supported: replaces, timer<o:p></o:p></p>
<p class="MsoNormal"> Content-Length: 0<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Pjsip<o:p></o:p></p>
<p class="MsoNormal">18:46:58.386372 IP (tos 0x0, ttl 64, id
38690, offset 0, flags [DF], proto UDP (17), length 654)<o:p></o:p></p>
<p class="MsoNormal"> 192.168.xxx.xxx.sip >
192.168.yyy.yyy.sip: SIP, length: 626<o:p></o:p></p>
<p class="MsoNormal"> REFER <a moz-do-not-send="true"
href="sip:3400@192.168.yyy.yyy:5060">sip:3400@192.168.yyy.yyy:5060</a>
SIP/2.0<o:p></o:p></p>
<p class="MsoNormal"> Via: SIP/2.0/UDP
192.168.xxx.xxx:5060;rport;branch=z9hG4bKPjec41c3b9-d734-482d-82c1-2a6f8d9452a3<o:p></o:p></p>
<p class="MsoNormal"> From: <<a moz-do-not-send="true"
href="sip:3344@192.168.xxx.xxx">sip:3344@192.168.xxx.xxx</a>>;tag=3c10f423-e468-42ea-87a1-658ae106581c<o:p></o:p></p>
<p class="MsoNormal"> To: <<a moz-do-not-send="true"
href="sip:3400@192.168.yyy.yyy">sip:3400@192.168.yyy.yyy</a>>;tag=WITKDakt<o:p></o:p></p>
<p class="MsoNormal"> Contact: <<a
moz-do-not-send="true" href="sip:192.168.xxx.xxx:5060">sip:192.168.xxx.xxx:5060</a>><o:p></o:p></p>
<p class="MsoNormal"> Call-ID: <a moz-do-not-send="true"
href="mailto:s6Wk6l6Q-0001-@192.168.yyy.yyy">s6Wk6l6Q-0001-@192.168.yyy.yyy</a><o:p></o:p></p>
<p class="MsoNormal"> CSeq: 981 REFER<o:p></o:p></p>
<p class="MsoNormal"> Event: refer<o:p></o:p></p>
<p class="MsoNormal"> Expires: 600<o:p></o:p></p>
<p class="MsoNormal"> Supported: 100rel, timer, replaces,
norefersub<o:p></o:p></p>
<p class="MsoNormal"> Accept: message/sipfrag;version=2.0<o:p></o:p></p>
<p class="MsoNormal"> Allow-Events: message-summary,
presence, dialog, refer<o:p></o:p></p>
<p class="MsoNormal"> Refer-To: <<a
moz-do-not-send="true" href="sip:370@192.168.yyy.yyy">sip:370@192.168.yyy.yyy</a>><o:p></o:p></p>
<p class="MsoNormal"> Max-Forwards: 70<o:p></o:p></p>
<p class="MsoNormal"> User-Agent: Asterisk PBX 13.5.0<o:p></o:p></p>
<p class="MsoNormal"> Content-Length: 0<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">One other slight oddity.<o:p></o:p></p>
<p class="MsoNormal">To get chan_sip to Transfer<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"><a
moz-do-not-send="true" href="mailto:370@192.168.yyy.yyy">370@192.168.yyy.yyy</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">To get PJSIP to
Transfer with the correct Refer-To header, I had to include
the <> and sip:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#4F81BD"><<u><a
moz-do-not-send="true" href="sip:370@192.168.yyy.">sip:370@192.168.yyy.</a></u></span><u><span
style="color:#1F497D">yyy</span></u><span
style="color:#4F81BD">><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Have a great day!<o:p></o:p></p>
<p class="MsoNormal">Dan<o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>