login | register
Sun 07 of Sep, 2008 [07:41 UTC]

voip-info.org

Discuss [0] History

Asterisk func sip_header

Created by: murf,Last modification on Sun 08 of Jul, 2007 [22:46 UTC] by JustRumours

Synopsis

 Gets the specified SIP header

Description

 SIP_HEADER(<name>)

Notes

  • This function may only be read from
  • CLI> show function SIP_HEADER

Return value

Returns the resulting string.

Example 1:


 exten => s,1,Set(foo=${SIP_HEADER(headername)})

Example2:


 exten => +49123456789,1,Set(DN=${SIP_HEADER(TO):5})
 exten => +49123456789,2,Set(DN=${CUT(DN,@,1)}) 

Example 3:


To get Ip address of From:

 ${SIP_HEADER(FROM)}

Bugs and limitations

  • Contrary to previously claimed,SIP_HEADER is read-only.
This example does "not" work!
 exten => s,1,Set(SIP_HEADER(headername)=Foo Fighters)


See also




Comments