PJSIP_HEADER() asterisk Beispiele



Set 'somevar' to the value of the 'To' header.
exten => 1,1,Set(somevar=PJSIP_HEADER(read,To))
Set 'somevar' to the value of the 'From' header. 
exten => 1,1,Set(somevar=PJSIP_HEADER(read,From))
Set 'via2' to the value of the 2nd 'Via' header.
exten => 1,1,Set(via2=PJSIP_HEADER(read,Via,2))
Add an 'X-Myheader' header with the value of 'myvalue'.
exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)
Add an 'X-Myheader' header with an empty value.
exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=)
Update the value of the header named 'X-Myheader' to 'newvalue'.
!!! 'X-Myheader' must already exist or the call will fail !!!
exten => 1,1,Set(PJSIP_HEADER(update,X-MyHeader)=newvalue)
Remove all headers whose names exactly match 'X-MyHeader'.
exten => 1,1,PJSIP_HEADER(remove,X-MyHeader)
Remove all headers that begin with 'X-My'.
exten => 1,1,PJSIP_HEADER(remove,X-My*)
Remove all previously added headers.
exten => 1,1,PJSIP_HEADER(remove,*)