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