Hi all, I already asked ChatGPT for this help. Because the trunk provider need the “TO” information required the phone number for register the trunk
I also tried your suggest:
[vnpt-context]
exten => s,1,NoOp(Sending custom SIP OPTIONS)
same => n,SIP_HEADER(remove,To)
same => n,Set(SIP_HEADER(To)=<sip:024385XXXXX@14.238.X.XXX>)
same => n,Set(SIP_HEADER(From)="Vedax" <sip:024385XXXXX@14.248.XX.XX>)
same => n,Dial(SIP/${EXTEN}@VNPT)
same => n,Hangup()
[vnpt]
exten => s,1,NoOp(Sending custom SIP OPTIONS with modified To header)
same => n,SipAddHeader(To: <sip:024385XXXXX@14.238.X.XXX>)
same => n,Dial(SIP/${EXTEN}@VNPT)
same => n,Hangup()
But still the same:
Here is my sip config
root@vedax:/etc/asterisk# cat sip_general_additional.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
vmexten=*97
useragent=FPBX-15.0.37.9(17.9.3)
language=en
disallow=all
allow=alaw
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
limitonpeers=yes
rtpend=20000
context=from-sip-external
callerid=Unknown
rtpstart=10000
tcpenable=no
callevents=no
jbenable=no
checkmwi=10
maxexpiry=3600
minexpiry=60
srvlookup=yes
tlsenable=no
allowguest=yes
notifyhold=yes
rtptimeout=30
canreinvite=no
tlsbindaddr=[::]:5161
rtpkeepalive=0
videosupport=no
defaultexpiry=120
notifyringing=yes
maxcallbitrate=384
rtpholdtimeout=300
g726nonstandard=no
registertimeout=20
tlsclientmethod=tlsv1
registerattempts=0
tlsdontverifyserver=yes
nat=force_rport,comedia
ALLOW_SIP_ANON=no
udpbindaddr=0.0.0.0:5160
tlscafile=/etc/ssl/certs/ca-certificates.crt
externip=14.248.XX.XX
localnet=192.168.1.0/24
Here is the trunk config:
root@vedax:/etc/asterisk# cat sip_additional.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
[VNPT]
type=friend
context=vnpt
port=5060
host=14.238.X.XXX
qualify=yes
fromuser=024385XXXXX
fromdomain=14.248.XX.XX
Here is the SNGREP information, because the “TO” is not valid, so the trunk does not response(This is what the Trunk provider explain to me)
Please let me know what I need to do