[asterisk-users] modify from field sip headers

Adrian Serafini wealwildwon at wombit.com
Tue Mar 18 12:01:05 CDT 2014


> Im trying to modify the 'From' field in my sip headers in order to
> include extra info (user=tel) as it follows:

The default extensions.conf has this, it might help.

;-------------------------------------------------------------------------------
; from-pstn-to-did
;
; The context is designed for providers who send the DID in the TO: SIP 
header
; only. The format of this header is:
;
; To: <sip:2125551212 at 172.31.74.25>
;
; So the DID must be extracted between the sip: and the @, which this does
;
[from-pstn-toheader]
exten => _.,1,Goto(from-pstn,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
;-------------------------------------------------------------------------------




More information about the asterisk-users mailing list