Re: [asterisk-users] How do I access the Dialstatus numeric code received?
2010/6/21 CDR vene...@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 ? -- _ -- 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
Re: [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. -- _ -- 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
Re: [asterisk-users] How do I access the Dialstatus numeric code received?
On Tuesday 22 June 2010 07:32:00 CDR wrote: 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? ${HASHKEYS(SIP_CAUSE)} will deliver a list of all channel names which have set a SIP cause. 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. I don't think you can send back the same cause code, necessarily. It would depend upon the state of your calling channel. Certainly if the calling channel is already answered, the only thing you really can do is to drop the call. In any case, it's the PRI cause code that you would pass to the Hangup function that would get mapped back to a SIP cause code. The SIP cause in the dialplan is really only useful for dialplan logic, not for passing back to the calling channel. 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. No, actually, the Hangup code is directly mapped to and from SIP codes. There are some less-specific cause codes (codes that get mapped from more than one SIP code), but that's the best that you can get without using a real proxy. -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com www.asterisk.org -- _ -- 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
[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. -- _ -- 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
Re: [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 -- _ -- 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