<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Re: [asterisk-users] Using DIALSTATUS question</title>
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks again Jim… I seem to be
successful in using this method but now I get the following after the call
completes. It seems that asterisk doesn’t know what to do with the first
channel. Would this indicate I am missing a Hangup() somewhere?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thx.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>[Jun 30 18:31:30] WARNING[26484]:
pbx.c:3907 __ast_pbx_run: Don't know what to do with 'Local/dialnumber@mycompany_cdi_private-3232;1'<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Jim Dickenson<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, June 26, 2009 1:09
PM<br>
<b><span style='font-weight:bold'>To:</span></b> Asterisk User MailList<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [asterisk-users]
Using DIALSTATUS question</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=1 face=Verdana><span
style='font-size:9.0pt;font-family:Verdana'>I am using version 1.6.0.x and you
can do “core show application dial” at CLI to see info about the
dial command.<br>
-- <br>
Jim Dickenson<br>
<a href="mailto:dickenson@cfmc.com">mailto:dickenson@cfmc.com</a><br>
<br>
CfMC<br>
<a href="http://www.cfmc.com/">http://www.cfmc.com/</a><br>
<br>
<br>
<o:p></o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=1
face=Verdana><span style='font-size:9.0pt;font-family:Verdana'>
<hr size=3 width="95%" align=center>
</span></font></div>
<p class=MsoNormal><b><font size=1 face=Verdana><span style='font-size:9.0pt;
font-family:Verdana;font-weight:bold'>From: </span></font></b><font size=1
face=Verdana><span style='font-size:9.0pt;font-family:Verdana'>John Regal
<jregal@gmail.com><br>
<b><span style='font-weight:bold'>Reply-To: </span></b>Asterisk Users Mailing
List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br>
<b><span style='font-weight:bold'>Date: </span></b>Fri, 26 Jun 2009 12:32:19
-0400<br>
<b><span style='font-weight:bold'>To: </span></b>'Asterisk Users Mailing List -
Non-Commercial Discussion' <asterisk-users@lists.digium.com><br>
<b><span style='font-weight:bold'>Subject: </span></b>Re: [asterisk-users]
Using DIALSTATUS question<br>
<br>
</span></font><font size=2 color=navy face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:navy'>Thanks so much for this method. I am going to
give it a shot. I am not familiar with that “ghM” part. I tried
looking for information on it - Is that some undocumented macro call feature or
something?<br>
Thanks again.<br>
<br>
John<br>
</span></font><o:p></o:p></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p style='margin-bottom:12.0pt'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-users-bounces@lists.digium.com [<a
href="mailto:asterisk-users-bounces@lists.digium.com%5d">mailto:asterisk-users-bounces@lists.digium.com]</a>
<b><span style='font-weight:bold'>On Behalf Of </span></b>Jim Dickenson<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, June 03, 2009
11:19 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Asterisk User MailList<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [asterisk-users]
Using DIALSTATUS question<br>
</span></font><br>
<font size=1 face=Verdana><span style='font-size:9.0pt;font-family:Verdana'>They
way I do dialing is with this AMI packet:<br>
<br>
Action: Originate<br>
Channel: Local/dial_number@cfmc_cdi_private<br>
Exten: 1322<br>
Context: default<br>
Priority: 1<br>
Variable: CfMC_ActionID=callE1321<br>
Variable: CfMC_DialInfo=Dahdi/G1/8881231234<br>
Variable: CfMC_RingTimeout=30<br>
ActionID: callE1321<br>
Async: true<br>
<br>
<br>
And these extensions:<br>
<br>
[macro-cfmc_dial_private]<br>
exten => s,1,UserEvent(DidDial,ActionID:${ARG1} & ${UNIQUEID} &
${CHANNEL} & ${ARG2})<br>
<br>
[cfmc_cdi_private]<br>
<br>
exten => dial_number,1,UserEvent(BeforeDial,ActionID:${CfMC_ActionID} &
${UNIQUEID} & ${CHANNEL} & ${CfMC_DialInfo} & ${CfMC_RingTimeout})<br>
exten => dial_number,n,Dial(${CfMC_DialInfo},${CfMC_RingTimeout},ghM(cfmc_dial_private^${CfMC_ActionID}^${CfMC_DialInfo}))<br>
; DIALSTATUS - CHANUNAVAIL CONGESTION NOANSWER BUSY ANSWER CANCEL DONTCALL
TORTURE INVALIDARGS<br>
exten => dial_number,n,UserEvent(AfterDial,ActionID:${CfMC_ActionID} &
${UNIQUEID} & ${CHANNEL} & ${CfMC_DialInfo} & ${DIALSTATUS})<br>
exten => dial_number,n,Hangup()<br>
<br>
-- <br>
Jim Dickenson<br>
<a href="mailto:dickenson@cfmc.com">mailto:dickenson@cfmc.com</a><br>
<br>
CfMC<br>
<a href="http://www.cfmc.com/">http://www.cfmc.com/</a><br>
<br>
<br>
<br>
<br>
From: John Regal <jregal@gmail.com><br>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
<asterisk-users@lists.digium.com><br>
Date: Wed, 3 Jun 2009 14:38:09 -0400<br>
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
<asterisk-users@lists.digium.com><br>
Subject: [asterisk-users] Using DIALSTATUS question<br>
<br>
Hi all,<br>
I am trying to make decisions in my dialplan based on {DIALSTATUS}. I am
creating calls using AMI (rawman with parameters via URL) with
action:Originate. I am using SIP and an outside voip provider for the calls. If
I define the number to call in the Channel parameter (e.g.
SIP/15555555555@myvoipprovider, the call gets placed before entering the
context that I defined. I understand that the call only gets put into the
context if the call was answered. If the voip provider returns a busy code, I
cannot test for it in the dialplan since it never entered the context I defined
in the Originate command. Calls that are answered and therefore make it into
the dialplan show {DIALSTATUS} as null (when I echo it from the context).<br>
<br>
How can I programmatically place calls and evaluate dialstatus using SIP?<br>
<br>
My sip.conf looks like this:<br>
[general]<br>
disallow=all<br>
allow=ulaw<br>
allow=g729<br>
register => username:secret@170.17.13.13<br>
<br>
[myvoipprovider]<br>
type=friend<br>
secret=secret<br>
username=username<br>
host=sip.myvoipprovider.com<br>
dtmfmode=rfc2833<br>
context=outbound<br>
qualify=yes<br>
canreinvite=no<br>
allow=ulaw<br>
allow=g729<br>
insecure=port,invite<br>
<br>
<br>
Thanks.<br>
<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a>
--<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><o:p></o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=1
face=Verdana><span style='font-size:9.0pt;font-family:Verdana'>
<hr size=3 width="95%" align=center>
</span></font></div>
<p class=MsoNormal><font size=1 face="Courier New"><span style='font-size:7.5pt;
font-family:"Courier New"'>_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a>
--<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></span></font><o:p></o:p></p>
</div>
</body>
</html>