<div><font face="Verdana" size="2">
<div><font face="Verdana" size="2"><span class="641453307-12032010">Hello,</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010"></span></font> </div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">I'm developing a
very simple call-through application using FreeSWITCH, but
currently</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">I'm stuck because
my provider requires me to send a 'P-Asserted-Identity'
header</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">for outgoing calls
if I want so signal an arbitrary caller ID in the 'From'
field.</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010"></span></font> </div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">Setup is as
follows:</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010"> - a-leg comes
in from an external gateway</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010"> - dialplan
dispatches the call to a perl handler script</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010"> - perl script
looks like this (simplified as much as possible for this
description):</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010"></span></font> </div>
<div><font face="Verdana" size="2"><span class="641453307-12032010"> $num =
"02222222";</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">
$session->answer();</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">
$session->setVariable("effective_caller_id_name", "The
Redirector");<br>
$session->setVariable("sip_h_P-Asserted-Identity",
'<<a href="mailto:sip%3A0123456789@q-loud.net">sip:0123456789@q-loud.net</a>>');</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">
$session->execute("bridge",
"sofia/gateway/mygateway/$num);<br><br></span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">The problem is now
that FreeSWITCH correctly insertes a P-Asserted-Identity header
as</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">set in the perl
script. But there is already an existing P-Asserted-Identity header by
default,</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">so I end up with
two of them. This is the outgoing INVITE (b-leg):</span></font></div>
<div><font face="Verdana" size="2"><span class="641453307-12032010"></span></font> </div>
<blockquote dir="ltr" style="margin-right: 0px;">
<div><font face="Verdana" size="2"><span class="641453307-12032010">INVITE
sip:02222222@x.x.x.x SIP/2.0<br>Via: SIP/2.0/UDP
x.x.x.x:5080;rport;branch=z9hG4bKca3KS0cQj121N<br>Max-Forwards: 63<br>From: "The
Redirector" <<a href="mailto:sip%3A01111111@q-loud.net">sip:01111111@q-loud.net</a>>;tag=DBSvZ9NZc750g<br>To:
<sip:02222222@x.x.x.x><br>Call-ID:
ecc19564-a84d-122d-5aa2-00515343ab02<br>CSeq: 128071597 INVITE<br>Contact:
<sip:gw+mygateway@x.x.x.x:5080;transport=udp;gw=mygateway><br>User-Agent:
FreeSWITCH-mod_sofia/1.0.trunk-16952M<br>Allow: INVITE, ACK, BYE, CANCEL,
OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY<br>Supported: timer,
precondition, path, replaces<br>Allow-Events: talk, refer<br>Privacy:
none<br>Content-Type: application/sdp<br>Content-Disposition:
session<br>Content-Length: 244<br>X-Port: 5060<br>X-FS-Support:
update_display<br>P-Asserted-Identity: "The Redirector"
<<a href="mailto:sip%3A01111111@q-loud.net">sip:01111111@q-loud.net</a>><br>P-Asserted-Identity:
<<a href="mailto:sip%3A0123456789@q-loud.net">sip:0123456789@q-loud.net</a>></span></font></div>
<div> </div>
<div><font face="Verdana" size="2"><span class="641453307-12032010">[... sdp
...]</span></font></div></blockquote>
<p class="Section1"><span style="font-size: 10pt; font-family: Verdana;"><span class="641453307-12032010">Numbers are:</span></span></p>
<p class="Section1"><span style="font-size: 10pt; font-family: Verdana;"><span class="641453307-12032010"> 01111111 - the original caller (a-leg &
b-leg From:)<br> 02222222 - the number redirected to (b-leg To:)<br>
0123456789 - the number my provider needs in P-Asserted-Identity
('redirector's number')</span></span></p>
<p class="Section1"><span style="font-size: 10pt; font-family: Verdana;"><span class="641453307-12032010">So, the INVITE is correct, it includes my
P-Asserted-Identity 0123456789<br>line, but unfortunately it already includes
another P-Asserted-Identity 011111111<br>line, and that breaks the setup at my
provider.</span></span></p>
<p class="Section1"><span style="font-size: 10pt; font-family: Verdana;"><span class="641453307-12032010">I really appreciate any help.</span></span></p>
<p class="Section1"><span style="font-size: 10pt; font-family: Verdana;"><span class="641453307-12032010">Greetings,<br>Roland</span></span></p>
<p class="Section1"><span style="font-size: 10pt; font-family: Verdana;"><span class="641453307-12032010">--<br>Roland Haenel<br>QSC AG - <a title="http://www.qsc.de/" href="http://www.qsc.de/">http://www.qsc.de</a></span></span></p>
</font></div>
<div> </div>