Set Contact SIP headers from extensions.conf

Hi all,

I’ve got a problem using the extensions.conf and pjsip.conf
I’d like to set the Contact headers into the SIP INVITE of my endpoint dynamically.
I’ve tried to play with contact_user but I can’t set it into my entensions.conf.
Is there a possibility to set this parameter into the extensions.conf file ?
Or pass a variable from the extensions.conf to the pjsip.conf to set it ?

exten => _06XXXXXXXX,n,Dial(PJSIP/default_endpoint/sip:${EXTEN}@


There is no ability to configure such a thing from the dialplan explicitly. The only dynamic way is to enable the option to use callerid for Contact, and set the callerid.

Why? Nothing except the sending Asterisk should care about what is in the Contact header. Even contact_user sounds like it is a work round for broken peers.

Thanks for your quick reply !
I’ve tried to play with CALLERID, but I can’t change the Contat Sip Herders ….
example : exten => _06XXXXXXXX,n,Set(CALLERID(contact)=TEST)

You can’t set the contact like that. The option uses the callerid number[1].


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