SIP Header not added


I’m trying to set up a IVR that adds headers to the SIP connection. I’m calling extension 100 and 100 should receive an additional SIP header.
My application (jitsi) doesn’t seem to respect that header so I fired up tcpdump and analyzed it in wireshark.
I can’t seem to find the header in the packets though, am I looking in the right place?

This is how my /etc/asterisk/extensions_override_freepbx.conf looks:

exten => 100,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/100/ringtimer)}" > "0"]?${DB(AMPUSER/100/ringtimer)}:${RINGTIMER_DEFAULT})})
exten => 100,n,Read(Pin,"de_DE/confbridge-pin")
exten => 100,n,Verbose(result is: ${Pin})
exten => 100,n,AGI(,${Pin})
exten => 100,n,Verbose(result is: ${JITSI})
exten => 100,n,SIPAddHeader(Jitsi-Conference-Room: ${JITSI})
exten => 100,n,Macro(exten-vm,novm,100,0,0,0)
exten => 100,n,(dest),Set(__PICKUPMARK=)
exten => 100,n,Goto(${IVR_CONTEXT},return,1)
exten => 100,hint,SIP/100&Custom:DND100,CustomPresence:100

The JITSI Variable does have a value, it appears in the log:

Could someone help me out here? Thank you in advance!

You’re using SipAddHeader which only supports chan_sip. You want to leverage the built in subroutines for adding headers, they’re channel driver agnostic:

exten => 100,n,GoSub(func-set-sipheader,s,1(Jitsi-Conference-Room,${JITSI}))

Once you confirm the above works, then you want to eliminate using the override file, and instead use a hook: Hooking for fun and income


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.