[Freeswitch-users] Altering From Header in SIP Invite

Rob Moore Rob.Moore at Aeriandi.com
Fri Sep 14 15:46:56 MSD 2012


Hi Everyone,

For those who are interested I found a way around this issue. I'm not sure if this is the correct way to produce this result but it worked.

The problem I had was that I could set the Freephone number I wished to  present but the P asserted ID would overwrite this with the other standard number I was attempting to send.

So to resolve the issue I had to disable all CID, use effective_caller_id_number to present my Freephone number (this adds the number to your from header) then I used sip_h_ to add the P-Asserted-Identity manually.

                                <action application="set" data="effective_caller_id_number=+448000000262"/>
                                <action application="export" data="sip_cid_type=none"/>
                                <action application="export" data="sip_h_P-Asserted-Identity= <sip:+445600000262 at fixsipbizzle.org> "/>

Hope this helps anyone else who ever has to provide this unusual setup.

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Rob Moore
Sent: 11 September 2012 19:11
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] Altering From Header in SIP Invite

Hi All,

I'm having a little trouble with 'presentation numbers' with a new provider I'm in IOT with this week.

I'm trying to recreate the following Invite as the calls pass through our dialplan to this provider but there are issues with trying to get a different CLI into the From and P-Asserted-Identity headers.

When presenting a Freephone number (for example) we need to still present the regular number that would be used by this extension in the P-Asserted-Identity whilst passing the number we wish to have presented in the From header.

Currently we are not using Gateways so we cannot resort to using  <param name="caller-id-in-from" value="true"/> (although I expect this won't do what we need in this case) so I've looked at altering the channel variables  sip_from_user,sip_full_from and sip_full_uri using set and export dial plan apps but none of these seem to have any effect so I guess these variables must be read only.

I'm sure this must be simple, but can't for the life of me work out what I need to do.

Below is an extract from an example header from the provider I am trying to recreate, I've also added a copy of the Dialplan extension I am using to test.
If someone can tell me what I'm getting wrong I would really appreciate it.

Thanks

Rob


INVITE sip:+445600005262 at primarysip.barfoo.com;user=phone SIP/2.0
Max-Forwards: 69
Session-Expires: 3600;refresher=uac
Min-SE: 600
Supported: timer, 100rel
To: +445600000262 <sip:+445600005262 at primarysip.barfoo.com;user=phone>
From: <sip:+448000655262 at uk.foo.bar.2.net;user=phone>;tag=12544
P-Asserted-Identity: <sip:+445600655262 at uk.sdin.bt.net>
Call-ID: 1347372978-13100 at mgc-uk-998.n2<mailto:1347372978-13100 at mgc-uk-998.n2>
CSeq: 1 INVITE
Allow: CANCEL, ACK, INVITE, BYE, OPTIONS, INFO, PRACK, UPDATE


DIAL Plan: (attempting +445600655262 in P Asserted-Id and +448000655262 in from) have commented out some things that I have tried.)
If you are worried about [sip_h_X-Gateway=4003:4] this is added to help our SBC forward calls to our different providers.

   <extension name="TC 25">
     <condition field="destination_number" expression="^10125$">
                                <action application="set" data="effective_caller_id_name=_undef_"/>
                                <action application="set" data="effective_caller_id_number=+445600005262 "/>
                                <action application="set" data="dtmf_type=rfc2833"/>
                                <action application="set" data="sip_cid_type=pid"/>
                                <!--<action application="export" data=" sip_from_user =+448000655262"/> -->
                                <!-- <action application="export" data="sip_h_from=<sip:+448000655262 at primarysip.barfoo.com>;tag=${sip_from_tag} "/> -->
                                <!--  <action application="export" data="sip_h_P-Asserted-Identity= +445600005262 <sip:+445600655262 at 172.17.7.4> "/> -->
                                <action application="info"/>
                  <action application="bridge" data="[sip_h_X-Gateway=4003:4]sofia/internal/+442920001199 at pstn.tel<mailto:sofia/internal/+442920001199 at pstn.tel>" />
     </condition>
   </extension>


Rob Moore
Telephony Systems Infrastructure Manager
Aeriandi
Aeriandi Ltd, Prama House, Banbury Road, Oxford, OX27HT
E: rob.moore at aeriandi.com<mailto:rob.moore at aeriandi.com>
W: www.aeriandi.com<http://www.aeriandi.com/>
M: +44 (0)7766 838040
T: +44 (0) 845 108 0308

[Description: Description: Description: Description: Description: Description: Description: Description: cid:image002.png at 01CC9E0C.20153A40]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120914/cc8e5429/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 13903 bytes
Desc: image001.png
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120914/cc8e5429/attachment-0001.png 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list