Krzysztof Drewicz wrote:
> 2011/10/7 Lee Howard <faxguy@...>
>
>
>> There really is no place to add a similar type of debugging message in a Class 1 modem if we limit ourselves to the T.31 spec. However, since v5.1.6 HylaFAX+ has been able to cope with +FDB (debug) messages which a select few modems use when running in debug mode. So, I would suggest that the right approach would be to use an iaxmodem config option to turn-on +FDB debug messages. So it would be something like +FDB:xxx where xxx will refer to whatever debugging information iaxmodem wants to pass-through. You'll be limited to using this feature with HylaFAX+, however, until other fax applications adopt the +FDB responses.
>>
>> How, exactly, are the ISDN cause-codes passed through to IAXmodem, however?
>>
>>
>
> As per RFC5456 (The IAX2 spec) in 6.2.5. HANGUP Request Message there
> are a two optional sections Cause and Cause Code (more info in this
> rfc under Section 8.6.21 & 8.6.33 )
>
You can make this change to your iaxmodem.c and then watch the iaxmodem
output to experiment with this.
--- iaxmodem-1.3.0/iaxmodem.c 2010-03-01 10:12:48.000000000 -0800
+++ iaxmodem/iaxmodem.c 2011-10-07 10:03:45.494794888 -0700
@@ -1288,7 +1288,7 @@
if (gothup) sighandler(SIGHUP);
break;
case IAX_EVENT_HANGUP:
- printlog(LOG_INFO, "Remote hangup.\n");
+ printlog(LOG_INFO, "Remote hangup. Cause: \"%s\"
Code: %u\n", iaxevent->ies.cause ? iaxevent->ies.cause : "",
iaxevent->ies.causecode);
if (modemstate != MODEM_ONHOOK) {
if (modemstate == MODEM_CALLING)
t31_call_event(&t31_state,
AT_CALL_EVENT_BUSY);
> But, in real world, I would love to have a +FDB in iaxmodem just
> reporting ISDN cause, and well, i use hylafax+, so no point in saying
> it's a limit, it is a "+" after all?
> When i will find some time i think i will implement this in +FDB
> message, is there any guide-line or format to use?
To get the +FDB: message requires a bit more work. The T.31 modem in
spandsp will require some work to get it to report the message, and then
some kind of t31_call_event added to the IAX_EVENT_HANGUP case. I could
do this myself, of course, but all of my free-time is consumed right now
for at least the next month. If you or someone else does the work then
I'm happy to review it and include it and pass the bits on to Steve
Underwood for inclusion in spandsp.
Be aware that so far in the very few tests I ran with the change
mentioned above I haven't seen any non-null "cause" values come
through. So this may represent a bug in libiax2 or that Asterisk 1.4
isn't populating it in the first place... both of which would need yet
more work to resolve.
I would recommend a T.31 response formatting of something like:
'+FDB:H%u:%s' where "H" stands for "hangup" and %u is the causecode and
%s is the cause.
Thanks,
Lee.
|