thank you for you response jcolp
this is my sip.conf file
;sip.conf
[general]
context=public ; Default context for incoming calls. Defaults to 'default’
allowguest=yes ; Allow or reject guest calls (default is yes)
; If your Asterisk is connected to the Internet
; and you have allowguest=yes
; you want to check which services you offer everyone
allowoverlap=yes ; Enable RFC3578 overlap dialing support.
; Can use the Incomplete application to collect the
realm=192.168.754.158 ;mydomain.tld ; Realm for digest authentication
; defaults to “asterisk”. If you set a system name in
; asterisk.conf, it defaults to that system name
; Realms MUST be globally unique according to RFC 3261
; Set this to your host name or domain name
udpbindaddr=0.0.0.0:5060 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
tcpenable=yes ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=192.168.754.158 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
websocket_enabled = true ; Set to false to prevent chan_sip from listening to websockets. This
; is neeeded when using chan_sip and res_pjsip_transport_websockets on
; the same system.
transport=udp,ws,wss ; Set the default transports. The order determines the primary default transport.
; If tcpenable=no and the transport set is tcp, we will fallback to UDP.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; Note: Asterisk only uses the first host
; in SRV records
; Disabling DNS SRV lookups disables the
; ability to place SIP calls based on domain
; names to some other SIP users on the Internet
; Specifying a port in a SIP peer definition or
; when dialing outbound calls will supress SRV
; lookups for that peer or call.
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=ilbc ; see https://wiki.asterisk.org/wiki/display/AST/RTP+Packetization
; for framing options
encryption=yes ; Whether to offer SRTP encrypted media (and only SRTP encrypted media)
; on outgoing calls to a peer. Calls will fail with HANGUPCAUSE=58 if
; the peer does not support SRTP. Defaults to no.
encryption_taglen=80 ; Set the auth tag length offered in the INVITE either 32/80 default 80
avpf=yes ; Enable inter-operability with media streams using the AVPF RTP profile.
force_avp=yes ; Force ‘RTP/AVP’, ‘RTP/AVPF’, ‘RTP/SAVP’, and ‘RTP/SAVPF’ to be used for
; media streams when appropriate, even if a DTLS stream is present.
[6001]
type=friend
;secret=12345
;qualify=200 ; Qualify peer is no more than 200ms away
host=dynamic ; This device registers with us
directmedia=no ; Asterisk by default tries to redirect the
context=play_annc
basic-options ; a template
dtmfmode=rfc2833
context=from-office
type=friend
natted-phone ; another template inheriting basic-options
directmedia=no
host=dynamic
public-phone ; another template inheriting basic-options
directmedia=yes
my-codecs ; a template for my preferred codecs
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=ulaw
; Or, more simply:
;allow=!all,ilbc,g729,gsm,g723,ulaw
ulaw-phone ; and another one for ulaw-only
disallow=all
allow=ulaw
; Again, more simply:
;allow=!all,ulaw