[Freeswitch-users] Altering From Header in SIP Invite

Michael Collins msc at freeswitch.org
Fri Sep 14 20:38:44 MSD 2012


Without throwing the provider under the bus it might be good to document
this as a "known issue with a workaround." We would just need to add a
provider page and link it here:
http://wiki.freeswitch.org/wiki/SIP_Provider_Examples

Thanks!
-MC

On Fri, Sep 14, 2012 at 4:46 AM, Rob Moore <Rob.Moore at aeriandi.com> wrote:

>  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****
>
> *CSeq:* 1 INVITE****
>
> *Allow:* CANCEL, ACK, INVITE, BYE, OPTIONS, INFO, PRACK, UPDATE****
>
> ** **
>
> ** **
>
> DIAL Plan: (attempting +445600655262 in P Asserted-Id and +448000655262in 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" /> **
> **
>
>      </condition>****
>
>    </extension> ****
>
> ** **
>
> ** **
>
> Rob Moore****
>
> Telephony Systems Infrastructure Manager****
>
> *Aeriandi*
>
> Aeriandi Ltd, Prama House, Banbury Road, Oxford, OX27HT ****
>
> E: rob.moore at aeriandi.com**
>
> W: www.aeriandi.com
> M: +44 (0)7766 838040**
>
> T: +44 (0) 845 108 0308****
>
> ** **
>
> [image: Description: Description: Description: Description: Description:
> Description: Description: Description: cid:image002.png at 01CC9E0C.20153A40]
>      ****
>
> ** **
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>


-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120914/8268c5b6/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 13903 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120914/8268c5b6/attachment-0001.png 


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