|
@@ -6,11 +6,11 @@
|
|
|
|
|
|
# ----------- global configuration parameters ------------------------
|
|
# ----------- global configuration parameters ------------------------
|
|
|
|
|
|
-debug=9 # debug level (cmd line: -dddddddddd)
|
|
|
|
-#fork=yes
|
|
|
|
-fork=no
|
|
|
|
-#log_stderror=no # (cmd line: -E)
|
|
|
|
-log_stderror=yes # (cmd line: -E)
|
|
|
|
|
|
+debug=3 # debug level (cmd line: -dddddddddd)
|
|
|
|
+fork=yes
|
|
|
|
+#fork=no
|
|
|
|
+log_stderror=no # (cmd line: -E)
|
|
|
|
+#log_stderror=yes # (cmd line: -E)
|
|
check_via=yes # (cmd. line: -v)
|
|
check_via=yes # (cmd. line: -v)
|
|
dns=on # (cmd. line: -r)
|
|
dns=on # (cmd. line: -r)
|
|
rev_dns=yes # (cmd. line: -R)
|
|
rev_dns=yes # (cmd. line: -R)
|
|
@@ -36,6 +36,9 @@ loadmodule "../sip_router/modules/sms/sms.so"
|
|
modparam("sms","modems","Falcom [d=/dev/ttyS0;b=9600;p=9254;m=new;l=10;r=2]")
|
|
modparam("sms","modems","Falcom [d=/dev/ttyS0;b=9600;p=9254;m=new;l=10;r=2]")
|
|
modparam("sms","networks","D1[c=491710765000;m=10]")
|
|
modparam("sms","networks","D1[c=491710765000;m=10]")
|
|
modparam("sms","links","Falcom[D1]")
|
|
modparam("sms","links","Falcom[D1]")
|
|
|
|
+modparam("sms","domain","iptel.org")
|
|
|
|
+modparam("sms","max_sms_parts",3)
|
|
|
|
+modparam("sms","use_contact",1)
|
|
|
|
|
|
|
|
|
|
# -- tm params --
|
|
# -- tm params --
|
|
@@ -65,7 +68,7 @@ route{
|
|
|
|
|
|
# accept only req coming from iptel.org
|
|
# accept only req coming from iptel.org
|
|
if (!src_ip==195.37.77.101 |
|
|
if (!src_ip==195.37.77.101 |
|
|
- !( uri=~"[0-9]*@sms.iptel.org" | uri=~"[0-9]*@195\.37\.77\.100" ))
|
|
|
|
|
|
+ !( uri=~"iptel.org" | uri=~"195\.37\.77\.100" ))
|
|
{
|
|
{
|
|
log("SER:Forbidden request: wrong src_ip or req_uri\n");
|
|
log("SER:Forbidden request: wrong src_ip or req_uri\n");
|
|
sl_send_reply("403","Forbidden");
|
|
sl_send_reply("403","Forbidden");
|
|
@@ -82,19 +85,24 @@ route{
|
|
if (! t_newtran())
|
|
if (! t_newtran())
|
|
{
|
|
{
|
|
# retransmit whatever we have
|
|
# retransmit whatever we have
|
|
- t_retransmit_reply();
|
|
|
|
|
|
+ # it's useless to do any retransmision, because we haven't
|
|
|
|
+ # sent any statefull reply. (bogdan)
|
|
|
|
+ #t_retransmit_reply();
|
|
} else {
|
|
} else {
|
|
# do what you want to do
|
|
# do what you want to do
|
|
if (sms_send_msg_to_net("D1"))
|
|
if (sms_send_msg_to_net("D1"))
|
|
{
|
|
{
|
|
|
|
+ # for sending replies, we woun't use the statefull
|
|
|
|
+ # function because it is not able to add the Contact
|
|
|
|
+ # header (in fact to add any rpl_lump :-( )
|
|
# things went well, send ok upstream
|
|
# things went well, send ok upstream
|
|
- if (!t_send_reply("202", "yes sir, SMS sent over"))
|
|
|
|
|
|
+ if (!sl_send_reply("202", "yes sir, SMS sent over"))
|
|
{
|
|
{
|
|
# if replying failed, retry statelessly
|
|
# if replying failed, retry statelessly
|
|
sl_reply_error();
|
|
sl_reply_error();
|
|
};
|
|
};
|
|
} else {
|
|
} else {
|
|
- if (!t_send_reply("502", "Bad gateway - SMS error"))
|
|
|
|
|
|
+ if (!sl_send_reply("502", "Bad gateway - SMS error"))
|
|
{
|
|
{
|
|
# if replying failed, retry statelessly
|
|
# if replying failed, retry statelessly
|
|
sl_reply_error();
|
|
sl_reply_error();
|