[Serusers] Trying SNOM 200 again
Greg Fausak
greg at august.net
Thu Apr 24 15:27:11 CEST 2003
I am forwarding this config again, it was rejected
by the filter yesterday.
---greg
>
>
> Here is the config.
> I don't recall processing ACKs in call flows.
> I thought they were part of the call state in t_relay().
> I see that this ACK has a Route: message. Is this where I
> get the information about where to send the packet?
>
> ---greg
>
> ----config-------------
> #
> ______________________________________________________________
> __________
> #
> #
> # $RCSfile: register.cfg $
> # $Revision: 1.1 $
> #
> # Last change $Date: 2003-01-18 23:03:50-06 $
> # Last change $Author: lgfausak $
> # $State: Exp $
> # $Locker: $
> #
> # Original author: Greg Fausak
> #
> # Copyright (C) 2003 - August.Net Services, LLC
> #
> #
> ______________________________________________________________
> __________
> #
>
> debug=3 # debug level (cmd line: -dddddddddd)
> fork=yes
> log_stderror=no # (cmd line: -E)
> check_via=no # (cmd. line: -v)
> dns=no # (cmd. line: -r)
> rev_dns=no # (cmd. line: -R)
> listen=2.3.4.203
> port=5060
> children=4
> fifo="/tmp/ser_fifo"
> alias="augustvoice.net"
>
>
> loadmodule "/usr/local/lib/ser/modules/sl.so"
> loadmodule "/usr/local/lib/ser/modules/tm.so"
> loadmodule "/usr/local/lib/ser/modules/acc.so"
> loadmodule "/usr/local/lib/ser/modules/rr.so"
> loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
> loadmodule "/usr/local/lib/ser/modules/postgres.so"
> loadmodule "/usr/local/lib/ser/modules/usrloc.so"
> loadmodule "/usr/local/lib/ser/modules/registrar.so"
> loadmodule "/usr/local/lib/ser/modules/exec.so"
> loadmodule "/usr/local/lib/ser/modules/auth.so"
> loadmodule "/usr/local/lib/ser/modules/textops.so"
>
> modparam("usrloc","db_mode",1)
> modparam("usrloc","db_url",
> "sql://UESRID:PASSSS@MACHINE.august.net:PORT/DBNAME")
>
> modparam("tm","retr_timer1p1", 2) # increase retry timeout
> modparam("tm","retr_timer1p2", 3) # increase retry timeout
> modparam("tm","retr_timer1p3", 9) # increase retry timeout
>
> modparam("acc", "log_level", 1)
> modparam("acc", "acc_flag", 1 )
> modparam("acc", "report_ack", 0 )
> modparam("auth","db_url",
> "sql://UESRID:PASSSS@MACHINE.august.net:PORT/DBNAME")
>
> #
> # this is the main routing block for augustvoice.net
> # this block can handle any routing request, local or foreign
> #
>
> route
> {
> #
> # check to see if the message has been around too long
> # probably means that it is looping
> #
> if (!mf_process_maxfwd_header("10"))
> {
> log("LOG: Too many hops\n");
> sl_send_reply("483","Too Many Hops");
> break;
> };
>
> #
> # make sure the length of the message isn't too long!
> #
> if (len_gt( max_len ))
> {
> sl_send_reply("513", "Wow -- Message too large");
> break;
> };
>
> #
> # forward to correct proxy/domain
> #
> if(!(uri==myself))
> {
> # append_hf("P-hint: FORWARD\r\n");
> if(!t_relay())
> {
> sl_reply_error();
> };
> break;
> };
>
> #
> # make sure the client is authorized, ignore PRACK
> #
> if(!(src_ip==2.3.4.196 | src_ip==1.2.3.16) &
> !(method=="PRACK")
> & !(method=="BYE"))
> {
> if(!www_authorize("augustvoice.net", "subscriber"))
> {
> www_challenge("augustvoice.net", "0");
> break;
> };
> };
>
> #
> # the REGISTER method
> #
> if (method=="REGISTER")
> {
> route(1);
> break;
> };
>
> #
> # rewrite the From route
> #
> rewriteFromRoute();
>
> #
> # see if it is a mike h pstn to ivr call (IVR)
> #
> if (uri=~"sip:4695466408 at .*")
> {
> route(6);
> break;
> };
>
> #
> # if the destination is REGISTERed locally, route to it
> #
> if (lookup("location"))
> {
> log(1,"found location");
> route(2);
> break;
> };
>
>
> #
> # if it is an INVITE from the gateway, reply with error as it
> was
> # an inbound call to a phone number that doesn't exist (by
> virtue
> # of the previous lookup("location") failed
> #
> if(src_ip==2.3.4.196 & method=="INVITE")
> {
> log(1,"inbound call number doesn't exist here!");
> sl_send_reply("480", "inbound called number doesn't
> exist");
> break;
> };
>
> #
> # see if it is a mike h. sip to ivr call (IVR)
> #
> if (uri=~"sip:4[0-9]{3}@.*")
> {
> # sl_send_reply("480", "Temporary no IVR calls");
> route(5);
> break;
> };
>
> #
> # now check if it's about LD PSTN destinations through our
> gateway;
> #
> if (uri=~"sip:1[2-9][0-9]{9}@.*")
> {
> route(3);
> # route(4);
> # sl_send_reply("480", "Temporary no LD calls");
> break;
> };
>
> #
> # a local number to the PSTN here in the DFW area
> #
> if (uri=~"sip:(972|817|469|214|940)[2-9][0-9]{6}@.*")
> {
> route(3);
> break;
> };
>
> #
> # I don't know why we get down here (yet)
> #
> if(method=="INVITE" | method=="BYE" | method=="PRACK" |
> method=="OPTIONS")
> {
> log(1,"TRACE: addRecordRoute()");
> setflag(1);
> setflag(2);
> addRecordRoute();
> };
>
> append_hf("P-hint: ATEND\r\n");
> if(!t_relay())
> {
> sl_reply_error();
> break;
> };
> }
>
> #
> # route[1], REGISTER block
> # REGISTER messages destined for our realm are forwarded here.
> # after a successful registration a customer can receive calls.
> #
> route[1]
> {
> if(!check_to())
> {
> log("LOG: To Cheating attempt\n");
> sl_send_reply("403","That is ugly -- use To=id next
> time");
> break;
> };
>
> log("here is a register");
> if(!save("location"))
> {
> sl_reply_error();
> };
> break;
> }
>
> # routing to a 'registered' user
> route[2]
> {
> if(method=="INVITE" | method=="BYE" | method=="PRACK")
> {
> log(1,"TRACE: addRecordRoute()");
> setflag(1);
> setflag(2);
> addRecordRoute();
> };
>
> # append_hf("P-hint: USRLOC\r\n");
> if(!t_relay())
> {
> sl_reply_error();
> break;
> };
> }
>
> # route[3], logic for calls to the PSTN
> route[3]
> {
> log(1,"TRACE:In route[3]");
>
> # let's check from=id ... avoids accounting confusion
> if (method=="INVITE" & !check_from())
> {
>
> log("LOG: From Cheating attempt\n");
> sl_send_reply("403",
> "That is ugly -- use From=id next time (gw)");
> break;
> };
>
> # consume credentials
> consume_credentials();
>
> # we passed all authorization checks for PSTN -- move on!
>
> # add a 9 for the gateway
> prefix("9");
>
>
> # requests to gateway must be record-routed because the GW
> accepts
> # only reqeusts coming from our proxy
> if (method=="INVITE" || method=="BYE" | method=="PRACK")
> {
> # tag this transaction for accounting
> setflag(1);
> setflag(2);
>
> addRecordRoute();
> };
>
> # if you have passed through all the checks, let your
> call go to
> GW!
>
> rewritehostport("2.3.4.196:5060");
>
> append_hf("P-hint: LOCAL GATEWAY\r\n");
> if (!t_relay()) {
> sl_reply_error();
> break;
> };
> }
>
> # route[4], logic for calls to the PSTN (LD)
> route[4]
> {
> log(1,"TRACE:In route[4]");
>
> # let's check from=id ... avoids accounting confusion
> if (method=="INVITE" & !check_from())
> {
>
> log("LOG: From Cheating attempt\n");
> sl_send_reply("403",
> "That is ugly -- use From=id next time (gw)");
> break;
> };
>
> # consume credentials
> consume_credentials();
>
> # we passed all authorization checks for PSTN -- move on!
>
> # add a 9 for the gateway
> prefix("9");
>
>
> # requests to gateway must be record-routed because the GW
> accepts
> # only reqeusts coming from our proxy
> if (method=="INVITE" || method=="BYE" | method=="PRACK")
> {
> # tag this transaction for accounting
> setflag(1);
> setflag(2);
>
> addRecordRoute();
> };
>
> # if you have passed through all the checks, let your
> call go to
> GW!
>
> rewritehostport("1.2.3.16:5060");
>
> append_hf("P-hint: LD GATEWAY\r\n");
> if (!t_relay()) {
> sl_reply_error();
> break;
> };
> }
>
> # route[5], logic for SIP calls to the IVR
> route[5]
> {
> log(1,"TRACE:In route[5]");
>
> # let's check from=id ... avoids accounting confusion
> if (method=="INVITE" & !check_from())
> {
>
> log("LOG: From Cheating attempt\n");
> sl_send_reply("403",
> "That is ugly -- use From=id next time (gw)");
> break;
> };
>
> # consume credentials
> consume_credentials();
>
> # we passed all authorization checks for PSTN -- move on!
>
> # requests to gateway must be record-routed because the GW
> accepts
> # only reqeusts coming from our proxy
> if (method=="INVITE" || method=="BYE" | method=="PRACK")
> {
> addRecordRoute();
> };
>
> # if you have passed through all the checks, let your
> call go to
> GW!
>
> rewritehostport("1.2.3.15:5060");
>
> append_hf("P-hint: IVR GATEWAY\r\n");
> if (!t_relay()) {
> sl_reply_error();
> break;
> };
> }
>
> # route[6], logic for PSTN calls to the IVR
> route[6]
> {
>
> log(1,"TRACE:In route[6]");
>
> # requests to gateway must be record-routed because the GW
> accepts
> # only reqeusts coming from our proxy
> if (method=="INVITE" || method=="BYE")
> {
> addRecordRoute();
> };
>
> # if you have passed through all the checks, let your
> call go to
> GW!
>
> rewritehostport("1.2.3.15:5060");
>
> append_hf("P-hint: IVR GATEWAY\r\n");
> if (!t_relay()) {
> sl_reply_error();
> break;
> };
> }
>
> -----------------------
>
> >
> >
> > I don't think that snom is guilty this time -- 200 ACK
> > is forwarded to SER and consumed there, an issue unrelated
> > to PRACK. I guess that's a problem in SER configuration --
> > send us your config file please.
> >
> > -Jiri
> >
> > ps -- our spam filter started doing a too thorough job and
> > requests admin approval for almost anything. bear with it
> > until it is fixed.
> >
> > At 02:30 AM 4/23/2003, Greg Fausak wrote:
> > >Hi guys,
> > >
> > >I am trying to get the SNOM 200 to work with iptel
> > >again, I seem to be having issues with the PRACK again?
> > >In the trace below my gateway is sending an OK after
> > >On trace F16 an ACK comes back from the SNOM, lands on
> > >the SER and dies. Did the previous PRACK eat the STATE?
> > >
> > >This can be viewed until midnight (GMT-5) at my server at:
> > >http://stage.august.net/snom_index.html
> > >
> > >Or the text below is the actual trace.
> > >
> > >:-)
> > >
> > >---greg
> > >[root at rave sipscene]# cat snom.txt
> > >Standard Call
> > >
> > >File: /tmp/snom.dump
> > >Generated: Tue Apr 22 19:13:32 2003
> > >Traced on: Tue Apr 22 19:09:25 2003
> > >Created by:./sip_scenario.pl version=1.1.2
> > >
> > >SNOM-200 Iptel-PROXY CISCO-12.2.15T
> > >66.228.44.203 216.87.144.203 216.87.144.196
> > >| | |
> > ><Call><PFrame><DeltaTime><Date><Time>
> > >| | |
> > >|>F1 INVITE (sdp)------>| | 1 PF:1 0.0000
> > >22/Apr/03 19:09:25.9917
> > >| | |
> > >|<- Unauthorized 401 F2<| | 1 PF:2 0.0003
> > >22/Apr/03 19:09:25.9920
> > >| | |
> > >|>F3 ACK -------------->| | 1 PF:3 0.1087
> > >22/Apr/03 19:09:26.1008
> > >| | |
> > >|>F4 INVITE (sdp)------>| | 1 PF:4 0.0640
> > >22/Apr/03 19:09:26.1647
> > >| | |
> > >| trying -- your call is important to us 100 F5 |
> > >|<mportant to us 100 F5<| | 1 PF:5 0.0056
> > >22/Apr/03 19:09:26.1704
> > >| | |
> > >| |>F6 INVITE (sdp)------>| 1 PF:6 0.0001
> > >22/Apr/03 19:09:26.1705
> > >| | |
> > >| |<------- Trying 100 F7<| 1 PF:7 0.0042
> > >22/Apr/03 19:09:26.1747
> > >| | |
> > >| | |
> > >| | |
> > >| | |
> > >| | |
> > >| | |
> > >| (sdp) Session Progress 183 F8 |
> > >| |<ssion Progress 183 F8<| 1 PF:8 2.3787
> > >22/Apr/03 19:09:28.5534
> > >| | |
> > >|(sdp) Session Progress 183 F9 |
> > >|<ssion Progress 183 F9<| | 1 PF:9 0.0002
> > >22/Apr/03 19:09:28.5537
> > >| | |
> > >|>F10 PRACK ----------->| | 1 PF:10 0.1004
> > >22/Apr/03 19:09:28.6540
> > >| | |
> > >| |>F11 PRACK ----------->| 1 PF:11 0.0004
> > >22/Apr/03 19:09:28.6544
> > >| | |
> > >| |<---------- OK 200 F12<| 1 PF:12 0.0016
> > >22/Apr/03 19:09:28.6560
> > >| | |
> > >|<---------- OK 200 F13<| | 1 PF:13 0.0002
> > >22/Apr/03 19:09:28.6561
> > >| | |
> > >| | |
> > >| | |
> > >| | |
> > >| | |
> > >| | |
> > >| |<-----(sdp) OK 200 F14<| 1 PF:14 5.3467
> > >22/Apr/03 19:09:34.0028
> > >| | |
> > >|<-----(sdp) OK 200 F15<| | 1 PF:15 0.0003
> > >22/Apr/03 19:09:34.0031
> > >| | |
> > >|>F16 ACK ------------->| | 1 PF:16 0.0986
> > >22/Apr/03 19:09:34.1017
> > >| | |
> > >| |<-----(sdp) OK 200 F17<| 1 PF:17 0.4004
> > >22/Apr/03 19:09:34.5022
> > >| | |
> > >|<-----(sdp) OK 200 F18<| | 1 PF:18 0.0003
> > >22/Apr/03 19:09:34.5024
> > >| | |
> > >|>F19 ACK ------------->| | 1 PF:19 0.0578
> > >22/Apr/03 19:09:34.5602
> > >| | |
> > >| |<-----(sdp) OK 200 F20<| 1 PF:20 0.9418
> > >22/Apr/03 19:09:35.5019
> > >| | |
> > >|<-----(sdp) OK 200 F21<| | 1 PF:21 0.0003
> > >22/Apr/03 19:09:35.5022
> > >| | |
> > >|>F22 ACK ------------->| | 1 PF:22 0.0584
> > >22/Apr/03 19:09:35.5606
> > >| | |
> > >| |<-----(sdp) OK 200 F23<| 1 PF:23 1.9413
> > >22/Apr/03 19:09:37.5019
> > >| | |
> > >|<-----(sdp) OK 200 F24<| | 1 PF:24 0.0003
> > >22/Apr/03 19:09:37.5022
> > >| | |
> > >|>F25 ACK ------------->| | 1 PF:25 0.0649
> > >22/Apr/03 19:09:37.5671
> > >
> > >=============================================================
> > ===========
> > >========
REMOVED
More information about the sr-users
mailing list