[asterisk-users] Using Local Channels with Originate

David Boyd dboyd at ignitetrx.com
Mon Feb 5 15:37:31 MST 2007


On Mon, 2007-02-05 at 13:21 -0800, Michael Collins wrote:
> I haven’t quite gotten this working yet but I am going to update the
> thread with what I have learned. Maybe this will help the next guy who
> tries to figure this out…
> 
>  
> 
> The trick to using the DIALSTATUS seems to be to put it in the handler
> for the h (hang-up extension). 
> 
>  
> 
>     [outdialer]
> 
>     exten => 100, 1, Dial(${numberToDial})
> 
>     exten => h, 1, Goto(s-${DIALSTATUS},1)
> 
>  
> 
>     exten => s-ANSWER,1,NoOp("Answered")
> 
>     exten => s-BUSY,1,NoOp("Busy")
> 
>     exten => s-NOANSWER,1,NoOp("Not answered")
> 
>     exten => s-CANCEL,1,NoOp("Cancelled")
> 
>     exten => s-CONGESTION,1,NoOp("Fast busy")
> 
>     exten => s-CHANUNAVAIL,1,NoOp("Channel unavailable")
> 
>  
> 
>     [dialerplan]
> 
>     exten => s,1,Background(demo-congrats)
> 
>     exten => s,n,WaitExten
> 
>     so on ...
> 
>  
> 
> Here are the manager commands I am using:
> 
>  
> 
>     Action: login
> 
>     Username: test
> 
>     Secret: nottelling
> 
>  
> 
>     Action: originate
> 
>     Channel: Local/100 at outdialer/n
> 
>     Context: dialerplan
> 
>     Extension: s
> 
>     Priority: 1
> 
>     Variable: numberToDial=ZAP/4/1234567890
> 
>  
> 
>     Action: logoff
> 
>  
> 
> I am always getting ANSWERED for ${DIALSTAUS} so something is not
> quite right. Hopefully I am getting closer.
> 
>  
> 
>  
> 
> Brian,
> 
>  
> 
> What kind of Zap hardware/telco lines are you using?  I am using PRI
> and I am able to get a dial status in the hangup extension.  The
> problem I run into is that I get “NO ANSWER” as the hangup cause even
> for invalid phone numbers… I also get cluttered CDR’s.  In the
> meantime I’m working on a solution that I hope will give the best of
> both worlds.  I’m relying on the API events instead of local channels.
> I’ll post more information when I’ve made more progress.  However,
> I’ve made 2500 test calls and I haven’t lost a single
> ‘OriginateSuccess’ or ‘OriginateFailure’ event.  (I’m keying on these,
> specifically the ‘OriginateFailure’ event because it has a ‘Reason’
> value that gets populated: 0=Invalid, 3=No Ans, 5=Busy.)
> 
>  
> 
> Hope to have more info posted this week.
> 
>  
> 
> -MC
> 
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users


Very cool, thanks for the info.

db



More information about the asterisk-users mailing list