[asterisk-users] How do I access the Dialstatus numeric code received?
CDR
venefax at gmail.com
Tue Jun 22 07:32:00 CDT 2010
Tilghman Lesher wrote
"Not available in anything other than trunk (to be 1.8). It depends upon a
new
feature, so it's not something you can easily backport. After dialling, the
SIP code is available in ${HASH(SIP_CAUSE,<channel-name>)}"
In a real dialplan, how do I get a variable with channel-name? I mean: My
app is Sip2Sip. I get one call inbound, get the number dialed ${EXTEN} and
proceed to try many carriers. If the carriers send me something different
than 503 Service Unavailable or 404 Not Found, I need to close the call and
send back whatever SIP code I got, exactly. There is no way for me to do
that now. Unless I am missing something, I can only play with ${DIALSTATUS}
and do Hangup(Code), but my "Code" variable is never the same that I got
from the second leg. I would like to be able to do
Hangup( ${HASH(SIP_CAUSE,<channel-name>)}", where <channel-name> is the last
channel used to dial-out. How do I do this in trunk? I will have to start
using trunk in production. Another issues is the the function Hangup(Code)
takes a decimal, not related to the SIP code I just got. How would you
design your 1.8 or 1.62 dialplan around this issue?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100622/3480a2be/attachment.htm
More information about the asterisk-users
mailing list