I would turn on mod_xml_cdr and look at a failed call's XML output. Look in the <variables> section and see if any of those have the data you're looking for.<div><br></div><div>-MC<br><br><div class="gmail_quote">
On Mon, May 23, 2011 at 1:58 PM, Eric Beard <span dir="ltr"><<a href="mailto:eric@loopfx.com">eric@loopfx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Hello,</p><p class="MsoNormal"> </p><p class="MsoNormal">I’m wondering if it’s possible to read SIP response headers from the dial plan, or from Lua.</p>
<p class="MsoNormal"> </p><p class="MsoNormal">One of my gateways returns a generic 500 for all kinds of different error conditions, and expects me to read variables in the sip response.</p><p class="MsoNormal"> </p><p class="MsoNormal">
e.g.</p><p class="MsoNormal"> </p><p class="MsoNormal">SIP/2.0 500 Service Unavailable</p><p class="MsoNormal">Via:..</p><p class="MsoNormal">From:…</p><p class="MsoNormal">Etc:</p><p class="MsoNormal">X-Custom-Var:val</p>
<p class="MsoNormal"> </p><p class="MsoNormal">The value in the custom variable might be “busy”, “bad number”, etc.</p><p class="MsoNormal"> </p><p class="MsoNormal">If I add something to the INVITE, I know that I can read it with channel variables “sip_h_X-Name”, but I don’t get the same thing for the response.</p>
<p class="MsoNormal"> </p><p class="MsoNormal">Thanks,</p><p class="MsoNormal"> </p><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">-----------------------</span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;color:#1F497D">Eric Z. Beard, CTO</span></b><span style="font-size:10.0pt;color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">Loop LLC</span></p><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">w (877) 850-2010 x9249</span></p><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">m (727) 776-2768</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D"><a href="mailto:eric@loopfx.com" target="_blank"><span style="color:blue">eric@loopfx.com</span></a></span></p><p class="MsoNormal"> </p></div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>