CDR
2010-Jun-21 21:09 UTC
[asterisk-users] How do I access the Dialstatus numeric code received?
I need to access number received after a I dial a SIP or H323 call? suppose I get one of these: *404 Not found **486 Busy here **408 Request Timeout **480 Temporarily unavailable **480 Temporarily unavailable **403 Forbidden (+) ** 410 Gone **301 Moved Permanently **410 Gone ** 404 Not Found (=) **502 Bad Gateway **484 Address incomplete* How do I get the 404, 486, etc. F.A. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100621/61f231c7/attachment.htm
Tilghman Lesher
2010-Jun-21 23:18 UTC
[asterisk-users] How do I access the Dialstatus numeric code received?
On Monday 21 June 2010 16:09:22 CDR wrote:> I need to access number received after a I dial a SIP or H323 call? > suppose I get one of these: > > *404 Not found > **486 Busy here > **408 Request Timeout > **480 Temporarily unavailable > **480 Temporarily unavailable > **403 Forbidden (+) ** > 410 Gone > **301 Moved Permanently > **410 Gone ** > 404 Not Found (=) > **502 Bad Gateway > **484 Address incomplete* > > How do I get the 404, 486, etc. > F.A.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>)} -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org
Olivier
2010-Jun-22 06:15 UTC
[asterisk-users] How do I access the Dialstatus numeric code received?
2010/6/21 CDR <venefax at gmail.com>> I need to access number received after a I dial a SIP or H323 call? > suppose I get one of these: > > *404 Not found > **486 Busy here > **408 Request Timeout > **480 Temporarily unavailable > **480 Temporarily unavailable > **403 Forbidden (+) ** > 410 Gone > **301 Moved Permanently > **410 Gone ** > 404 Not Found (=) > **502 Bad Gateway > **484 Address incomplete* > > How do I get the 404, 486, etc. > F.A. > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >For curiosity sake, why would need such data in a dialplan ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100622/5b8fdadf/attachment.htm
CDR
2010-Jun-22 12:32 UTC
[asterisk-users] How do I access the Dialstatus numeric code received?
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