On Sun, 22 Mar 2009, Asterisk wrote:
Hi List,
I have a nice simple dialplan question for you.... Currently, I have
definitions similar to the following in my extensions.conf file, to allow me
to dial out using a variety of channels:
; Direct dial (number starts with zero), use 0151 xxx xxxx:
exten => _0.,1,Set(CALLERID(number)=0845xxxxxxx)
exten => _0.,n,Dial(SIP/${ext...@sipgate,90,t)
exten => _0.,n,Playback(invalid)
exten => _0.,n,Hangup[/code]
(I've munged some of the numbers, hence the x's)
Now, this works fine provided the person answers in 90 seconds or less: If
not, I get "that option is invalid" announced, and it hangs up. I want to do
this:
It's easy to do in dialplan - you just need to know the status codes
returned by Dial (and hope that sipgate return the correct codes too)
You can simply:
exten => _0.,n,Goto(${DIALSTATUS})
(before the playback)
Use the labels as the destinations - eg.
exten => _0.,n(BUSY),Noop()
exten => _0.,n(CONGESTION),Noop()
then you could at this point, insert a Wait(1) then a Goto back to your
Dial line.
See the helpfile on the Dial command for all possible status messages -
ie.
DIALSTATUS - This is the status of the call:
CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL
DONTCALL | TORTURE | INVALIDARGS
If DIAL fails because I got the number wrong, then a PLAYBACK to that effect
would be useful... I can record my own soundfile if there isn't a standard
one. By wrong, I mean the exchange would return number unavailable, rather
than I get the wrong person!
I used to play messages back, but resorted to just returning the codes to
the phone.
If DIAL fails after it's been ringing for ages (e.g. when calling the local
Post Office sorting office, who only answer 1 in 5 calls), I'd like it to
retry, ala the busy response.
IF DIAL exits because the other party hung up, I'd want it to simply hang up
on me like it does now. I suspect this is standard behaviour? But maybe it
tries to read the invalid announce to a closed channel with my dialplan, I'm
not sure.
that's standard, or implement a 'h' priority.
Does sipgate let you change outgoing caller ID these days now?
Gordon
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users