[Serusers] Modifying "From" header field of an INVITE message

John Todd jtodd at loligo.com
Sun Feb 6 17:44:36 CET 2005


Asterisk Operational Note:
   From Asterisk, try something similar to this:

exten => _1XXXXXXXXXX.,1,SetCIDNum(+1${CALLERIDNUM})
exten => _1XXXXXXXXXX.,n,Dial(SIP/+${EXTEN}@ser.mydomain.com)

   This assumes you have ten digit North American caller ID digits, 
and that you need to hand numbers to Level3 like "+13015551212" for 
both ANI and DNIS.


SER Development/Usage Note:
   While I agree that changing the "From:" is generally a bad idea, 
there certainly are instances in which is is a desirable thing for a 
SIP proxy to do.  The instance below is a good example.  Other 
examples are when the recommended privacy options are not used, so 
despite privacy settings elsewhere in the headers the "true" Caller 
ID is shown on the remote side.  The only way to avoid this would be 
to not include the origin AOR on the outbound call.  Of course, to 
process replies correctly, it may be necessary to mangle the headers 
in the inverse manner on the way back in... but that level of voodoo 
is left to the administrator.

   I agree that a b2bua is a way to do this - it may be necessary to 
keep state in that manner.  (specific note: Asterisk _is_ a glorified 
b2bua.)  However, it seems natural that all headers should be subject 
to modification if required within the proxy - not always is it 
required to keep state, as in this case.  Is it truly the case that 
SER does not allow re-formatting of the From: header in any way?

JT


At 4:46 PM -0800 on 2/5/05, <scm-j at nuntius.com> wrote:
>Yes, it is level3.
>
>I would prefer not to change the SER source as I would need to patch in
>the change every time I upgrade to a new version of SER. Besides, my
>other SIP  vendors do not require it.
>
>Would a B2BUA, such as Vovida be a good choice? Or, preferably, since I
>am already using Asterisk, and the INVITE is initiated by Asterisk (to
>SER to Level-3), is there a way to have Asterisk format the "From" in
>E.164 format ?
>
>Thanks..
>
>SCM
>
>-----Original Message-----
>From: Greg Fausak [mailto:lgfausak at gmail.com]
>Sent: Saturday, February 05, 2005 3:33 PM
>To: scm-j at nuntius.com
>Cc: serusers at lists.iptel.org
>Subject: Re: [Serusers] Modifying "From" header field of an INVITE
>message
>
>Is it Level3?
>
>The From: cannot be changed.
>
>The identifier for the dialog is the From, To and CallID.  None
>can be changed.  Only the RURI (request URI) can be changed by SER.
>
>Do you have the ability to go all the way to the source and change
>the initial request?  That would be easiest.  Other solutions would
>require
>a b2bua.
>
>-g
>
>On Sat, 5 Feb 2005 11:58:05 -0800, scm-j at nuntius.com <scm-j at nuntius.com>
>wrote:
>> 
>> 
>>
>>  I am relatively new to SER. My SIP service provider requires me to
>present
>>  the ANI in the "From" field in my INVITE message header in E.164
>format. I
>>  am currently sending this information as follows:
>>
>>  
>>
>>  From: "2125551212" <sip:2125551212 at xxx.xxx.xxx.xxx>
>>
>>  
>>
>>  They want it in E.164 format as follows:
>>
>>  
>>
>>  From: "+12125551212" <sip:+12125551212 at xxx.xxx.xxx.xxx>
>>
>>  
>>
>>  I see function only to modify the SIP URI but not the other header or
>SDP
>>  fields.
>>
>>  
>>
>>  Could someone help me with a code snippet that I can use in ser.cfg to
>do
>>  this conversion?
>>
>>  
>>
>>  Regards,
>>
>>  SCM
>>
>>  
>>
>>  
>>
>>  
>>  _______________________________________________
>>  Serusers mailing list
>>  serusers at lists.iptel.org
>>  http://lists.iptel.org/mailman/listinfo/serusers
>>
>>
>>
>
>
>--
>Greg Fausak
>greg at addabrand.com
>
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list