Server name is hidden for safety.
I am trying to make a call to an external server. I have not much experience in asterisk.
- I have created my own sip server using asterisk.
- So I am using sip.js to make a call. I am able to pass a custom header when making a call through sip.js.
- But as I am calling a number which is registered with another server (test.server), I have to forward the sip invite coming from sip.js to the external server
exten => 1000,5,Dial(PJSIP/1000@external-outbound,30)
. - But I am unable to send the custom header when forwarding the call.
This is in the default context of the extensions.conf module.
exten => 1000,1,NoOp(Outgoing call to external domain: ${EXTEN})
exten => 1000,2,Set(LANGUAGE_HEADER=35)
exten => 1000,3,NoOp(Language Header Value: ${LANGUAGE_HEADER})
exten => 1000,4,Set(PJSIP_HEADER(add,x-test-language)=${LANGUAGE_HEADER})
exten => 1000,5,Dial(PJSIP/1000@external-outbound,30)
And this is the endpoint external-outbound
, to which the call is routed through.
[external-outbound]
type=endpoint
context=default
disallow=all
allow=ulaw,alaw
direct_media=no
rewrite_contact=yes
force_rport=yes
rtp_symmetric=yes
media_encryption=no
aors=external-outbound
trust_id_inbound=yes
trust_id_outbound=yes
set_var=PJSIP_HEADER(add,x-test-language)="35"
[external-outbound]
type=aor
contact=sip:test.server
remove_existing=yes
Can someone help ?