This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python outbound_sync_server_test.py | |
2011-02-08 19:17:56,286 outbound_sync_server_test[14999]: INFO: Start server ('127.0.0.1', 8084) ... | |
2011-02-08 19:18:03,592 outbound_sync_server_test[14999]: INFO: New request from ('127.0.0.1', 40567) | |
2011-02-08 19:18:03,593 outbound_sync_server_test[14999]: INFO: [connect] args='' | |
Traceback (most recent call last): | |
File "/home/areski/.virtualenvs/telephonie/lib/python2.6/site-packages/gevent/greenlet.py", line 405, in run | |
result = self._run(*self.args, **self.kwargs) | |
File "outbound_sync_server_test.py", line 62, in do_handle | |
self._handle_class(socket, address, self.log, filter=self._filter) | |
File "outbound_sync_server_test.py", line 15, in __init__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python outbound_async_server_test.py | |
2011-02-08 20:08:44,895 outbound_async_server_test[15489]: INFO: Start server ('127.0.0.1', 8084) ... | |
2011-02-08 20:08:51,646 outbound_async_server_test[15489]: INFO: New request from ('127.0.0.1', 41712) | |
2011-02-08 20:08:51,646 outbound_async_server_test[15489]: INFO: [connect] args='' | |
2011-02-08 20:08:51,656 outbound_async_server_test[15489]: INFO: <CommandResponse headers=Event-Name: CHANNEL_DATA\nCore-UUID: 27f31c16-339d-11e0-bf48-834f981de622\nFreeSWITCH-Hostname: openplanet-desktop\nFreeSWITCH-IPv4: 192.168.0.5\nFreeSWITCH-IPv6: ::1\nEvent-Date-Local: 2011-02-08 20:08:51\nEvent-Date-GMT: Tue, 08 Feb 2011 19:08:51 GMT\nEvent-Date-Timestamp: 1297192131647364\nEvent-Calling-File: mod_event_socket.c\nEvent-Calling-Function: parse_command\nEvent-Calling-Line-Number: 1786\nChannel-Username: 1000\nChannel-Dialplan: XML\nChannel-Caller-ID-Name: Areski\nChannel-Caller-ID-Number: 1000\nChannel-Network-Addr: 192.168.0.5\nChannel-ANI: 1000\nChannel-Destination-Number: 55555\nCh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from telephonie.core.inboundsocket import InboundEventSocket | |
from telephonie.core.errors import ConnectError | |
from telephonie.utils.logger import StdoutLogger | |
import gevent.event | |
class MyEventSocket(InboundEventSocket): | |
def __init__(self, host, port, password, filter, log=None): | |
InboundEventSocket.__init__(self, host, port, password, filter) | |
self.log = log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from telephonie.core.inboundsocket import InboundEventSocket | |
from telephonie.core.errors import ConnectError | |
from telephonie.utils.logger import StdoutLogger | |
import gevent.event | |
import random | |
random.seed() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# PhoneGap is available under *either* the terms of the modified BSD license *or* the | |
# MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. | |
# | |
# Copyright (c) 2011, IBM Corporation | |
# | |
#------------------------------------------------------------------------------- | |
help: | |
@echo make targets available: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c | |
index d436c60..b9a920a 100644 | |
--- a/src/switch_core_sqldb.c | |
+++ b/src/switch_core_sqldb.c | |
@@ -1254,14 +1254,15 @@ static void core_event_handler(switch_event_t *event) | |
break; | |
} | |
case SWITCH_EVENT_CHANNEL_CREATE: | |
- new_sql() = switch_mprintf("insert into channels (uuid,direction,created,created_epoch, name,state,callstate,dialplan,context,hostname) " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c | |
index d436c60..6ec8792 100644 | |
--- a/src/switch_core_sqldb.c | |
+++ b/src/switch_core_sqldb.c | |
@@ -1254,14 +1254,15 @@ static void core_event_handler(switch_event_t *event) | |
break; | |
} | |
case SWITCH_EVENT_CHANNEL_CREATE: | |
- new_sql() = switch_mprintf("insert into channels (uuid,direction,created,created_epoch, name,state,callstate,dialplan,context,hostname) " | |
- "values('%q','%q','%q','%ld','%q','%q','%q','%q','%q','%q')", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prefixlist = range(0, 100) | |
rate_list = VoIPRetailRate.objects.values('prefix', 'retail_rate', 'prefix__destination').filter(prefix__in=[int(s) for s in prefixlist]) | |
print rate_list | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Display PI Number | |
# | |
def make_pi(): | |
q, r, t, k, m, x = 1, 0, 1, 1, 3, 3 | |
for j in range(10000): | |
if 4 * q + r - t < m * t: | |
yield m | |
q, r, t, k, m, x = 10*q, 10*(r-m*t), t, k, (10*(3*q+r))//t - 10*m, x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Install a package from your local pip download cache without having to touch | |
the 'net at all. | |
You'll need to be using a pip download cache; that is, you'll need the | |
following in your ~/.pip/pip.cfg: | |
[install] |
OlderNewer