From jalsot at gmail.com Thu Dec 4 03:16:34 2008 From: jalsot at gmail.com (Tamas) Date: Thu, 04 Dec 2008 12:16:34 +0100 Subject: [Freeswitch-dev] Issue around IPv6 Message-ID: <4937BC12.1030108@gmail.com> Hello, My original issue was that after some time (unable to find a rule when) registering gateway stopped suddenly working and went to status DOWN and state was FAIL_WAIT. In the logs I saw that it was trying to register continuously, but there were no REGISTER packet sent out anymore. Clients registering to this box were able to register, just it was not able to register to the upstream box (FreeSWITCH too). Registering scheme: clients--->FS local---(NAT)--->FS public When I've caught such a case again, I was stracing FS processes and found this: stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2393, ...}) = 0 futex(0x2ac3092ead94, 0x85 /* FUTEX_??? */, 1) = 1 futex(0x2ac3092ead40, 0x81 /* FUTEX_??? */, 1) = 1 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 34 setsockopt(34, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 connect(34, {sa_family=AF_INET, sin_port=htons(4242), sin_addr=inet_addr("82.45.148.209")}, 16) = 0 getsockname(34, {sa_family=AF_INET, sin_port=htons(32824), sin_addr=inet_addr("192.168.1.38")}, [1451698946064]) = 0 close(34) = 0 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 34 connect(34, {sa_family=AF_INET6, sin6_port=htons(4242), inet_pton(AF_INET6, "2001:503:ba3e::2:30", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable) close(34) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2393, ...}) = 0 futex(0x2ac3092ead94, 0x85 /* FUTEX_??? */, 1) = 1 futex(0x2ac3092ead40, 0x81 /* FUTEX_??? */, 1) = 1 >From this I guess, my issue relates to IPv6. That is right that the box has IPv6 address on the eth interface (ubuntu default), but this has worked for some days or some hours (varies) without this issue. So something might happen for which FS suddenly started using the IPv6 interface address (which is not configured well). I've found tha given public IP (82.45.148.209) in switch_find_local_ip function and have found that this is a root DNS server and the role of this function is to find the local IP address. As I was looking for the source, probably something sent wrong family to this function (AF_INET6 in place of AF_INET). Maybe this is a trivial issue for the experts... I'm sure that if I remove the ipv6 things from my system it will be OK, however I had similar issue on a box with no ipv6 address to. I'm not sure if it is the same/similar issue or not, but the symptoms looks similar. Unfortunately we had to restart that box (production) and since that the problem disappeared (that was maybe fixed - the case happened about 2 weeks ago). I think some users - mainly on test systems like I have - might face to this issue so it might be worth to take a look, why had FS suddenly tried to send packets on ivp6. This could be a system issue too - something crazy with Xen or Ubuntu? Thanks in advance! Regards, Tamas ps: FreeSwitch Version 1.0.trunk (10567M) Ubuntu Hoary (8.04) under Xen From jalsot at gmail.com Thu Dec 4 03:59:48 2008 From: jalsot at gmail.com (Tamas) Date: Thu, 04 Dec 2008 12:59:48 +0100 Subject: [Freeswitch-dev] Issue around IPv6 In-Reply-To: <4937BC12.1030108@gmail.com> References: <4937BC12.1030108@gmail.com> Message-ID: <4937C634.9080702@gmail.com> Hi, I was looking for the strace and found that probably I was wrong with the inference. >From strace I see (now) that ipv4 try was OK, thus something else might block the sip register packets. Any idea? Regards, Tamas Tamas ?rta: > Hello, > > My original issue was that after some time (unable to find a rule when) > registering gateway stopped suddenly working and went to status DOWN and > state was FAIL_WAIT. > In the logs I saw that it was trying to register continuously, but there > were no REGISTER packet sent out anymore. Clients registering to this > box were able to register, just it was not able to register to the > upstream box (FreeSWITCH too). Registering scheme: > clients--->FS local---(NAT)--->FS public > > When I've caught such a case again, I was stracing FS processes and > found this: > stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2393, ...}) = 0 > futex(0x2ac3092ead94, 0x85 /* FUTEX_??? */, 1) = 1 > futex(0x2ac3092ead40, 0x81 /* FUTEX_??? */, 1) = 1 > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 34 > setsockopt(34, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 > connect(34, {sa_family=AF_INET, sin_port=htons(4242), > sin_addr=inet_addr("82.45.148.209")}, 16) = 0 > getsockname(34, {sa_family=AF_INET, sin_port=htons(32824), > sin_addr=inet_addr("192.168.1.38")}, [1451698946064]) = 0 > close(34) = 0 > socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 34 > connect(34, {sa_family=AF_INET6, sin6_port=htons(4242), > inet_pton(AF_INET6, "2001:503:ba3e::2:30", &sin6_addr), sin6_flowinfo=0, > sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable) > close(34) = 0 > stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2393, ...}) = 0 > futex(0x2ac3092ead94, 0x85 /* FUTEX_??? */, 1) = 1 > futex(0x2ac3092ead40, 0x81 /* FUTEX_??? */, 1) = 1 > > From this I guess, my issue relates to IPv6. That is right that the box > has IPv6 address on the eth interface (ubuntu default), but this has > worked for some days or some hours (varies) without this issue. So > something might happen for which FS suddenly started using the IPv6 > interface address (which is not configured well). > > I've found tha given public IP (82.45.148.209) in switch_find_local_ip > function and have found that this is a root DNS server and the role of > this function is to find the local IP address. As I was looking for the > source, probably something sent wrong family to this function (AF_INET6 > in place of AF_INET). Maybe this is a trivial issue for the experts... > > I'm sure that if I remove the ipv6 things from my system it will be OK, > however I had similar issue on a box with no ipv6 address to. I'm not > sure if it is the same/similar issue or not, but the symptoms looks > similar. Unfortunately we had to restart that box (production) and since > that the problem disappeared (that was maybe fixed - the case happened > about 2 weeks ago). > > I think some users - mainly on test systems like I have - might face to > this issue so it might be worth to take a look, why had FS suddenly > tried to send packets on ivp6. This could be a system issue too - > something crazy with Xen or Ubuntu? > > Thanks in advance! > > Regards, > Tamas > > ps: FreeSwitch Version 1.0.trunk (10567M) > Ubuntu Hoary (8.04) under Xen > > From mike at jerris.com Thu Dec 4 11:10:07 2008 From: mike at jerris.com (Michael Jerris) Date: Thu, 4 Dec 2008 14:10:07 -0500 Subject: [Freeswitch-dev] Issue around IPv6 In-Reply-To: <4937C634.9080702@gmail.com> References: <4937BC12.1030108@gmail.com> <4937C634.9080702@gmail.com> Message-ID: <04ABDB32-55E4-4D01-BCA7-6F3A69D4AC2B@jerris.com> could be a lot of things, icmp failure? Other side just not responding, eventually we give up trying to reg over and over and if you have it setup we send options pings to see when it wakes up. Mike On Dec 4, 2008, at 6:59 AM, Tamas wrote: > Hi, > > I was looking for the strace and found that probably I was wrong with > the inference. >> From strace I see (now) that ipv4 try was OK, thus something else >> might > block the sip register packets. > Any idea? > > Regards, > Tamas > > Tamas ?rta: >> Hello, >> >> My original issue was that after some time (unable to find a rule >> when) >> registering gateway stopped suddenly working and went to status >> DOWN and >> state was FAIL_WAIT. >> In the logs I saw that it was trying to register continuously, but >> there >> were no REGISTER packet sent out anymore. Clients registering to this >> box were able to register, just it was not able to register to the >> upstream box (FreeSWITCH too). Registering scheme: >> clients--->FS local---(NAT)--->FS public >> >> When I've caught such a case again, I was stracing FS processes and >> found this: >> stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2393, ...}) = 0 >> futex(0x2ac3092ead94, 0x85 /* FUTEX_??? */, 1) = 1 >> futex(0x2ac3092ead40, 0x81 /* FUTEX_??? */, 1) = 1 >> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 34 >> setsockopt(34, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 >> connect(34, {sa_family=AF_INET, sin_port=htons(4242), >> sin_addr=inet_addr("82.45.148.209")}, 16) = 0 >> getsockname(34, {sa_family=AF_INET, sin_port=htons(32824), >> sin_addr=inet_addr("192.168.1.38")}, [1451698946064]) = 0 >> close(34) = 0 >> socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 34 >> connect(34, {sa_family=AF_INET6, sin6_port=htons(4242), >> inet_pton(AF_INET6, "2001:503:ba3e::2:30", &sin6_addr), >> sin6_flowinfo=0, >> sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable) >> close(34) = 0 >> stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2393, ...}) = 0 >> futex(0x2ac3092ead94, 0x85 /* FUTEX_??? */, 1) = 1 >> futex(0x2ac3092ead40, 0x81 /* FUTEX_??? */, 1) = 1 >> >> From this I guess, my issue relates to IPv6. That is right that the >> box >> has IPv6 address on the eth interface (ubuntu default), but this has >> worked for some days or some hours (varies) without this issue. So >> something might happen for which FS suddenly started using the IPv6 >> interface address (which is not configured well). >> >> I've found tha given public IP (82.45.148.209) in >> switch_find_local_ip >> function and have found that this is a root DNS server and the role >> of >> this function is to find the local IP address. As I was looking for >> the >> source, probably something sent wrong family to this function >> (AF_INET6 >> in place of AF_INET). Maybe this is a trivial issue for the >> experts... >> >> I'm sure that if I remove the ipv6 things from my system it will be >> OK, >> however I had similar issue on a box with no ipv6 address to. I'm not >> sure if it is the same/similar issue or not, but the symptoms looks >> similar. Unfortunately we had to restart that box (production) and >> since >> that the problem disappeared (that was maybe fixed - the case >> happened >> about 2 weeks ago). >> >> I think some users - mainly on test systems like I have - might >> face to >> this issue so it might be worth to take a look, why had FS suddenly >> tried to send packets on ivp6. This could be a system issue too - >> something crazy with Xen or Ubuntu? >> >> Thanks in advance! >> >> Regards, >> Tamas >> >> ps: FreeSwitch Version 1.0.trunk (10567M) >> Ubuntu Hoary (8.04) under Xen >> From huyours at 163.com Fri Dec 5 12:52:02 2008 From: huyours at 163.com (Yours) Date: Sat, 6 Dec 2008 04:52:02 +0800 (CST) Subject: [Freeswitch-dev] [Freeswitch-dev ] Compile on VS 2005 on windows XP In-Reply-To: References: Message-ID: <577854.373681228510322740.JavaMail.coremail@bj163app27.163.com> Dear all, I am realy fresh man with Freeswitch. I want to develop a windows version. so I try compile freeswitch following the guide in "Download & Installation Guide", but I can not succeed. I try fix some failure. But there are still so many fatal failure as following. any body could help me or give a updated guide on windows. BTW. I download the exe package on windows, it does not work on windows xp. 3 error C2220: warning treated as error - no 'object' file generated d:\freeswitch\libs\sofia-sip\libsofia-sip-ua\msg\msg_parser.c 1 5 error C2220: warning treated as error - no 'object' file generated d:\freeswitch\libs\sofia-sip\libsofia-sip-ua\nua\nua.c 1 7 Can not delete?d:\freeswitch\libs\howl-1.0.0?? 8 error LNK2019: unresolved external symbol _va_copy referenced in function _BuildArgArray jsprf.obj 9 fatal error LNK1120: 1 unresolved externals D:\freeswitch\Debug\js32.dll 1 10 error LNK2019: unresolved external symbol __imp__apr_md5 at 12 referenced in function _switch_md5 at 12 switch_apr.obj 11 fatal error LNK1120: 1 unresolved externals D:\freeswitch\Debug\FreeSwitch.dll 1 12 error C2220: warning treated as error - no 'object' file generated d:\freeswitch\src\include\switch_utils.h 70 19 error C2220: warning treated as error - no 'object' file generated d:\freeswitch\src\include\switch_utils.h 70 24 error C2220: warning treated as error - no 'object' file generated d:\freeswitch\src\include\switch_utils.h 70 32 error C2220: warning treated as error - no 'object' file generated d:\freeswitch\src\include\switch_utils.h 70 44 error C2220: warning treated as error - no 'object' file generated d:\freeswitch\src\include\switch_utils.h 70 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081206/db6a5e1d/attachment.html From carlos.talbot at gmail.com Fri Dec 5 13:21:38 2008 From: carlos.talbot at gmail.com (Carlos Talbot) Date: Fri, 5 Dec 2008 15:21:38 -0600 Subject: [Freeswitch-dev] [Freeswitch-dev ] Compile on VS 2005 on windows XP In-Reply-To: <577854.373681228510322740.JavaMail.coremail@bj163app27.163.com> References: <577854.373681228510322740.JavaMail.coremail@bj163app27.163.com> Message-ID: <5800526b0812051321w505234c5t86a9913f77c1ba11@mail.gmail.com> I don't believe we're supporting VC 2005 at this point. The solution file for 2008 works just fine. Also, did you bother to read the this before launching the executable? http://wiki.freeswitch.org/wiki/Installation_Guide#Precompiled_Binaries Before starting up FreeSwitch, make sure you have the Microsoft VC++ 2008 redistributable library installed: http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en (free download) 2008/12/5 Yours > Dear all, > > I am realy fresh man with Freeswitch. > > I want to develop a windows version. so I try compile freeswitch following > the guide in "Download & Installation Guide", but I can not succeed. I try > fix some failure. But there are still so many fatal failure as following. > any body could help me or give a updated guide on windows. > > BTW. I download the exe package on windows, it does not work on windows xp. > > 3 error C2220: warning treated as error - no 'object' file > generated d:\freeswitch\libs\sofia-sip\libsofia-sip-ua\msg\msg_parser.c 1 > 5 error C2220: warning treated as error - no 'object' file > generated d:\freeswitch\libs\sofia-sip\libsofia-sip-ua\nua\nua.c 1 > 7 Can not delete"d:\freeswitch\libs\howl-1.0.0"? > 8 error LNK2019: unresolved external symbol _va_copy referenced in function > _BuildArgArray jsprf.obj > 9 fatal error LNK1120: 1 unresolved > externals D:\freeswitch\Debug\js32.dll 1 > 10 error LNK2019: unresolved external symbol __imp__apr_md5 at 12 referenced > in function _switch_md5 at 12 switch_apr.obj > 11 fatal error LNK1120: 1 unresolved > externals D:\freeswitch\Debug\FreeSwitch.dll 1 > 12 error C2220: warning treated as error - no 'object' file > generated d:\freeswitch\src\include\switch_utils.h 70 > 19 error C2220: warning treated as error - no 'object' file > generated d:\freeswitch\src\include\switch_utils.h 70 > 24 error C2220: warning treated as error - no 'object' file > generated d:\freeswitch\src\include\switch_utils.h 70 > 32 error C2220: warning treated as error - no 'object' file > generated d:\freeswitch\src\include\switch_utils.h 70 > 44 error C2220: warning treated as error - no 'object' file > generated d:\freeswitch\src\include\switch_utils.h 70 > > > > > ------------------------------ > ????????????????? > _______________________________________________ > Freeswitch-dev mailing list > Freeswitch-dev at lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081205/fc3796b6/attachment.html From anthony.minessale at gmail.com Fri Dec 5 13:49:26 2008 From: anthony.minessale at gmail.com (Anthony Minessale) Date: Fri, 5 Dec 2008 15:49:26 -0600 Subject: [Freeswitch-dev] [Freeswitch-dev ] Compile on VS 2005 on windows XP In-Reply-To: <5800526b0812051321w505234c5t86a9913f77c1ba11@mail.gmail.com> References: <577854.373681228510322740.JavaMail.coremail@bj163app27.163.com> <5800526b0812051321w505234c5t86a9913f77c1ba11@mail.gmail.com> Message-ID: <191c3a030812051349h62f32d7ct26178cdb09babde8@mail.gmail.com> There is a legacy 2005 project file in tree: Freeswitch.2005.unsupported.sln You can use it but it does not have all of the latest modules building etc. We recommend 2008 edition. On Fri, Dec 5, 2008 at 3:21 PM, Carlos Talbot wrote: > I don't believe we're supporting VC 2005 at this point. The solution file > for 2008 works just fine. > > Also, did you bother to read the this before launching the executable? > http://wiki.freeswitch.org/wiki/Installation_Guide#Precompiled_Binaries > > Before starting up FreeSwitch, make sure you have the Microsoft VC++ 2008 > redistributable library installed: > > http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en (free download) > > > > 2008/12/5 Yours > >> Dear all, >> >> I am realy fresh man with Freeswitch. >> >> I want to develop a windows version. so I try compile freeswitch following >> the guide in "Download & Installation Guide", but I can not succeed. I try >> fix some failure. But there are still so many fatal failure as following. >> any body could help me or give a updated guide on windows. >> >> BTW. I download the exe package on windows, it does not work on windows >> xp. >> >> 3 error C2220: warning treated as error - no 'object' file >> generated d:\freeswitch\libs\sofia-sip\libsofia-sip-ua\msg\msg_parser.c 1 >> 5 error C2220: warning treated as error - no 'object' file >> generated d:\freeswitch\libs\sofia-sip\libsofia-sip-ua\nua\nua.c 1 >> 7 Can not delete"d:\freeswitch\libs\howl-1.0.0"? >> 8 error LNK2019: unresolved external symbol _va_copy referenced in >> function _BuildArgArray jsprf.obj >> 9 fatal error LNK1120: 1 unresolved >> externals D:\freeswitch\Debug\js32.dll 1 >> 10 error LNK2019: unresolved external symbol __imp__apr_md5 at 12 referenced >> in function _switch_md5 at 12 switch_apr.obj >> 11 fatal error LNK1120: 1 unresolved >> externals D:\freeswitch\Debug\FreeSwitch.dll 1 >> 12 error C2220: warning treated as error - no 'object' file >> generated d:\freeswitch\src\include\switch_utils.h 70 >> 19 error C2220: warning treated as error - no 'object' file >> generated d:\freeswitch\src\include\switch_utils.h 70 >> 24 error C2220: warning treated as error - no 'object' file >> generated d:\freeswitch\src\include\switch_utils.h 70 >> 32 error C2220: warning treated as error - no 'object' file >> generated d:\freeswitch\src\include\switch_utils.h 70 >> 44 error C2220: warning treated as error - no 'object' file >> generated d:\freeswitch\src\include\switch_utils.h 70 >> >> >> >> >> ------------------------------ >> ????????????????? >> _______________________________________________ >> Freeswitch-dev mailing list >> Freeswitch-dev at lists.freeswitch.org >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev >> http://www.freeswitch.org >> >> > > _______________________________________________ > Freeswitch-dev mailing list > Freeswitch-dev at lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > > -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale at hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888 at conference.freeswitch.org iax:guest at conference.freeswitch.org/888 googletalk:conf+888 at conference.freeswitch.org pstn:213-799-1400 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081205/1be6abd0/attachment-0001.html From jalsot at gmail.com Sun Dec 7 11:43:46 2008 From: jalsot at gmail.com (Tamas) Date: Sun, 07 Dec 2008 20:43:46 +0100 Subject: [Freeswitch-dev] Issue around IPv6 In-Reply-To: <04ABDB32-55E4-4D01-BCA7-6F3A69D4AC2B@jerris.com> References: <4937BC12.1030108@gmail.com> <4937C634.9080702@gmail.com> <04ABDB32-55E4-4D01-BCA7-6F3A69D4AC2B@jerris.com> Message-ID: <493C2772.3000500@gmail.com> Hello, we have tracked down the issue. It had nothing to do with IPv6, but the DNS resolver. In resolv.conf we had 2 DNS servers, the 1st one was OK, but the 2nd was bad. It had happened that the 1st one responded very slowly so the box started to ask the 2nd one which didn't give back right records. It did that till the 2nd DNS server was late so the REGISTER suddenly started working. I hope fixing resolv.conf will solve all the issues. What I still don't know is why the resolver used the wrong DNS server, however. Is this a linux DNS resolver issue or maybe FS udns lib issue? Just curious... So a very important point: have correct DNS resolving on FS box :) Regards, Tamas Michael Jerris ?rta: > could be a lot of things, icmp failure? Other side just not > responding, eventually we give up trying to reg over and over and if > you have it setup we send options pings to see when it wakes up. > > Mike > > On Dec 4, 2008, at 6:59 AM, Tamas wrote: > > >> Hi, >> >> I was looking for the strace and found that probably I was wrong with >> the inference. >> >>> From strace I see (now) that ipv4 try was OK, thus something else >>> might >>> >> block the sip register packets. >> Any idea? >> >> Regards, >> Tamas >> >> Tamas ?rta: >> >>> Hello, >>> >>> My original issue was that after some time (unable to find a rule >>> when) >>> registering gateway stopped suddenly working and went to status >>> DOWN and >>> state was FAIL_WAIT. >>> In the logs I saw that it was trying to register continuously, but >>> there >>> were no REGISTER packet sent out anymore. Clients registering to this >>> box were able to register, just it was not able to register to the >>> upstream box (FreeSWITCH too). Registering scheme: >>> clients--->FS local---(NAT)--->FS public >>> >>> When I've caught such a case again, I was stracing FS processes and >>> found this: >>> stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2393, ...}) = 0 >>> futex(0x2ac3092ead94, 0x85 /* FUTEX_??? */, 1) = 1 >>> futex(0x2ac3092ead40, 0x81 /* FUTEX_??? */, 1) = 1 >>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 34 >>> setsockopt(34, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0 >>> connect(34, {sa_family=AF_INET, sin_port=htons(4242), >>> sin_addr=inet_addr("82.45.148.209")}, 16) = 0 >>> getsockname(34, {sa_family=AF_INET, sin_port=htons(32824), >>> sin_addr=inet_addr("192.168.1.38")}, [1451698946064]) = 0 >>> close(34) = 0 >>> socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 34 >>> connect(34, {sa_family=AF_INET6, sin6_port=htons(4242), >>> inet_pton(AF_INET6, "2001:503:ba3e::2:30", &sin6_addr), >>> sin6_flowinfo=0, >>> sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable) >>> close(34) = 0 >>> stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2393, ...}) = 0 >>> futex(0x2ac3092ead94, 0x85 /* FUTEX_??? */, 1) = 1 >>> futex(0x2ac3092ead40, 0x81 /* FUTEX_??? */, 1) = 1 >>> >>> From this I guess, my issue relates to IPv6. That is right that the >>> box >>> has IPv6 address on the eth interface (ubuntu default), but this has >>> worked for some days or some hours (varies) without this issue. So >>> something might happen for which FS suddenly started using the IPv6 >>> interface address (which is not configured well). >>> >>> I've found tha given public IP (82.45.148.209) in >>> switch_find_local_ip >>> function and have found that this is a root DNS server and the role >>> of >>> this function is to find the local IP address. As I was looking for >>> the >>> source, probably something sent wrong family to this function >>> (AF_INET6 >>> in place of AF_INET). Maybe this is a trivial issue for the >>> experts... >>> >>> I'm sure that if I remove the ipv6 things from my system it will be >>> OK, >>> however I had similar issue on a box with no ipv6 address to. I'm not >>> sure if it is the same/similar issue or not, but the symptoms looks >>> similar. Unfortunately we had to restart that box (production) and >>> since >>> that the problem disappeared (that was maybe fixed - the case >>> happened >>> about 2 weeks ago). >>> >>> I think some users - mainly on test systems like I have - might >>> face to >>> this issue so it might be worth to take a look, why had FS suddenly >>> tried to send packets on ivp6. This could be a system issue too - >>> something crazy with Xen or Ubuntu? >>> >>> Thanks in advance! >>> >>> Regards, >>> Tamas >>> >>> ps: FreeSwitch Version 1.0.trunk (10567M) >>> Ubuntu Hoary (8.04) under Xen >>> >>> > > _______________________________________________ > Freeswitch-dev mailing list > Freeswitch-dev at lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > From brian at freeswitch.org Sun Dec 7 11:57:52 2008 From: brian at freeswitch.org (Brian West) Date: Sun, 7 Dec 2008 13:57:52 -0600 Subject: [Freeswitch-dev] Issue around IPv6 In-Reply-To: <493C2772.3000500@gmail.com> References: <4937BC12.1030108@gmail.com> <4937C634.9080702@gmail.com> <04ABDB32-55E4-4D01-BCA7-6F3A69D4AC2B@jerris.com> <493C2772.3000500@gmail.com> Message-ID: <06B63F80-993B-46DA-96E9-240DEC78EC27@freeswitch.org> Doesn't this apply to EVERYTHING? ;) /b On Dec 7, 2008, at 1:43 PM, Tamas wrote: > So a very important point: have correct DNS resolving on FS box :) From jalsot at gmail.com Sun Dec 7 12:00:33 2008 From: jalsot at gmail.com (Tamas) Date: Sun, 07 Dec 2008 21:00:33 +0100 Subject: [Freeswitch-dev] Issue around IPv6 In-Reply-To: <06B63F80-993B-46DA-96E9-240DEC78EC27@freeswitch.org> References: <4937BC12.1030108@gmail.com> <4937C634.9080702@gmail.com> <04ABDB32-55E4-4D01-BCA7-6F3A69D4AC2B@jerris.com> <493C2772.3000500@gmail.com> <06B63F80-993B-46DA-96E9-240DEC78EC27@freeswitch.org> Message-ID: <493C2B61.9020907@gmail.com> Yeah, but somehow didn't have issues with anything else on the box... T. Brian West ?rta: > Doesn't this apply to EVERYTHING? ;) > > /b > > On Dec 7, 2008, at 1:43 PM, Tamas wrote: > > >> So a very important point: have correct DNS resolving on FS box :) >> > > > _______________________________________________ > Freeswitch-dev mailing list > Freeswitch-dev at lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > From juanjo at comellas.org Tue Dec 9 06:10:24 2008 From: juanjo at comellas.org (Juan Jose Comellas) Date: Tue, 9 Dec 2008 12:10:24 -0200 Subject: [Freeswitch-dev] Audio formats without transcoding Message-ID: <1c3be50f0812090610u7830391cmbf3e76f96dca9b79@mail.gmail.com> I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem? Thanks. From mike at jerris.com Tue Dec 9 07:24:00 2008 From: mike at jerris.com (Michael Jerris) Date: Tue, 9 Dec 2008 10:24:00 -0500 Subject: [Freeswitch-dev] Audio formats without transcoding In-Reply-To: <1c3be50f0812090610u7830391cmbf3e76f96dca9b79@mail.gmail.com> References: <1c3be50f0812090610u7830391cmbf3e76f96dca9b79@mail.gmail.com> Message-ID: <7355B165-9BB4-4E81-B974-42B929CB0856@jerris.com> yes, you can use mod_native_file. Mike On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote: > I need to support calls using G.711, G.729 and G.722 and I want to > avoid transcoding as much as possible. Does FreeSWITCH support playing > audios in a raw format that does not require transcoding for any of > these codecs? It looks like FS provides WAV audio files with the > frequencies of the supported codecs and relies on transcoding all the > time. Is my analysis correct? How does everybody else handle this > problem? From msc at freeswitch.org Tue Dec 9 08:34:36 2008 From: msc at freeswitch.org (Michael Collins) Date: Tue, 9 Dec 2008 08:34:36 -0800 Subject: [Freeswitch-dev] Audio formats without transcoding In-Reply-To: <7355B165-9BB4-4E81-B974-42B929CB0856@jerris.com> References: <1c3be50f0812090610u7830391cmbf3e76f96dca9b79@mail.gmail.com> <7355B165-9BB4-4E81-B974-42B929CB0856@jerris.com> Message-ID: <87f2f3b90812090834x134b93eeq2036e8ce3f1c92ed@mail.gmail.com> Unfortunately mod_native_file hasn't been documented on the wiki yet. I'm going to work on that. However, the gist of it is this: if you have a file in the proper format, such as g711, then you can specify the file name w/o the extension and FreeSWITCH will pick the right one for the codec being used. You'll need to make sure that your file names have the proper extensions, like .pcmu for mu-law. A complete list is available here: http://www.iana.org/assignments/media-types/audio/ so if you have these files: /tmp/hello.wav /tmp/hello.pcmu /tmp/hello.gsm /tmp/hello.g729 you can specify the exact file name, in which case FS will play the file and do whatever transcoding is needed. Or you can specify the filename without the extension and FS will pick the appropriate one: Look for an update on the wiki in the next day or two. In the meantime please report back if you have any issues. -MC On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris wrote: > yes, you can use mod_native_file. > > Mike > > On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote: > >> I need to support calls using G.711, G.729 and G.722 and I want to >> avoid transcoding as much as possible. Does FreeSWITCH support playing >> audios in a raw format that does not require transcoding for any of >> these codecs? It looks like FS provides WAV audio files with the >> frequencies of the supported codecs and relies on transcoding all the >> time. Is my analysis correct? How does everybody else handle this >> problem? > > > _______________________________________________ > Freeswitch-dev mailing list > Freeswitch-dev at lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org > From brian at freeswitch.org Wed Dec 10 12:27:22 2008 From: brian at freeswitch.org (Brian West) Date: Wed, 10 Dec 2008 14:27:22 -0600 Subject: [Freeswitch-dev] Sounds for pending 1.0.2/Hardware Message-ID: FreeSWITCHers, I'm looking for donations for the next batch of sound files we need to have done for the up coming 1.0.2 release. I have had others pitch in some money in the past and I thank everyone for doing so. I hope everyone can come together and help me raise about $200 to pay for this batch of prompts. I also would like to thank Bandwidth.com and Teliax for their support of the FreeSWITCH project. Are you ready for 1.0.2? Go download SVN Trunk and beat it up for us... If you wish to donate please paypal brian at freeswitch.org that'll help out! Happy Holidays, Brian West FreeSWITCH.org PS: If you know of any sound files we need let me know. From brian at freeswitch.org Wed Dec 10 15:06:17 2008 From: brian at freeswitch.org (Brian West) Date: Wed, 10 Dec 2008 17:06:17 -0600 Subject: [Freeswitch-dev] Hardware requests. Message-ID: <1B94AB6C-022D-47E8-9868-92CE89EA0FD4@freeswitch.org> Does anyone have a Polycom 320 they would like to donate to the project? I need one to trouble shoot a problem. Please contact me off list. Thanks, Brian West From krice at suspicious.org Wed Dec 10 17:39:32 2008 From: krice at suspicious.org (Ken Rice) Date: Wed, 10 Dec 2008 19:39:32 -0600 Subject: [Freeswitch-dev] Sounds for pending 1.0.2/Hardware In-Reply-To: Message-ID: Hey Guys... I spoke with Brian on this a few minutes ago and some money has already showed up for the sound files... Lets see if we can go ahead and make it where Brian can get these files on order early tomorrow so get can make sure they get us a good Christmas Present in the form of a new stable release K > From: Brian West > Reply-To: "freeswitch-dev at lists.freeswitch.org" > > Date: Wed, 10 Dec 2008 14:27:22 -0600 > To: > Cc: "freeswitch-dev at lists.freeswitch.org" > > Subject: [Freeswitch-dev] Sounds for pending 1.0.2/Hardware > > FreeSWITCHers, > > I'm looking for donations for the next batch of sound files we need to > have done for the up coming 1.0.2 release. > > I have had others pitch in some money in the past and I thank everyone > for doing so. I hope everyone > can come together and help me raise about $200 to pay for this batch > of prompts. > > I also would like to thank Bandwidth.com and Teliax for their support > of the FreeSWITCH project. > > Are you ready for 1.0.2? Go download SVN Trunk and beat it up for us... > > If you wish to donate please paypal brian at freeswitch.org that'll help > out! > > Happy Holidays, > Brian West > FreeSWITCH.org > PS: If you know of any sound files we need let me know. > > _______________________________________________ > Freeswitch-dev mailing list > Freeswitch-dev at lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org From andrew.duquet at gmail.com Tue Dec 9 13:44:07 2008 From: andrew.duquet at gmail.com (Andrew Duquet) Date: Tue, 9 Dec 2008 13:44:07 -0800 Subject: [Freeswitch-dev] VOIP Software Engineering Referral requests (Palo Alto) 2 positions In-Reply-To: References: Message-ID: <1b994f360812091344x28892334r887ae5ffbd5a9e1e@mail.gmail.com> Hi, Can someone with FreeSwitch development experience help me? Can you happen to recommend someone for one of two embedded software (VOIP) engineering positions in Palo Alto, CA? Any embedded software development experience with FreeSwitch or Astricks or other opensource VOIP software would be a big plus. *Summary:* Responsible for developing and maintaining the embedded Linux platform, including telephony and SW applications *Essential Duties and Responsibilities*: (They include the following. Other duties may be assigned.) ? Full life cycle: Design, coding, unit testing, optimization, and maintenance of ooma's embedded and core server networking software ? Integrate and maintain 3rd party and open source SW ? Troubleshoot escalated field issues ? Participate in creation of SW specifications ? Support and participate in overall system integration testing Experience Required: ? 10+ years C/C++ ? 5+ years VoIP (SIP, RTP/RTCP,) ? Experienced in embedded software development ? Linux Kernel Development ? PBX, Modem, Router development ? Asterisk/FreeSWITCH development ? Linux Networking (sockets, TCP/IP, UDP, VPN, Firewalls, iptables) ? TDM bus, Analog Telephony Hardware Driver Development ? JTAG usage & Hardware bring-up/troubleshooting ? Experience using and maintaining Open Source SW Additional Useful Experience: ? DECT ? ARM/MIPS ? VoIP server side (Media Gateway, Session Boarder Controller) ? DSP ? Voice CODEC ? Scripting (Perl, Python, Bash) Education: Bachelors degree in computer science or computer engineering or equivalent Language Skills: Ability to read and interpret documents such as technical manuals and interface specifications. Ability to write design documents, technical notes, routine reports and correspondence. Ability to speak effectively before peers. Thanks! -Andrew -- Andrew Duquet Owner/Recruiter Searchlight Systems t:510.525.3200 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081209/95e0c610/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: Sr_Embedded_SW_Engineer_Job_Desc 2008-11-17.doc Type: application/msword Size: 49152 bytes Desc: not available Url : http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081209/95e0c610/attachment-0001.doc From michael at omniscient.com.au Fri Dec 12 19:39:54 2008 From: michael at omniscient.com.au (Michael Taylor) Date: Sat, 13 Dec 2008 14:39:54 +1100 Subject: [Freeswitch-dev] Compiling on NetBSD Message-ID: <49432E8A.2000207@omniscient.com.au> Hi, I am using FreeSwitch on NetBSD. Some changes where needed to get FS to compile on NetBSD, these changes have been documented by Jesse and I at: http://wiki.freeswitch.org/wiki/NetBSD My question is: What is the best way to get these changes commited into the repository? My guesses are: - submit bug reports - request a subversion branch I understand that certain checks/processes will need to be done before changes will get committed to the trunk. Can you give me an overview of these processes? As part of the processes to get commits into trunk, what actions can I take to make this easier? i.e. I plan to setup some additional testing machines with non-NetBSD so that changes I make for NetBSD can be checked that they do not break other OSs. Michael. -- Omniscient Australia Pty Ltd http://www.omniscient.com.au 1300 660 152 GPO Box 2705 MELBOURNE 3001 -------------- next part -------------- A non-text attachment was scrubbed... Name: michael.vcf Type: text/x-vcard Size: 290 bytes Desc: not available Url : http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081213/f2200917/attachment.vcf From michael at omniscient.com.au Fri Dec 12 20:21:08 2008 From: michael at omniscient.com.au (Michael Taylor) Date: Sat, 13 Dec 2008 15:21:08 +1100 Subject: [Freeswitch-dev] Shared voicemail boxes Message-ID: <49433834.2050402@omniscient.com.au> Hi, I have an interest in setting up FreeSwitch in a small office where there is only one voicemail box shared by many distinct extensions. I am aware of how I can modify the standard dialplan logic so that the voicemail application is always given a specific mailbox number regardless of which extension is dialed. My question is: How do I get the MWI on different SIP extensions to all show the status of the single mailbox. Lets setup an example, we have the following simplified directory i.e. the intention is for all voicemail to be stored in box number 200 regardless of what extension was called. currently a SIP phone registered on extension 202 will be notified of mail in box 202 (the registered extension). My 2nd question: What is the intended use mailbox="" in a definition? switch_xml_locate_user() has the ability to locate a user by their mailbox number, but that would infer that each user would have a distinct mailbox number (because the function only returns the first user it finds with that number). If I was to define how I would want the the mailbox="" value to work, it would be: A user in the directory as would represent that: a) if you told the voicemail application to record voicemail for user 202 then it would store it in the box number 200. b) Later when user 202 requests MWI status, the voicemail module would lookup the box number 200. c) When user 202 wants to listen to their messages, they get directed to box number 200. a) and c) can be implemented in the dialplan with no coding. b) would need work in mod_voicemail in its processing of the event MESSAGE_QUERY If this suggested feature is appropriate then a), b) and c) should all be done in code so that the default dialplan does not need to be changed, and it is up to the directory contents as to whether mailboxes are shared or not. Michael. -- Omniscient Australia Pty Ltd http://www.omniscient.com.au 1300 660 152 GPO Box 2705 MELBOURNE 3001 -------------- next part -------------- A non-text attachment was scrubbed... Name: michael.vcf Type: text/x-vcard Size: 290 bytes Desc: not available Url : http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081213/6c237991/attachment.vcf From mitul at enterux.com Fri Dec 12 23:16:42 2008 From: mitul at enterux.com (Mitul Limbani) Date: Sat, 13 Dec 2008 02:16:42 -0500 Subject: [Freeswitch-dev] VOIP Software Engineering Referral requests (PaloAlto) 2 positions Message-ID: <2452.1229152602@enterux.com> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }Hello, I know of one such person who is a 12 years C++ and kernel hacker and has worked on lot of embedded stuff over these years but unfortunately, he aint there in US, he is in Spain, and he can get rolling on Asterisk n FreeSwitch within 10 days He can work remotely, in case your organization would like to exercise such an option, do let me know. Thanks & Regards, Mitul Limbani, Founder & CEO, Enterux Solutions, The Enterprise Linux Company (TM), www.enterux.com +91-9820332422 On Wed 10/12/08 03:14 , "Andrew Duquet" andrew.duquet at gmail.com sent: Hi, Can someone with FreeSwitch development experience help me? Can you happen to recommend someone for one of two embedded software (VOIP) engineering positions in Palo Alto, CA? Any embedded software development experience with FreeSwitch or Astricks or other opensource VOIP software would be a big plus. Summary: Responsible for developing and maintaining the embedded Linux platform, including telephony and SW applications Essential Duties and Responsibilities: (They include the following. Other duties may be assigned.) ? Full life cycle: Design, coding, unit testing, optimization, and maintenance of ooma's embedded and core server networking software ? Integrate and maintain 3rd party and open source SW ? Troubleshoot escalated field issues ? Participate in creation of SW specifications ? Support and participate in overall system integration testing Experience Required: ? 10+ years C/C++ ? 5+ years VoIP (SIP, RTP/RTCP,) ? Experienced in embedded software development ? Linux Kernel Development ? PBX, Modem, Router development ? Asterisk/FreeSWITCH development ? Linux Networking (sockets, TCP/IP, UDP, VPN, Firewalls, iptables) ? TDM bus, Analog Telephony Hardware Driver Development ? JTAG usage & Hardware bring-up/troubleshooting ? Experience using and maintaining Open Source SW Additional Useful Experience: ? DECT ? ARM/MIPS ? VoIP server side (Media Gateway, Session Boarder Controller) ? DSP ? Voice CODEC ? Scripting (Perl, Python, Bash) Education: Bachelors degree in computer science or computer engineering or equivalent Language Skills: Ability to read and interpret documents such as technical manuals and interface specifications. Ability to write design documents, technical notes, routine reports and correspondence. Ability to speak effectively before peers. Thanks!-Andrew -- Andrew Duquet Owner/Recruiter Searchlight Systems t:510.525.3200 ------------------------- Msg sent via Enterux Enterprise Email Server : http://www.enterux.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081213/b0f3d005/attachment.html From msc at freeswitch.org Fri Dec 12 22:48:22 2008 From: msc at freeswitch.org (Michael S Collins) Date: Fri, 12 Dec 2008 22:48:22 -0800 Subject: [Freeswitch-dev] Compiling on NetBSD In-Reply-To: <49432E8A.2000207@omniscient.com.au> References: <49432E8A.2000207@omniscient.com.au> Message-ID: Michael, Thanks for helping out! At this point submitting bug reports on jira.freeswitch.org is best. You attach an svn diff as a patch to the jira ticket. If you find that you are doing that sort of thing frequently then the devs will talk to you about svn access. -MC Sent from my iPhone On Dec 12, 2008, at 7:39 PM, Michael Taylor wrote: > Hi, > > I am using FreeSwitch on NetBSD. > > Some changes where needed to get FS to compile on NetBSD, these > changes have been documented by Jesse and I at: > http://wiki.freeswitch.org/wiki/NetBSD > > My question is: What is the best way to get these changes commited > into the repository? > > My guesses are: > - submit bug reports > - request a subversion branch > > I understand that certain checks/processes will need to be done before > changes will get committed to the trunk. Can you give me an overview > of these processes? > > As part of the processes to get commits into trunk, what actions can I > take to make this easier? i.e. I plan to setup some additional > testing > machines with non-NetBSD so that changes I make for NetBSD can be > checked > that they do not break other OSs. > > Michael. > > -- > Omniscient Australia Pty Ltd > http://www.omniscient.com.au > 1300 660 152 > GPO Box 2705 MELBOURNE 3001 > > > _______________________________________________ > Freeswitch-dev mailing list > Freeswitch-dev at lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org From rjcajax at gmail.com Sat Dec 13 22:02:43 2008 From: rjcajax at gmail.com (Robert Clayton) Date: Sun, 14 Dec 2008 01:02:43 -0500 Subject: [Freeswitch-dev] Implicit pause during recording Message-ID: All, I was thinking since there is no direct functionality for the person being recorded to pause the recording could this be done indirectly. For example if using the functionality to record only when voice is present could the audio stream be preprocessed to evaluate the dtmf where if a specific key was pressed the audio stream would no longer be passed or passed as blank to the recording functionality so an implicit pause would be created. And when the person recording wished to continue pressing a key would signal FS to pass the audio again therefore reestablishing recording to the same file? Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20081214/0bc952a7/attachment.html From stkn at freeswitch.org Mon Dec 15 06:26:53 2008 From: stkn at freeswitch.org (stkn at freeswitch.org) Date: Mon, 15 Dec 2008 14:26:53 +0000 Subject: [Freeswitch-dev] [POST-1.0.2][RFC][PATCH 0/2] Fine-grained logging: per-session logging Message-ID: <1229351215-25327-1-git-send-email-stkn@freeswitch.org> Hi, the following series of patches adds a per-session logging capability (patch 1) and converts a part of mod_sofia over to use the new functions as an example (patch 2). Note: This is one of two possible ways to implement the feature... (see below) Why?: Some of "us" are running fs with high call volumes and turning on debugging globally causes massive amounts of space used and reduced performance. This patch extends the logging api to be able to change the log level for e.g. a single session (either from the dialplan or via API command / C API) for diagnosing problems. How?: The core patch adds a couple of new functions: switch_core_session_log_printf(switch_core_session_t *, ...) switch_core_session_set_loglevel() switch_core_session_get_loglevel() A new API command "uuid_loglevel " (mod_commands.c) and a dialplan app "session_loglevel" (mod_dptools.c part of the core patch) are included. The default loglevel of a session is the current global log level. All instances of switch_log_printf() that log session-specific messages need to be converted to the new log function for this to be useful! (The second patch has the changes for mod_sofia.c) Alternative implementation: There's a second way to implement this feature, without adding another log_printf function: switch_log_printf has a "userdata" parameter that is currently unused, which could be used to pass an additional value (e.g. a session) by adding additional SWITCH_*_LOG helper macros. A session log call could look like this: switch_log_printf(SWITCH_SESSION_LOG(session), SWITCH_LOG_DEBUG, "I'm a session debug message\n"); Pro: - Can be extended for other type of log actions (e.g. if we want to implement even more fine-grained logging, per-module etc.) without adding more switch_*_log_printf functions Con: - More work for switch_log_printf() Now it's up to you to discuss which way we want to go and if this feature is deemed useful :P Stefan P.S.: The patches are available via http too: http://oss.axsentis.de/people/stkn/freeswitch/fs-r10758-session_loglevel.patch http://oss.axsentis.de/people/stkn/freeswitch/fs-r10758-session_loglevel-convert-mod_sofia.c.patch Diffstat of the core patch: include/private/switch_core_pvt.h | 1 include/switch_core.h | 15 ++++++++++ include/switch_log.h | 18 +++++++++++++ mod/applications/mod_commands/mod_commands.c | 37 +++++++++++++++++++++++++++ mod/applications/mod_dptools/mod_dptools.c | 19 +++++++++++++ switch_core_session.c | 15 ++++++++++ switch_log.c | 34 ++++++++++++++++++++---- 7 files changed, 133 insertions(+), 6 deletions(-) -- Stefan Knoblich Systemadministrator axsentis GmbH Eupener Strasse 74 50933 K?ln Tel: 0180 - 506 705 521* Fax: 0180 - 506 705 529* E-Mail: s.knoblich at axsentis.de Web: www.axsentis.de Eingetragen beim AG K?ln: HR B 56238 UST-ID: DE244977565 Gesellschafter-Gesch?ftsf?hrer: Yan Lecomte, Eduard Schlein, Apostolos Varsamis *14ct/min aus dem Festnetz der T-Com | dtms From stkn at freeswitch.org Mon Dec 15 06:26:54 2008 From: stkn at freeswitch.org (stkn at freeswitch.org) Date: Mon, 15 Dec 2008 14:26:54 +0000 Subject: [Freeswitch-dev] [POST-1.0.2][RFC][PATCH 1/2] Per-session logging core support In-Reply-To: <1229351215-25327-1-git-send-email-stkn@freeswitch.org> References: <1229351215-25327-1-git-send-email-stkn@freeswitch.org> Message-ID: <1229351215-25327-2-git-send-email-stkn@freeswitch.org> diff --git a/src/include/private/switch_core_pvt.h b/src/include/private/switch_core_pvt.h index 040a6ec..c3b9fc2 100644 --- a/src/include/private/switch_core_pvt.h +++ b/src/include/private/switch_core_pvt.h @@ -98,6 +98,7 @@ struct switch_core_session { switch_size_t id; switch_session_flag_t flags; int thread_running; + switch_log_level_t log_level; switch_channel_t *channel; switch_io_event_hooks_t event_hooks; diff --git a/src/include/switch_core.h b/src/include/switch_core.h index 7670435..89ffbf3 100644 --- a/src/include/switch_core.h +++ b/src/include/switch_core.h @@ -729,6 +729,21 @@ SWITCH_DECLARE(void *) switch_core_session_get_private(_In_ switch_core_session_ SWITCH_DECLARE(switch_status_t) switch_core_session_set_private(_In_ switch_core_session_t *session, _In_ void *private_info); /*! + \brief Set session loglevel + \param session the session + \param loglevel the desired loglevel + \return SWITCH_STATUS_SUCCESS on success +*/ +SWITCH_DECLARE(switch_status_t) switch_core_session_set_loglevel(_In_ switch_core_session_t *session, _In_ switch_log_level_t loglevel); + +/*! + \brief Get session loglevel + \param session the session + \return the loglevel +*/ +SWITCH_DECLARE(switch_log_level_t) switch_core_session_get_loglevel(_In_ switch_core_session_t *session); + +/*! \brief Add a logical stream to a session \param session the session to add the stream to \param private_info an optional pointer to private data for the new stream diff --git a/src/include/switch_log.h b/src/include/switch_log.h index 01efc16..c7ec263 100644 --- a/src/include/switch_log.h +++ b/src/include/switch_log.h @@ -99,6 +99,24 @@ SWITCH_DECLARE(void) switch_log_printf(_In_ switch_text_channel_t channel, _In_z _In_z_ const char *func, _In_ int line, _In_opt_z_ const char *userdata, _In_ switch_log_level_t level, _In_z_ _Printf_format_string_ const char *fmt, ...) PRINTF_FUNCTION(7, 8); + +/*! + \brief Write session log data to the logging engine + \param session the session to log for + \param channel the log channel to write to + \param file the current file + \param func the current function + \param line the current line + \param userdata ununsed + \param level the current log level + \param fmt desired format + \param ... variable args + \note there are channel macros to supply the 4 parameters after session +*/ +SWITCH_DECLARE(void) switch_core_session_log_printf(_In_ switch_core_session_t *session, _In_ switch_text_channel_t channel, _In_z_ const char *file, + _In_z_ const char *func, _In_ int line, + _In_opt_z_ const char *userdata, _In_ switch_log_level_t level, + _In_z_ _Printf_format_string_ const char *fmt, ...) PRINTF_FUNCTION(8, 9); #endif /*! \brief Shut down the logging engine diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 677c5fa..52fd2e2 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -1296,6 +1296,41 @@ SWITCH_STANDARD_API(uuid_deflect) return SWITCH_STATUS_SUCCESS; } +#define UUID_LOGLEVEL_SYNTAX " " +SWITCH_STANDARD_API(uuid_loglevel) +{ + switch_core_session_t *tsession = NULL; + char *uuid = NULL, *text = NULL; + + if (!switch_strlen_zero(cmd) && (uuid = strdup(cmd))) { + if ((text = strchr(uuid, ' '))) { + *text++ = '\0'; + } + } + + if (switch_strlen_zero(uuid) || switch_strlen_zero(text)) { + stream->write_function(stream, "-USAGE: %s\n", UUID_LOGLEVEL_SYNTAX); + } else { + switch_log_level_t level = switch_log_str2level(text); + + if (level == SWITCH_LOG_INVALID) { + stream->write_function(stream, "-ERR Invalid log level!\n"); + } + else if ((tsession = switch_core_session_locate(uuid))) { + + switch_core_session_set_loglevel(tsession, level); + stream->write_function(stream, "+OK\n"); + switch_core_session_rwunlock(tsession); + } + else { + stream->write_function(stream, "-ERR No Such Channel %s!\n", uuid); + } + } + + switch_safe_free(uuid); + return SWITCH_STATUS_SUCCESS; +} + #define SCHED_TRANSFER_SYNTAX "[+]