2 rings and it's overs

Any help would be greatly appreciated. Asterisk is great until there’s a problem. Then it’s a big headache.

When I called one of my DID numbers, the number would be busy for several attempts and then Asterisk would answer. Trying to fix that, I made so many tweaks that I lost track of what I did. Asterisk stopped working altogether. Rather than fight a losing battle, I did a new installation of a more recent version.

New installation of 18.24.2. Took days and days to get to the point where I called a number, it rings, the call goes through but there was no audio in either direction.

Trying to fix that, things got worse. Now if I call out to another number, it rings twice and then disconnects.

Thanks for taking the time to help.

I removed the commented lines from sip.conf and extensions.conf to make them smaller and easier to read here.

Output from Asterisk CLI during a call:
== Using SIP RTP CoS mark 5
> 0x7fbf3c00adf0 – Strict RTP learning after remote address set to: 192.168.1.2:16738
– Executing [14132222222@default:1] Set(“SIP/8180-00000000”, “CALLERID(all)=“S. B.”<5181234567>”) in new stack
– Executing [14132222222@default:2] Wait(“SIP/8180-00000000”, “1”) in new stack
– Executing [14132222222@default:3] Playback(“SIP/8180-00000000”, “hello-world”) in new stack
> 0x7fbf3c00adf0 – Strict RTP switching to RTP target address 192.168.1.2:16738 as source
– <SIP/8180-00000000> Playing ‘hello-world.ulaw’ (language ‘en’)
– Executing [14132222222@default:4] Dial(“SIP/8180-00000000”, “SIP/4132222222@Bulkvs”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/4132222222@Bulkvs
> 0x7fbf88009c90 – Strict RTP learning after remote address set to: 199.83.81.23:17696
– SIP/Bulkvs-00000001 is ringing
– SIP/Bulkvs-00000001 is making progress passing it to SIP/8180-00000000
> 0x7fbf88009c90 – Strict RTP switching to RTP target address 199.83.81.23:17696 as source
> 0x7fbf3c00adf0 – Strict RTP learning complete - Locking on source address 192.168.1.2:16738
> 0x7fbf88009c90 – Strict RTP learning complete - Locking on source address 199.83.81.23:17696
– SIP/Bulkvs-00000001 answered SIP/8180-00000000
– Channel SIP/Bulkvs-00000001 joined ‘simple_bridge’ basic-bridge <9d283edd-8c74-41d2-a3b1-71147ca85290>
– Channel SIP/8180-00000000 joined ‘simple_bridge’ basic-bridge <9d283edd-8c74-41d2-a3b1-71147ca85290>
> Bridge 9d283edd-8c74-41d2-a3b1-71147ca85290: switching from simple_bridge technology to native_rtp
> Remotely bridged ‘SIP/8180-00000000’ and ‘SIP/Bulkvs-00000001’ - media will flow directly between them
– Channel SIP/Bulkvs-00000001 left ‘native_rtp’ basic-bridge <9d283edd-8c74-41d2-a3b1-71147ca85290>
– Channel SIP/8180-00000000 left ‘native_rtp’ basic-bridge <9d283edd-8c74-41d2-a3b1-71147ca85290>
== Spawn extension (default, 14132222222, 4) exited non-zero on ‘SIP/8180-00000000’

sip.conf
[general]
register => myname:mypssword@sip.bulkvs.com

; Added next 2 lines for softphone
externip=aroint.com
localnet=192.168.1.0/255.255.255.0

context=default ; changed from context=public
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
transport=udp ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
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

ulaw-phone ; and another one for ulaw-only
disallow=all
allow=ulaw

[Bulkvs]
type=peer
context=default
host=sip.bulkvs.com
username=myname
secret=mypassword
qualify=yes
disallow=all
allow=ulaw
dtmfmode=rfc2833
rfc2833compensate=yes
insecure=port,invite
trustrpid=yes

[8180]
type=peer
context=default
host=dynamic
username=8180
secret=mypassword
disallow=all
allow=ulaw

extensions.conf
[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
[dundi-e164-canonical]

[dundi-e164-customers]

[dundi-e164-local]
include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn

[dundi-e164-switch]
switch => DUNDi/e164
[dundi-e164-lookup]
include => dundi-e164-local
include => dundi-e164-switch
exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)

[iaxprovider]

[trunkint]
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})})

[trunkld]
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[trunklocal]
exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[international]
ignorepat => 9
include => longdistance
include => trunkint

[longdistance]
ignorepat => 9
include => local
include => trunkld

[local]
ignorepat => 9
include => default
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider

include => parkedcalls
[outbound-freenum]
exten => _XX!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XX
X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXX!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXX
X!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXXXX!,1,Goto(outbound-freenum2,${EXTEN},1)
exten => _XXXXXX
X!,1,Goto(outbound-freenum2,${EXTEN},1)

[outbound-freenum2]
exten => _X!,1,Verbose(2,Performing ISN lookup for ${EXTEN})
same => n,Set(SUFFIX=${CUT(EXTEN,*,2-)}) ; make sure the suffix is all digits as well
same => n,GotoIf($[“${FILTER(0-9,${SUFFIX})}” != “${SUFFIX}”]?fn-CONGESTION,1)
; filter out bad characters per the README-SERIOUSLY.best-practices.txt document
same => n,Set(TIMEOUT(absolute)=10800)
same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,1,freenum.org)}) ; perform our lookup with freenum.org
same => n,GotoIf($[“${isnresult}” != “”]?from)
same => n,Set(DIALSTATUS=CONGESTION)
same => n,Goto(fn-CONGESTION,1)
same => n(from),Set(__SIPFROMUSER=${CALLERID(num)})
same => n,GotoIf($[“${GLOBAL(FREENUMDOMAIN)}” = “”]?dial) ; check if we set the FREENUMDOMAIN global variable in [global]
same => n,Set(__SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) ; if we did set it, then we’ll use it for our outbound dialing domain
same => n(dial),Dial(SIP/${isnresult},40)
same => n,Goto(fn-${DIALSTATUS},1)

exten => fn-BUSY,1,Busy()

exten => _f[n]-.,1,NoOp(ISN: ${DIALSTATUS})
same => n,Congestion()

[macro-trunkdial]
exten => s,1,Dial(${ARG1})
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup()
exten => s-BUSY,1,Hangup()
exten => _s-.,1,NoOp

[stdexten]
exten => _X.,50000(stdexten),NoOp(Start stdexten)
exten => _X.,n,Set(LOCAL(ext)=${EXTEN})
exten => _X.,n,Set(LOCAL(dev)=${ARG1})
exten => _X.,n,Set(LOCAL(cntx)=${ARG2})
exten => _X.,n,Set(LOCAL(mbx)=${ext}${IF($[!${ISNULL(${cntx})}]?@${cntx})})
exten => _X.,n,Dial(${dev},20) ; Ring the interface, 20 seconds maximum
exten => _X.,n,Goto(stdexten-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => stdexten-NOANSWER,1,VoiceMail(${mbx},u) ; If unavailable, send to voicemail w/ unavail announce
exten => stdexten-NOANSWER,n,Return() ; If they press #, return to start

exten => stdexten-BUSY,1,VoiceMail(${mbx},b) ; If busy, send to voicemail w/ busy announce
exten => stdexten-BUSY,n,Return() ; If they press #, return to start

exten => _stdete[n]-.,1,Goto(stdexten-NOANSWER,1) ; Treat anything else as no answer

exten => a,1,VoiceMailMain(${mbx}) ; If they press *, send the user into VoicemailMain
exten => a,n,Return()

[stdPrivacyexten]
exten => _X.,60000(stdPrivacyexten),NoOp(Start stdPrivacyexten)
exten => _X.,n,Set(LOCAL(ext)=${ARG1})
exten => _X.,n,Set(LOCAL(dev)=${ARG2})
exten => _X.,n,Set(LOCAL(dontcntx)=${ARG3})
exten => _X.,n,Set(LOCAL(tortcntx)=${ARG4})
exten => _X.,n,Set(LOCAL(cntx)=${ARG5})

exten => _X.,n,Set(LOCAL(mbx)=“${ext}”$[“${cntx}” ? “@${cntx}” :: “”])
exten => _X.,n,Dial(${dev},20,p) ; Ring the interface, 20 seconds maximum, call screening
; option (or use P for databased call _X.creening)
exten => _X.,n,Goto(stdexten-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => stdexten-NOANSWER,1,VoiceMail(${mbx},u) ; If unavailable, send to voicemail w/ unavail announce
exten => stdexten-NOANSWER,n,NoOp(Finish stdPrivacyexten NOANSWER)
exten => stdexten-NOANSWER,n,Return() ; If they press #, return to start

exten => stdexten-BUSY,1,VoiceMail(${mbx},b) ; If busy, send to voicemail w/ busy announce
exten => stdexten-BUSY,n,NoOp(Finish stdPrivacyexten BUSY)
exten => stdexten-BUSY,n,Return() ; If they press #, return to start

exten => stdexten-DONTCALL,1,Goto(${dontcntx},s,1) ; Callee chose to send this call to a polite “Don’t call again” script.

exten => stdexten-TORTURE,1,Goto(${tortcntx},s,1) ; Callee chose to send this call to a telemarketer torture script.

exten => _stdete[n]-.,1,Goto(stdexten-NOANSWER,1) ; Treat anything else as no answer

exten => a,1,VoiceMailMain(${mbx}) ; If they press *, send the user into VoicemailMain
exten => a,n,Return()

[macro-page]
exten => s,1,ChanIsAvail(${ARG1},s) ; s is for ANY call
exten => s,n,GotoIf($[${AVAILSTATUS} = “1”]?autoanswer:fail)
exten => s,n(autoanswer),Set(_ALERT_INFO=“RA”) ; This is for the PolyComs
exten => s,n,SIPAddHeader(Call-Info: Answer-After=0) ; This is for the Grandstream, Snoms, and Others
exten => s,n,NoOp() ; Add others here and Post on the Wiki!!!
exten => s,n,Dial(${ARG1})
exten => s,n(fail),Hangup()

[demo]

[public]
include => demo
[default]
include => demo

[time]
exten => _X.,30000(time),NoOp(Time: ${EXTEN} ${timezone})
exten => _X.,n,Wait(0.25)
exten => _X.,n,Answer()
exten => _X.,n,Set(FUTURETIME=$[${EPOCH} + 12])
exten => _X.,n,SayUnixTime(${FUTURETIME},Zulu,HNS)
exten => _X.,n,SayPhonetic(z)
exten => _X.,n,SayUnixTime(${FUTURETIME},${timezone},HNS)
exten => _X.,n,Playback(spy-local)
exten => _X.,n,WaitUntil(${FUTURETIME})
exten => _X.,n,Playback(beep)
exten => _X.,n,Return()

[ani]
exten => _X.,40000(ani),NoOp(ANI: ${EXTEN})
exten => _X.,n,Wait(0.25)
exten => _X.,n,Answer()
exten => _X.,n,Playback(vm-from)
exten => _X.,n,SayDigits(${CALLERID(ani)})
exten => _X.,n,Wait(1.25)
exten => _X.,n,SayDigits(${CALLERID(ani)}) ; playback again in case of missed digit
exten => _X.,n,Return()

[default]
exten => _1XXXXXXXXXX,1,Set(CALLERID(all)=“My Name”)
same => n,Wait(1)
same => n,Playback(hello-world)
same => n,Dial(SIP/${EXTEN:1}@Bulkvs)

exten => _XXXX,1,Set(CALLERID(num)=${EXTEN})
same => n,Dial(SIP/${EXTEN})

exten => 12121234567,1,GoTo(vorhand,1211234567,1)
exten => 14131234567,1,GoTo(HOME,14131234567,1)
exten => 15181234567,1,GoTo(OFFICE,15181234567,1)

exten => 6001,1,Dial(SIP/6001,10)
same => n,Set(VOLUME(TX)=3)
same => n,Playback(monty)
same => n,VoiceMail(6001)

[vorhand]
exten => 12121234567,1,Answer(400)
same => n,Background(vorhand-main)
same => n,WaitExten()

exten => 1,1,Answer(500)
same => n,FollowMe(vorhand,a)
same => n,Background(leave-message-for-rabbi)
same => n,VoiceMail(101&415&450,u)
same => n,Background(goodbye)
same => n,Wait(1)
same => n,Hangup()

exten => 2,1,Answer(500)
same => n,wait(1)
same => n,Background(vorhand-times)
same => n,Background(goodbye)
same => n,Hangup()

exten => 3,1,Answer(500)
same => n,Background(you-have-reached-admin)
same => n,VoiceMail(100&415&450,us)
same => n,Hangup()

[HOME]
exten => 14131234567,1,Answer(300)
same => n,Playback(pls-wait-connect-call)
same => n,Dial(SIP/cellphonenumber@Bulkvs&SIP/8180,25,m(wish))
same => n,Playback(monty)
same => n,Voicemail(100,s)
same => n,Wait(1)
same => n,Hangup()

[OFFICE]
exten => _15181234567,1,Answer()
same => n,wait(3)
same => n,Background(Watson)
same => n,WaitExten()
same => n,Hangup()

exten => 1,1,Answer(20)
same => n,Background(tune-long)
same => n,VoiceMail(100,s)
same => n,Hangup()

exten => 2,1,Playback(sales_message)
same => n,wait(1)
same => n,Dial(SIP/1&SIP/100,4)
same => n,Playback(hello-world)
same => n,Playback(hello-world)
same => n,wait(1)
same => n,Set(VOLUME(TX)=3)
same => n,Playback(monty)
same => n,Macro(voicemail,SIP/6001)
same => n,Hangup()

[macro-voicemail]
exten => s,1,Dial(${ARG1},20)
exten => s,2,Goto(s-$DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(${MACRO_EXTEN})
exten => s-NOANSWER,2,Hangup()
exten => s-BUSY,1,Voicemail(b${MACRO_EXTEN})
exten => s-BUSY,2,Hangup()
exten => _s-.,1,Goto(s-NOANSWER,1)

Start with setting this to “no” on the peers. You have templates that do it, but aren’t using them so it doesn’t apply.

Thanks jcolp. Fantastic! Works!

With all the info sent, how to you spot the one line that’s wrong?

Just amazing. Thank you, thank you, thank you.

This. It’s iffy whether things will directly work or not.

I’m still amazed at your problem solving. And thankful that you read all the calls for help. And answer them.

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