Hi, If you want to manually add the P-Asserted-Identity header, you must first set sip_cid_type to none. Or you could just set effective_caller_id_number to the number that should show up in PAI. Mathieu Rene Avant-Garde Solutions Inc Office: + 1 (514) 664-1044 x100 Cell: +1 (514) 664-1044 x200 mrene@avgs.ca On 13-Mar-10, at 3:38 PM, Roland Hänel wrote:
Hello,
I'm developing a very simple call-through application using FreeSWITCH, but currently I'm stuck because my provider requires me to send a 'P-Asserted- Identity' header for 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 as set 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