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
/* | |
* main.c | |
* | |
* Created on: Sep 19, 2012 | |
* Author: caruizdiaz | |
* caruizdiaz.com | |
*/ | |
#include "dwg/dwg_util.h" | |
#include "dwg/dwg.h" |
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
$avp(s:contact) = $hdr(Contact); | |
# remove the proposed value | |
avp_subst("$avp(s:contact)", "/;expires=[0-9]+//gi"); | |
# insert the value I want: 120. | |
append_to_reply("Contact: $avp(contact);expires=120\r\n"); | |
sl_send_reply("200", "OK"); |
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
Gateway.StatusChanged += HandleGatewayStatusChanged; | |
Gateway.SMSReceived += HandleGatewaySMSReceived; | |
Gateway.SentSMSStatus += HandleGatewaySentSMSStatus; | |
Gateway.USSDReceived += HandleGatewayUSSDReceived; | |
Gateway.StartListener(port); | |
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
static void HandleGatewayUSSDReceived (string gatewayIP, int port, dwg_ussd_result_code status, string message) | |
{ | |
Console.WriteLine("USSD response {0} at port {1}, status {2}", gatewayIP,port, Enum.GetName(typeof(dwg_ussd_result_code), status)); | |
Console.WriteLine(message); | |
} | |
static void HandleGatewaySMSReceived (string gatewayIP, string number, string text, int port, string timestamp) | |
{ | |
if (text == null) | |
text = string.Empty; |
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
string number = "+595981146623"; | |
string text = "Hello World"; | |
int sendingPort = 0; | |
for(;;) | |
{ | |
Console.ReadLine(); | |
if (!Gateway.IsGwConnected) | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Text; | |
using System.Windows.Forms; | |
using dwgsms.API; | |
using dwgsms.DWG; |
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
static int create_cca_return_code(int result) { | |
int rc; | |
int_str avp_val, avp_name; | |
avp_name.s.s = RO_AVP_CCA_RETURN_CODE; | |
avp_name.s.len = RO_AVP_CCA_RETURN_CODE_LENGTH; | |
avp_val.n = result; | |
avp_val.s.s = RO_RETURN_TRUE_STR; //assume true | |
avp_val.s.len = 1; |
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
% Lista de presidentes de Paraguay luego de la guerra del chaco | |
presidente('Eusebio Ayala', 1932, 1936, 'Liberal'). | |
presidente('Rafael Franco', 1936, 1937, 'Militar'). | |
presidente('Félix Paiva', 1937, 1939, 'Liberal'). | |
presidente('José Félix Estigarribia', 1939, 1940, 'Liberal'). | |
presidente('Higinio Morínigo', 1940, 1948, 'Liberal'). | |
presidente('Juan Manuel Frutos', 1948, 1948, 'Militar'). | |
presidente('Juan Natalicio González', 1948, 1949, 'Colorado'). | |
presidente('Raimundo Rolón', 1949, 1949, 'Colorado'). |
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
#!KAMAILIO | |
# | |
# Kamailio (OpenSER) SIP Server v3.2 - default configuration script | |
# - web: http://www.kamailio.org | |
# - git: http://sip-router.org | |
# | |
# Direct your questions about this file to: <sr-users@lists.sip-router.org> | |
# | |
# Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php |
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
#!KAMAILIO | |
# | |
# Kamailio (OpenSER) SIP Server v3.2 - default configuration script | |
# - web: http://www.kamailio.org | |
# - git: http://sip-router.org | |
# | |
# Direct your questions about this file to: <sr-users@lists.sip-router.org> | |
# | |
# Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php |
OlderNewer