Re: [Freeswitch-users] Q931 decoding Update

2009-02-05 Thread Helmut Kuper
Hello,

if you have more than one call in your q931.pcap file captured, you may
like to seperate the call flows in wireshark's packet list. wireshark
allows you to sort the packets by e.g. q931 call reference first. All
you have to do is this:

Open q931 pcap file in wireshark, goto edit->preferences...->Columns

Enter a title of your new column e.g "Q931 Call Ref" in title-field.
Select "Custom" from Format-field. Enter exactly "q931.call_ref" without
quotes into the field next to Format-field. Then apply it and close the
window. Now you have a "Q931 Call Ref" column in the packet list. Click
on it and the Flows a sorted first by "q931 call reference" and second
by time.

regards
Helmut

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-02-04 Thread Gopalakrishnan A.N
Yes I can do that with any integration

On Thu, Feb 5, 2009 at 2:22 AM, Michael Collins  wrote:

> On Wed, Feb 4, 2009 at 9:56 AM, Gopalakrishnan A.N 
> wrote:
> > Hi,
> > Its  a awesome. Can the packet capturing be done with event socket?
>
> Not at this time. Would require some additional programming. Are you
> up for the task? ;)
> -MC
>
> >
> > --
> > Thank you  with regards,
> > Gopal,
> >
> >
> >
> >
> >
> >
> > ___
> > Freeswitch-users mailing list
> > Freeswitch-users@lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
> >
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Thank you  with regards,
Gopal,
___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-02-04 Thread Michael Collins
On Wed, Feb 4, 2009 at 9:56 AM, Gopalakrishnan A.N  wrote:
> Hi,
> Its  a awesome. Can the packet capturing be done with event socket?

Not at this time. Would require some additional programming. Are you
up for the task? ;)
-MC

>
> --
> Thank you  with regards,
> Gopal,
>
>
>
>
>
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-02-04 Thread Gopalakrishnan A.N
Hi,
Its  a awesome. Can the packet capturing be done with event socket?

-- 
Thank you  with regards,
Gopal,
___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-02-02 Thread Michael Jerris
We need to add more than this including detection in openzap  
configure.in if libpcap is available (headers and lib) and if not,  
disabling the functionality.

MIke

On Feb 2, 2009, at 1:04 PM, Helmut Kuper wrote:

> Hello,
>
> today I uploaded a little patch for openzap concerning missed  
> linking of
> the pcap library. So loading ozmod_isdn failed with some kind of
> "unknown symbol pcap_flush_dump" error message. This keeps mod_openzap
> from loading at FS startup.
>
> regards
> helmut
>
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org


___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-02-02 Thread Helmut Kuper
Hello,

today I uploaded a little patch for openzap concerning missed linking of
the pcap library. So loading ozmod_isdn failed with some kind of
"unknown symbol pcap_flush_dump" error message. This keeps mod_openzap
from loading at FS startup.

regards
helmut


___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-30 Thread Helmut Kuper
Hello,

today I uploaded the Q931-To-Pcap patch into openzap's trunk (r628). So
you can test it.

How to start Q931 to pcap ?

In FS just enter "oz q931_pcap  on [pcapfilename without
suffix]" to start logging q931 packets to pcap. It opens a file called
"q931.pcap" or ".pcap". It is saved in FS's log directory.

 has currently not really an affect to the command. It is only
used to make sure that you have at least one valid span configured.
Further it is put into 802.1q vlan tag id which is displayed in
wireshrak and tshark. Unfortunately I couldn't test it yet (On my side
it's always zero).



How to stop Q931 pcap?

Simply enter "oz q931_pcap  off" into FS console. 
must be valid, but has no affect. Second way is to unload openzap module
or shutdown FS.



How are the packets saved?

All Q931 packets send or received by any span are saved into one file.
 
To see from where to where the packets was send, the FreeSWITCH's side
is always marked with ethernet address "02:00:01:AA:AA:AA" and IP
address "1.1.1.1"

Remote side is always marked with ethernet address "02:00:01:BB:BB:BB"
and IP adresss "2.2.2.2"

Span ID is intended to be put into VLAN ID, but this is currently not
sure. Maybe it's spanid-1 or always zero - I don't know.

The pcap timestamp starts with 0 and is increased by each q931 packet.
(Maybe a real timestamp is better here)

After each saved q931 packet data is flushed into pcap file. This is
needed for the small perl script below.



How to decode it with wireshark?

Get the pcap file from FS log dir and send it via email, ftp or scp to
where you have wireshark running. Open it in wireshark. Current
wireshark decode the stuff by default as "TPKT - Unknown TPDU type
(0x0)". Of course we have a TPKT packet, but wireshark is not able to
detect the Q931 packet by default. So just do a right click on such a
packet list entry, choose "decode as ..." and click on "do not decode".
You can also click on "Decode" and then choose AIM or CFLOW protocol.
Yes, AIM is not really Q931 or TPKT, but it works... After applying the
packets are decoded as wanted. The black color in the packet list marks
some little bugs in the TCP packet generated by this patch. E.g. tcp
checksum is zero, but should be vaild. I have code to calculate it, but
in my eyes it is an unescessary load for FS.



How to decode it with tshark?

tshark allows us to decode pcap files right on cli. To do so just enter
this:

tshark -d tcp.port==102,aim  -Rq931 -Ttext -V -r 

aim is the protocol as what tshark should decode the tcp payload. Some
other protocols are working to to get tcp's payload decoded as TPKT with
q931 (she so called "Q931 over IP").

Unfortunately it decodes not just q931 but the whole overhead
(ethernet,ip,tcp,tpkt) so I build a perl script, which extracts only
Q931 packets. For this script I have to flush each Q931 packet into the
pcap file, cause this allows to have some kind of real time decoding.

You have to start Q931ToPcap logging in FS first, then start the script.
You need to have tshark installed for this. The script has the pcap
filename incl. path as an optional argument. If not given, it uses the
default filename defined within the script. To stop the script press
"ctrl+c".


Here is the script:

#!/usr/bin/perl
$default_filename="/opt/app/voip/ippbx/log/q931.pcap";
$display=0;

if($#ARGV<0){
$filename=$default_filename;
}
else{
$filename=$ARGV[0];
}

$cmd="tail -n +0 -f ".$filename." | tshark -d tcp.port==102,aim  -Rq931
-Ttext -V -i - 2>1|";

print "\n";

open(PCAP, $cmd);

while ($line=)
{
chomp($line);

if($line=~/^Frame ([0-9]+) \(/)
{
$number=$1;
}

if($line=~/Destination: 02:00:01:aa:aa:aa/i)
{
$direction=1;
}
elsif($line=~/Destination: 02:00:01:bb:bb:bb/i)
{
$direction=0
}
elsif($line=~/802.1Q Virtual LAN, PRI: 7, CFI: 0, ID: ([0-9]+)/i)
{
$spanid=$1;
}
elsif($line eq "Q.931")
{
$display=1;
$intro=1;
next;
}
elsif(length($line)==0)
{
$display=0;
$intro=0;
print "\n\n";
next;
}

if($display == 1)
{
if($intro==1)
{
$mode=$direction?"RECEIVING -":
 "SENDING ---";

printf("-- $mode Packet number: %05i --- SpanID:
%i \n", $number, $spanid);
$intro=0;
}
print "$line\n";
}
}
close(PCAP);




regards
Helmut

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitc

Re: [Freeswitch-users] Q931 decoding Update

2009-01-29 Thread Anthony Minessale
Can you join irc and we can make you an account and give you the
instructions?

irc.freenode.net #freeswitch or just the java applet on our homepage.


On Thu, Jan 29, 2009 at 10:19 AM, Helmut Kuper wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello Brian,
>
> no, I have no FS SVN account and I have no experience with jira and only
> a few with svn. So I'm looking for the easiest way ...
> I'm not sure if it is possible to do a svn commit in my openzap
> directory and svn then merges the code correctly with current openzap in
> trunk.
>
>
> regards
> Helmut
>
> Am 29.01.2009 17:01, schrieb Brian West:
> > How do you want to do this?  Do you currently have an SVN account? Or
> > do you wanna do this via Jira?
> >
> > /b
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
>
> iEYEARECAAYFAkmB1vgACgkQ4tZeNddg3dzWGQCeOB+JJLY/Ns6HaYRarMhF6EVj
> UCgAn1Cu1BDfuSuBquZMWL6cLLioNeMb
> =rDEe
> -END PGP SIGNATURE-
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_miness...@hotmail.com 
GTALK/JABBER/PAYPAL:anthony.miness...@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:8...@conference.freeswitch.org 
iax:gu...@conference.freeswitch.org/888
googletalk:conf+...@conference.freeswitch.org
pstn:213-799-1400
___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-29 Thread Helmut Kuper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Brian,

no, I have no FS SVN account and I have no experience with jira and only
a few with svn. So I'm looking for the easiest way ...
I'm not sure if it is possible to do a svn commit in my openzap
directory and svn then merges the code correctly with current openzap in
trunk.


regards
Helmut

Am 29.01.2009 17:01, schrieb Brian West:
> How do you want to do this?  Do you currently have an SVN account? Or  
> do you wanna do this via Jira?
> 
> /b
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAkmB1vgACgkQ4tZeNddg3dzWGQCeOB+JJLY/Ns6HaYRarMhF6EVj
UCgAn1Cu1BDfuSuBquZMWL6cLLioNeMb
=rDEe
-END PGP SIGNATURE-

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-29 Thread Anthony Minessale
I think his patch was setting the span itself as the private data to the
callback rather than the private_data which was currently being set.



On Thu, Jan 29, 2009 at 8:10 AM, Helmut Kuper wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi Stefan,
>
> I'm not sure what you want to tell me with the diff. Maybe I should hook
> into the CallBack log function to get the span_id?
>
> After your hint I looked into FS's concole log and found that even the
> Q931 callback log function displays span_id 0
>
> I think this line:
>
> zap_log("Span", "Q.931", span->span_id, (int)level, "%s", msg);
>
>
> produces this line:
>
> 2009-01-29 11:16:20 [DEBUG] Span:0 Q.931() Receiving message from Layer4
> (size: 212, type: 69)
>
> in FS console. There span_id is zero despite the fact that span_id in
> openzap.conf.xml is "1"
>
> openzap seems to set the span_id during zap_span_create(). The first
> span gets the span_id 1.
>
> Unfortuantely neither FS console nor my code displays the span id as
> expected.
>
> I would like to have it, because I want to put it into pcap file to give
> a hint in wireshark from which span the traffic is.
>
>
> regards
> Helmut
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
>
> iEYEARECAAYFAkmBuNcACgkQ4tZeNddg3dw5ugCgl2E1E/wiaGrebuh8G0WM9+gr
> iMoAoI0DmmkIC2B/CwxNiZQKYB7EmcDP
> =jDTx
> -END PGP SIGNATURE-
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_miness...@hotmail.com 
GTALK/JABBER/PAYPAL:anthony.miness...@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:8...@conference.freeswitch.org 
iax:gu...@conference.freeswitch.org/888
googletalk:conf+...@conference.freeswitch.org
pstn:213-799-1400
___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-29 Thread Brian West
How do you want to do this?  Do you currently have an SVN account? Or  
do you wanna do this via Jira?

/b

On Jan 29, 2009, at 8:10 AM, Helmut Kuper wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi Anthony,
>
> yes, I think I can upload it. Can you send me the datails please?
>
> regards
> Helmut
>
> Am 29.01.2009 14:49, schrieb Anthony Minessale:
>> Would you like to check in the patch into tree now?
>> We can give you commit access and we call all work on it together.
>>
>>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
>
> iEYEARECAAYFAkmBuOUACgkQ4tZeNddg3dwkHQCgpxFkyHGJJO6Pii0zI1C3jx26
> RdUAnRi5g0cjCzeFQ+0pwC5Zz2kKE93E
> =YpxO
> -END PGP SIGNATURE-
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org


___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-29 Thread Helmut Kuper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Stefan,

I'm not sure what you want to tell me with the diff. Maybe I should hook
into the CallBack log function to get the span_id?

After your hint I looked into FS's concole log and found that even the
Q931 callback log function displays span_id 0

I think this line:

zap_log("Span", "Q.931", span->span_id, (int)level, "%s", msg);


produces this line:

2009-01-29 11:16:20 [DEBUG] Span:0 Q.931() Receiving message from Layer4
(size: 212, type: 69)

in FS console. There span_id is zero despite the fact that span_id in
openzap.conf.xml is "1"

openzap seems to set the span_id during zap_span_create(). The first
span gets the span_id 1.

Unfortuantely neither FS console nor my code displays the span id as
expected.

I would like to have it, because I want to put it into pcap file to give
a hint in wireshark from which span the traffic is.


regards
Helmut
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAkmBuNcACgkQ4tZeNddg3dw5ugCgl2E1E/wiaGrebuh8G0WM9+gr
iMoAoI0DmmkIC2B/CwxNiZQKYB7EmcDP
=jDTx
-END PGP SIGNATURE-

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-29 Thread Helmut Kuper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Anthony,

yes, I think I can upload it. Can you send me the datails please?

regards
Helmut

Am 29.01.2009 14:49, schrieb Anthony Minessale:
> Would you like to check in the patch into tree now?
> We can give you commit access and we call all work on it together.
> 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAkmBuOUACgkQ4tZeNddg3dwkHQCgpxFkyHGJJO6Pii0zI1C3jx26
RdUAnRi5g0cjCzeFQ+0pwC5Zz2kKE93E
=YpxO
-END PGP SIGNATURE-

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-29 Thread Anthony Minessale
Would you like to check in the patch into tree now?
We can give you commit access and we call all work on it together.


On Thu, Jan 29, 2009 at 5:02 AM, Stefan Knoblich wrote:

> 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: s...@freeswitch.org
> IRC:#freeswitch-de @ irc.freenode.net
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_miness...@hotmail.com 
GTALK/JABBER/PAYPAL:anthony.miness...@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:8...@conference.freeswitch.org 
iax:gu...@conference.freeswitch.org/888
googletalk:conf+...@conference.freeswitch.org
pstn:213-799-1400
___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-29 Thread Stefan Knoblich
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: s...@freeswitch.org
IRC:#freeswitch-de @ irc.freenode.net

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-28 Thread Michael Collins
Nice work! Let us know when you'd like others to try it out.
-MC

On Wed, Jan 28, 2009 at 1:55 AM, Helmut Kuper  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello Guys,
>
> today I tried to decode a q931 pcap file directly in a linux cli. I had
> success and the result looks like this:
>
> - -- SENDING --- Packet number: 1 --- SpanID: 1 
>Protocol discriminator: Q.931
>Call reference value length: 2
>Call reference flag: Message sent from originating side
>Call reference value: 0002
>Message type: RELEASE (0x4d)
>Display  'h...@freeswitch'
>Information element: Display
>Length: 13
>Display information: h...@freeswitch
>
>
> - -- SENDING --- Packet number: 2 --- SpanID: 1 
>Protocol discriminator: Q.931
>Call reference value length: 2
>Call reference flag: Message sent to originating side
>Call reference value: 0002
>Message type: DISCONNECT (0x45)
>Cause
>Information element: Cause
>Length: 2
>  = Cause location: User (U) (0)
>.00.  = Coding standard: ITU-T standardized coding (0x00)
>1...  = Extension indicator: last octet
>.001  = Cause value: Normal call clearing (16)
>1...  = Extension indicator: last octet
>
>
> I think this helps server admins to get a much faster access to the
> decoded packages on a pure server where they have no GUI and hence no
> wireshark. tshark is needed for this of course.
>
>
> regards
> Helmut
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
>
> iEYEARECAAYFAkmAK38ACgkQ4tZeNddg3dxAEACgsf+GC3jqTvBUYD2pqsgtZgUs
> s8QAoLIitPAc0I55zKXyw6yTe4MDaDaK
> =/Ir7
> -END PGP SIGNATURE-
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-28 Thread Helmut Kuper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Guys,

today I tried to decode a q931 pcap file directly in a linux cli. I had
success and the result looks like this:

- -- SENDING --- Packet number: 1 --- SpanID: 1 
Protocol discriminator: Q.931
Call reference value length: 2
Call reference flag: Message sent from originating side
Call reference value: 0002
Message type: RELEASE (0x4d)
Display  'h...@freeswitch'
Information element: Display
Length: 13
Display information: h...@freeswitch


- -- SENDING --- Packet number: 2 --- SpanID: 1 
Protocol discriminator: Q.931
Call reference value length: 2
Call reference flag: Message sent to originating side
Call reference value: 0002
Message type: DISCONNECT (0x45)
Cause
Information element: Cause
Length: 2
  = Cause location: User (U) (0)
.00.  = Coding standard: ITU-T standardized coding (0x00)
1...  = Extension indicator: last octet
.001  = Cause value: Normal call clearing (16)
1...  = Extension indicator: last octet


I think this helps server admins to get a much faster access to the
decoded packages on a pure server where they have no GUI and hence no
wireshark. tshark is needed for this of course.


regards
Helmut
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAkmAK38ACgkQ4tZeNddg3dxAEACgsf+GC3jqTvBUYD2pqsgtZgUs
s8QAoLIitPAc0I55zKXyw6yTe4MDaDaK
=/Ir7
-END PGP SIGNATURE-

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-27 Thread Michael Collins
Helmut,

Nice work! Thanks for doing this.
-MC

On Tue, Jan 27, 2009 at 7:15 AM, Anthony Minessale
 wrote:
> Looks good, you might want to consider making the file name that is
> generated be an optional argument but it's not necessary just a suggestion.
>
>
>
> On Tue, Jan 27, 2009 at 8:27 AM, Helmut Kuper 
> wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Hello,
>>
>>
>> again an update to my little project:
>>
>> I enhanced mod_openzap and ozmod_isdn so that I'm able to start and stop
>> q931ToPcap generation in ozmod_isdn from FS's console. q931ToPcap itself
>> isn't implemented yet.
>>
>> To give you an idea about the enhanced oz command - it's like this:
>>
>> freeswi...@ippbx-prod-node0> oz
>> API CALL [oz()] output:
>> list || dump  [] || bounce  [] ||
>> q931_pcap  on|off
>> freeswi...@ippbx-prod-node0> oz q931_pcap
>> API CALL [oz(q931_pcap)] output:
>> - -ERR Usage: oz q931_pcap  on|off
>>
>> freeswi...@ippbx-prod-node0> oz q931_pcap 0 on
>> API CALL [oz(q931_pcap 0 on)] output:
>> - -ERR invalid span
>>
>> freeswi...@ippbx-prod-node0> oz q931_pcap 1 on
>> API CALL [oz(q931_pcap 1 on)] output:
>>
>> 2009-01-27 15:21:55 [INFO] mod_openzap.c:2172 oz_function() Starting
>> Q931-to-pcap
>> 2009-01-27 15:21:55 [DEBUG] ozmod_isdn.c:1712 zap_isdn_configure_span()
>> Enabling Q931ToPcap
>> freeswi...@ippbx-prod-node0> oz q931_pcap 1 off
>> API CALL [oz(q931_pcap 1 off)] output:
>>
>> 2009-01-27 15:21:58 [INFO] mod_openzap.c:2178 oz_function() Stopping
>> Q931-to-pcap
>> 2009-01-27 15:21:58 [DEBUG] ozmod_isdn.c:1717 zap_isdn_configure_span()
>> Disabling Q931ToPcap
>> freeswi...@ippbx-prod-node0>
>>
>>
>>
>> As you can see, ozmod_isdn, where I will implement the code receives the
>> oz command option.
>>
>> I appreciate your comments.
>>
>>
>> regards
>> helmut
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.9 (MingW32)
>>
>> iEYEARECAAYFAkl/GeMACgkQ4tZeNddg3dzurACgszPDA573+uZjmY5TWXF9yj5F
>> Vz8An2FvK0FsDLr0JQaHFDETWnLoPSkD
>> =0hkL
>> -END PGP SIGNATURE-
>>
>> ___
>> Freeswitch-users mailing list
>> Freeswitch-users@lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
>
> AIM: anthm
> MSN:anthony_miness...@hotmail.com
> GTALK/JABBER/PAYPAL:anthony.miness...@gmail.com
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:8...@conference.freeswitch.org
> iax:gu...@conference.freeswitch.org/888
> googletalk:conf+...@conference.freeswitch.org
> pstn:213-799-1400
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-27 Thread Anthony Minessale
Looks good, you might want to consider making the file name that is
generated be an optional argument but it's not necessary just a suggestion.



On Tue, Jan 27, 2009 at 8:27 AM, Helmut Kuper wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello,
>
>
> again an update to my little project:
>
> I enhanced mod_openzap and ozmod_isdn so that I'm able to start and stop
> q931ToPcap generation in ozmod_isdn from FS's console. q931ToPcap itself
> isn't implemented yet.
>
> To give you an idea about the enhanced oz command - it's like this:
>
> freeswi...@ippbx-prod-node0> oz
> API CALL [oz()] output:
> list || dump  [] || bounce  [] ||
> q931_pcap  on|off
> freeswi...@ippbx-prod-node0> oz q931_pcap
> API CALL [oz(q931_pcap)] output:
> - -ERR Usage: oz q931_pcap  on|off
>
> freeswi...@ippbx-prod-node0> oz q931_pcap 0 on
> API CALL [oz(q931_pcap 0 on)] output:
> - -ERR invalid span
>
> freeswi...@ippbx-prod-node0> oz q931_pcap 1 on
> API CALL [oz(q931_pcap 1 on)] output:
>
> 2009-01-27 15:21:55 [INFO] mod_openzap.c:2172 oz_function() Starting
> Q931-to-pcap
> 2009-01-27 15:21:55 [DEBUG] ozmod_isdn.c:1712 zap_isdn_configure_span()
> Enabling Q931ToPcap
> freeswi...@ippbx-prod-node0> oz q931_pcap 1 off
> API CALL [oz(q931_pcap 1 off)] output:
>
> 2009-01-27 15:21:58 [INFO] mod_openzap.c:2178 oz_function() Stopping
> Q931-to-pcap
> 2009-01-27 15:21:58 [DEBUG] ozmod_isdn.c:1717 zap_isdn_configure_span()
> Disabling Q931ToPcap
> freeswi...@ippbx-prod-node0>
>
>
>
> As you can see, ozmod_isdn, where I will implement the code receives the
> oz command option.
>
> I appreciate your comments.
>
>
> regards
> helmut
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
>
> iEYEARECAAYFAkl/GeMACgkQ4tZeNddg3dzurACgszPDA573+uZjmY5TWXF9yj5F
> Vz8An2FvK0FsDLr0JQaHFDETWnLoPSkD
> =0hkL
> -END PGP SIGNATURE-
>
> ___
> Freeswitch-users mailing list
> Freeswitch-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_miness...@hotmail.com 
GTALK/JABBER/PAYPAL:anthony.miness...@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:8...@conference.freeswitch.org 
iax:gu...@conference.freeswitch.org/888
googletalk:conf+...@conference.freeswitch.org
pstn:213-799-1400
___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-27 Thread Helmut Kuper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,


again an update to my little project:

I enhanced mod_openzap and ozmod_isdn so that I'm able to start and stop
q931ToPcap generation in ozmod_isdn from FS's console. q931ToPcap itself
isn't implemented yet.

To give you an idea about the enhanced oz command - it's like this:

freeswi...@ippbx-prod-node0> oz
API CALL [oz()] output:
list || dump  [] || bounce  [] ||
q931_pcap  on|off
freeswi...@ippbx-prod-node0> oz q931_pcap
API CALL [oz(q931_pcap)] output:
- -ERR Usage: oz q931_pcap  on|off

freeswi...@ippbx-prod-node0> oz q931_pcap 0 on
API CALL [oz(q931_pcap 0 on)] output:
- -ERR invalid span

freeswi...@ippbx-prod-node0> oz q931_pcap 1 on
API CALL [oz(q931_pcap 1 on)] output:

2009-01-27 15:21:55 [INFO] mod_openzap.c:2172 oz_function() Starting
Q931-to-pcap
2009-01-27 15:21:55 [DEBUG] ozmod_isdn.c:1712 zap_isdn_configure_span()
Enabling Q931ToPcap
freeswi...@ippbx-prod-node0> oz q931_pcap 1 off
API CALL [oz(q931_pcap 1 off)] output:

2009-01-27 15:21:58 [INFO] mod_openzap.c:2178 oz_function() Stopping
Q931-to-pcap
2009-01-27 15:21:58 [DEBUG] ozmod_isdn.c:1717 zap_isdn_configure_span()
Disabling Q931ToPcap
freeswi...@ippbx-prod-node0>



As you can see, ozmod_isdn, where I will implement the code receives the
oz command option.

I appreciate your comments.


regards
helmut
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAkl/GeMACgkQ4tZeNddg3dzurACgszPDA573+uZjmY5TWXF9yj5F
Vz8An2FvK0FsDLr0JQaHFDETWnLoPSkD
=0hkL
-END PGP SIGNATURE-

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Re: [Freeswitch-users] Q931 decoding Update

2009-01-24 Thread Helmut Kuper
Hello,

to keep you informed. The stand alone c code is fully working now.
wireshark can decode and display the generated packets containing Q931
hex dump samples I copied from FS log into the c code. So now I will
start to put it into openzap/mod_openzap.

regards
helmut

___
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org