[Freeswitch-users] Q931 decoding Update
Stefan Knoblich
stkn at freeswitch.org
Thu Jan 29 03:02:40 PST 2009
Am Thursday 29 January 2009 schrieb Helmut Kuper:
> Hello,
>
>
> a further update:
>
> The code is implemented and seems to work as it should. I still can do
> outgoing calls when q931ToPcap is active :) So it shouldn't be too wrong
> what I did in the openzap code.
> The pcap File is generated in FS's log dir either with default filename
> or with optional given filename. Existing files of same name will be
> overwritten without a warning.
>
> I attached a screenshot of such a pcap file viewed in wireshark.
> Currently I work on a little linux cli perl script, which displays the
> decoded Q931 packets on a CLI as showed in my yesterday mail.
>
> One thing I couldn't solve is, how to get the span_id when FS receives
> or send a Q931 packet?
>
> In ozmod_isdn functions "static int zap_isdn_921_23" (Receive) and
> "static int q931_rx_32" (Send) I'm converting *pvt to zap_span_t like this:
>
> zap_span_t *span = (zap_span_t *) pvt;
>
> Then I try to access span_id by span->span_id, but it seems it's allways
> zero.
>
>
> Any ideas?
>
> regards
> helmut
>
>
Hi,
--- a/src/ozmod/ozmod_isdn/ozmod_isdn.c
+++ b/src/ozmod/ozmod_isdn/ozmod_isdn.c
@@ -1970,7 +1993,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(isdn_configure_span)
span,
&isdn_data->q931);
- Q921SetLogCB(&isdn_data->q921, &zap_isdn_q921_log, isdn_data);
+ Q921SetLogCB(&isdn_data->q921, &zap_isdn_q921_log, span);
Q921SetLogLevel(&isdn_data->q921, (Q921LogLevel_t)q921loglevel);
Q931InitTrunk(&isdn_data->q931,
@@ -1983,7 +2006,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(isdn_configure_span)
&isdn_data->q921,
span);
- Q931SetLogCB(&isdn_data->q931, &zap_isdn_q931_log, isdn_data);
+ Q931SetLogCB(&isdn_data->q931, &zap_isdn_q931_log, span);
Q931SetLogLevel(&isdn_data->q931, (Q931LogLevel_t)q931loglevel);
/* Register new event hander CB */
--
Stefan Knoblich
Web: http://stkn.techmage.de/ http://oss.axsentis.de/people/stkn/
Email: stkn at freeswitch.org
IRC: #freeswitch-de @ irc.freenode.net
More information about the FreeSWITCH-users
mailing list