And there is SIP line is terminated on the asterisk server. And i have routed the call to my dialplan for ringing and play voicefile. Below is my dialplan
While executing this dialplan if the person who call on the number they will able to hear the Voicefile but if the person speak anything then the voicefile is breaking or going silent.
The same dialplan if i comment the lines for ringing as below then there is no issue.
All Ringing does is to cause Asterisk to give an intermediate SIP response of 180 Ringing. The Playback will cause a final 200 OK response. I would look to the peer for the source of the problem.
when i remove the Ringing application from dial plan there is no issue…
Below is the SIP Trunk Details.
[general]
context=trunkinbound ; Default context for incoming calls
allowguest=no ; Allow or reject guest calls (default is yes, this can also be set to ‘osp’
;realm=mydomain.tld ; Realm for digest authentication
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;domain=mydomain.tld ; Set default domain for this host
;domain=mydomain.tld,mydomain-incoming
;domain=1.2.3.4 ; Add IP address as local domain
;allowexternalinvites=no ; Disable INVITE and REFER to non-local domains
;autodomain=yes ; Turn this on to have Asterisk add local host
;pedantic=yes ; Enable slow, pedantic checking for Pingtel
;tos=184 ; Set IP QoS to either a keyword or numeric val
tos=lowdelay ; lowdelay,throughput,reliability,mincost,none
maxexpiry=3600 ; Max length of incoming registration we allow
defaultexpiry=120 ; Default length of incoming/outgoing registration
;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
;checkmwi=10 ; Default time between mailbox checks for peers
;vmexten=voicemail ; dialplan extension to reach mailbox sets the
;videosupport=yes ; Turn on support for SIP video
;recordhistory=yes ; Record SIP history by default
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=alaw ; Allow codecs in order of preference
allow=gsm ;
musicclass=default ; Sets the default music on hold class for all SIP calls
language=en ; Default language setting for all users/peers
relaxdtmf=yes ; Relax dtmf handling
rtptimeout=60 ; Terminate call if 60 seconds of no RTP activity
;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP activity
trustrpid=no ; If Remote-Party-ID should be trusted
sendrpid=yes ; If Remote-Party-ID should be sent
progressinband=no ; If we should generate in-band ringing always
;useragent=Asterisk PBX ; Allows you to change the user agent string
promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address
;usereqphone = no ; If yes, “;user=phone” is added to uri that contains
dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
;compactheaders = yes ; send compact sip headers.
;sipdebug = yes ; Turn on SIP debugging by default, from
;subscribecontext = default ; Set a specific context for SUBSCRIBE requests
;notifyringing = yes ; Notify subscriptions on RINGING state
;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected,
;regcontext=sipregistrations
;registertimeout=20 ; retry registration calls every 20 seconds (default)
;registerattempts=10 ; Number of registration attempts before we give up
callevents=no ; generate manager events when sip ua performs events (e.g. hold)
;externip = 192.168.1.1 ; Address that we’re going to put in outbound SIP messages
;externhost=foo.dyndns.net ; Alternatively you can specify an
;externrefresh=10 ; How often to refresh externhost if
localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
localnet=10.0.0.0/255.0.0.0 ; Also RFC1918
localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation
localnet=169.254.0.0/255.255.0.0 ;Zero conf local network
nat=yes ; Global NAT settings (Affects all peers and users)
canreinvite=no
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
;rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
;ignoreregexpire=yes ; Enabling this setting has two functions:
; domain=myasterisk.dom
; domain=customer.com,customer-context
; autodomain=yes
; fromdomain=mydomain.tld ; When making outbound SIP INVITEs to
Logs are looking normal only …there is no error or warning while facing the issue.
Below is sample Logs for your reference.
Scenario 1 : Where facing the Voice Breaking issue while using the Ringing Application.
-- Executing [789789@trunkinbound:1] Goto("SIP/MY-sip-trunk-00000474", "trunkinbound,789787,1") in new stack
-- Goto (trunkinbound,789787,1)
-- Executing [789787@trunkinbound:1] Ringing("SIP/MY-sip-trunk-00000474", "") in new stack
-- Executing [789787@trunkinbound:2] Playback("SIP/MY-sip-trunk-00000474", "/home/local/CORPORATE/vijo/clubwav") in new stack
> 0x7f05d00211e0 -- Probation passed - setting RTP source address to 10.100.10.100:35568
-- <SIP/MY-sip-trunk-00000474> Playing '/home/local/CORPORATE/vijo/clubwav.slin' (language 'en')
asteriskCLI>
asteriskCLI>
asterisk*CLI>
> 0x7f05d0000910 – Probation passed - setting RTP source address to 192.168.50.5:13866
== Spawn extension (trunkinbound, 789787, 2) exited non-zero on ‘SIP/MY-sip-trunk-00000474’
– Executing [h@trunkinbound:1] AGI(“SIP/MY-sip-trunk-00000474”, “agi://127.0.0.1:4577/call_log–HVcauses–PRI-----NODEBUG-----0---------------”) in new stack
Scenario 2 : Where Not facing any Voice Breaking issue while not using the Ringing Application.
– Executing [789789@trunkinbound:1] Goto(“SIP/MY-sip-trunk-00000475”, “trunkinbound,789787,1”) in new stack
– Goto (trunkinbound,789787,1)
– Executing [789787@trunkinbound:1] Playback(“SIP/MY-sip-trunk-00000475”, “/home/local/CORPORATE/vijo/clubwav”) in new stack
> 0x7f05d0000910 – Probation passed - setting RTP source address to 10.100.10.100:31444
– <SIP/MY-sip-trunk-00000475> Playing ‘/home/local/CORPORATE/vijo/clubwav.slin’ (language ‘en’)
== Manager ‘sendcron’ logged on from 127.0.0.1
== Manager ‘sendcron’ logged off from 127.0.0.1
== Manager ‘sendcron’ logged on from 127.0.0.1
== Manager ‘sendcron’ logged off from 127.0.0.1
== Manager ‘sendcron’ logged on from 127.0.0.1
== Manager ‘sendcron’ logged off from 127.0.0.1
== Spawn extension (trunkinbound, 789787, 1) exited non-zero on ‘SIP/MY-sip-trunk-00000475’
– Executing [h@trunkinbound:1] AGI(“SIP/MY-sip-trunk-00000475”, “agi://127.0.0.1:4577/call_log–HVcauses–PRI-----NODEBUG-----0---------------”) in new stack
– <SIP/MY-sip-trunk-00000475>AGI Script agi://127.0.0.1:4577/call_log–HVcauses–PRI-----NODEBUG-----0--------------- completed, returning
Thinking about it, calling Ringing, then Playback, without a delay, between them, makes no sense, as the 180 Ringing will, immediately, be followed by the 200 OK generated by the Answer in Playback. The net effect should be the same as if you didn’t call Ringing at all.
It shouldn’t make a difference, as Playback answers. However, it might just make Asterisk send the ringback tone as early media, although I don’t think that is a requirement of SIP (I believe you cannot revert from progress to alerting in ISDN, but can in SIP).