I am running into a tough one.
So we have a dialer that uses ami to generate an originate call
Now this works perfect if I want to use a specific trunk:
Action: originate
Channel: IAX2/voipMSTEST/6305551234
Exten: s
Context: speech-rec
Priority: 1
My issue is I want to instead use a context to dial since I will be implementing LCR and failover routing, so the new originate looks like below, but the problem is when I use a local context instead of the trunk, the DIAL app triggers a hangup immidately when the DIAL app is ran in the speech-rec context. Then even though I set the g flag so it continues the dialplan, it does not. Any idea why this is doing that? My alternative is to write the logic outside asterisk, but Iād like to do it inside:
Action: originate
Channel: IAX2/voipMSTEST/6305551234
Channel: Channel: Local/s@outbound-dialer-custom
Exten: s
Context: speech-rec
Priority: 1
So the above originate uses outbound-dialer-custom to call my cell phone 6305551111, connects me to do the speech-rec contextā¦ All of this works perfectly. Then in the speech-rec context I patch into my office line using the
exten => s,n,Dial(IAX2/voipMSTEST/6305551234,30,ge)
Everything up to this point works perfectly until I answer the office line. Immidiately when I do the hangup extension is hit, and the items in my dialplan after the DIAL_APP in speech-rec context never run.
Again, this works flawlessly though if instead of using a Local/s@outbound-dialer-custom channel I use the
IAX2/voipMSTEST/63055512345 channelā¦ Only problem in doing it that way my failovers and lcr I cannot build into my asterisk dialplanā¦ Any suggestions?
[outbound-dialer-custom]
;exten => s,1,NoOp()
exten => s,n,Dial(IAX2/voipMSTEST/6305551111,30)
exten => s,n,Hangup();
exten=>h,1,Verbose(2,### HANGUPOUTBOUNDDIALER #######)
[speech-rec]
exten => s,1,Answer()
exten => s,n,Wait(3)
exten => s,n,Dial(IAX2/voipMSTEST/6305551234,30,g)
;The second I answer on above number a Hangup even happens and nothing after this runs?????
exten => s,n,Verbose(2,### HANGUPGO #######)
exten => s,n,Hangup()
exten => h,1,NoOp(${DIALSTATUS})
exten => h,n,NoOp(${ANSWEREDTIME})
exten => h,n,NoOp(${DIALEDTIME})