I have also had problems with getting the ACK back.
I don't completely understand your configuration, you
must allow for packets going both directions, right?
Here is my config :
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;
};
#
# do the loose-routing thing, this is important!
#
if(loose_route())
{
log(1,"doing top loose route");
t_relay();
break;
};
# this is where I was dropping the ACKS.
# I was simply dropping these, but they must be relayed
# because they can be ACKs
if(!(uri==myself))
{
if(!t_relay())
{
sl_reply_error();
break;
};
break;
};
This gets the ACKs through for me.
By the way, I have this configured with Cisco ATAs, version 2.16.
---greg
>
>I have the same problem and posed it to the group yesterday ([Serusers]
>Ignored 200 OK message.) So far the only workaround that I have found is to
>use the rules in my gateway to rewrite the dialed digits before sending them
>to the PSTN PRI, thus leaving the origianl URI intact for SIP
>communications.
>
>One person told me that this is a bug in the Cisco ATA, but it happens on my
>IPDialog phones also. It seems to me that the INVITE is being processed by
>the SER dial rules and is rewritten, but the ACK is not.
>
>Sean
>_______________________________________________
>
>Sean Robertson
>
>NETXUSA
>p. 800-289-6389
>f. 864-233-4344 "Ask me about Voice over IP."
>http://www.netxusa.com/
>
>----- Original Message -----
>From: "Alexander Mayrhofer" <axelm(a)nic.at>
>To: <serusers(a)lists.iptel.org>
>Sent: Friday, June 27, 2003 12:15 PM
>Subject: [Serusers] rewrite & ACK forwarding problem
>
>
>>
>> Hi,
>>
>> we're running SER together with a PSTN Gateway. Before a call get's
>> forwarded to the gateway, we are rewriting the request URI to make
>> rewriting on the GW as simple as possible:
>>
>> route {
>> ...
>> strip(3); # +43xxx -> xxx
>> prefix("0"); # xxx -> 0xxx
>> rewritehostport(xxx.xxx.xxx.xxx, 5060); # request to gateway
>> route(1);
>> break;
>> ...
>>
>> SIP call flow looks like (record route enabled):
>>
>> (1) phone -> SER
>> INVITE sip:*43699xxxxxxxx@nic.at43.at SIP/2.0
>>
>> (2) SER -> phone
>> SIP/2.0 100 trying -- your call is important to us
>>
>> (3) SER -> GW
>> INVITE sip:0699xxxxxxxx@xx.xx.xx.xx:5060 SIP/2.0
>>
>> (4) GW -> SER
>> SIP/2.0 100 Trying
>>
>> (5) GW -> SER
>> SIP/2.0 183 Session Progress
>>
>> (6) SER -> phone
>> SIP/2.0 183 Session Progress
>>
>> (7) GW -> SER
>> SIP/2.0 180 Ringing
>>
>> (8) SER -> phone
>> SIP/2.0 180 Ringing
>>
>> (9) GW -> SER
>> SIP/2.0 200 OK
>> Contact: <sip:0699xxxxxxxx@xx.xx.xx.xx:5060>
>>
>> (10) SER -> phone
>> SIP/2.0 200 OK
>> Contact: <sip:0699xxxxxxx@xx.xx.xx.xx:5060>
>>
>> [ call established, we can talk, but ... ]
>>
>> (11) phone -> SER
>> ACK sip:0699xxxxxxxx@xx.xx.xx.xx:5060 SIP/2.0
>>
>> --> Here starts the problem. That ACK (11) never gets forwarded to the
>> Gateway, so after a few seconds, the GW starts over at (9). Those three
>> packets (9-11) repeat a few times until GW runs into a timeout and drops
>> the call.
>>
>> I have the impression that SER can't match the packet to the previous
>> requests because of the rewritten URI. Is that correct?
>>
>> The only output at debug level 3 is:
>>
>> Warning: sl_send_reply: I won't send a reply for ACK!!
>>
>> Is that a routing goof somewhere in our scripts or is that a more
>> generic problem? Is the problem that the warning indicates somehow
>> related to the fact that the ACK is not being forwarded?
>>
>> Help appreciated.
>>
>> cheers
>>
>> axelm
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers(a)lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serusers
>>
>
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
I looked at the attached dumps. First of all, 0.8.10 and 0.8.12 handle
record routing differently. 0.8.10 implements strict routing while
0.8.12 implements loose routing.
The bug is in your script. Because 0.8.12 implements loose routing, the
Request-URI will contain the Contact of the callee. The Contact contains
the number of the callee -- 5803932.
In your script you are searching for numbers beginning with 580 and
rewrite the hostname to a gateway. ACK and BYE will also contain the
number in the Request-URI -- see above, but they don't contain the IP of
your server in the Request-URI -- the IP of the callee is there.
But you don't check this and rewrite anyway.
The proper solution would be to search for numbers beginning with 580
inside the if (uri==myself) condition.
BTW, all searches and rewrites of Request-URI should be inside
uri==myself condition -- the condition will be true only for requests
establishing a dialog.
The Request-URI of requests WITHIN a dialog (BYE, ACK)
must not be changed.
In addition to that 0.8.10 and 0.8.12 configs are different. Your config
for 0.8.10 doesn't use record routing while the config for 0.8.12 does.
Jan.
On 17-12 10:19, Jamin W. Collins wrote:
> I sent the following message to to the serteam address per (Jiri's
> request) several days ago regarding an apparent routing difference
> between 0.8.10 and 0.8.12. I've yet to receive any indication that it
> was received and/or that anyone is looking into this.
>
> I'm reposting it here (with configs and traces) in hopes that someone
> here can either indicate what I've done wrong or confirm that these two
> configurations should work the same.
>
> ----- Forwarded message from "Jamin W. Collins" <jcollins(a)asgardsrealm.net> -----
>
> From: "Jamin W. Collins" <jcollins(a)asgardsrealm.net>
> To: serteam(a)iptel.org
>
> I believe I've found a routing difference between 0.8.10 and 0.8.12. I
> originally brought this up on the serusers list[1]. Jiri has suggested
> that I forward the configurations and ngrep captures to this address,
> you should find these attached to this message. The ngrep capture from
> 20031204 contains the Snom phone's request against the 0.8.10
> configuration. The 20031205 capture contains a Snom and Cisco request
> against the 0.8.12 configuration. The Snom phone works as expected
> against the 0.8.10 configuration, but not he 0.8.12. The Cisco phone
> works as expected against the 0.8.12 configuration.
>
> [1] - http://lists.iptel.org/pipermail/serusers/2003-December/004272.html
>
> ----- End forwarded message -----
>
> --
> Jamin W. Collins
>
> This is the typical unix way of doing things: you string together lots
> of very specific tools to accomplish larger tasks. -- Vineet Kumar
Hi Bogdan,
better late then never ;) The upload of CPL scripts via SIP works fine
with CPLEd but after changing the SER config file with the if statement
you mentioned below I cannot REGISTER my client any more. It is a normal
REGISTER without any payload in the SDP part. I try it with three different
SIP clients and they all get a 500 error every time. Why do normal REGISTER
messages run into the if statement, too? Many thanks for your help.
Regards,
Oliver
Bogdan-Andrei IANCU wrote
>Hi Oliver,
>
>Instead of using HTTP for upload/download (which requires more pieces
>and more complex senttings) I would recommend you to use directly SIP
>for transporting CPL scripts (via REGISTER). CPLEd supprts also this method.
>In order to separated normal REGISTERs from CPL transport REGISTERS,
> From the SER part you must do something like:
>
>if (method=="REGISTER") {
> if ( cpl_process_register() ) {
> sl_send_reply("500","Error");
> };
> # here you can do normal processing of a
> # REGISTER request or whatever you want
>};
>
>In CPLEd, in the upload/download window you have to fill in the address
>and port of SER and the user name for which you want to install/fetch
>the script.
>
>Regards,
>Bogdan
Brinker, Oliver wrote:
>Hi Daniel,
>when I try to upload a cpl script via http the status string of CPLEd
>displays the following error message:
>
>Error: Upload via HTTP: HTTP request failed: Invalid CPL script
>
>I've set the direct path to the cpl.dtd in the cpl.php and in the CPLEd
>settings. Although Java SDK 1.4.1 is installed on the machine I load
>crimson.jar and xalan.jar into the classpath. But what is checker.jar
>and where can I get it? Is jaxp.jar included in the Java SDK or should
>I download a separate version?
>
>Many thanks,
>Oliver
>
>
>Daniel-Constantin Mierla wrote
>
>
>
>>Hello,
>>if you use the CVS head version then you should change the format of
>>database url: Now it reflects the type of database used and for mysql
>>should be like:
>>
>>mysql://foo:bar@localhost/ser
>>
>>Try with this one when setting the "cpl_db" parameter.
>>
>>Daniel
>>
>>
>
>
>
>>On 11/26/2003 11:30 AM, Brinker, Oliver wrote:
>>
>>
>
>
>
>>Hi Bogdan,
>>
>>The mysql module is loaded before the cpl-c one. Please have a look into
>>my ser.cfg because I cannot find any misconfig. Could it be a problem
>>with the SQL connection string? MySQL should be running correct.
>>
>>I change the module name in the modparam declaration from cpl_c to cpl-c
>>because cpl_c like in your documentation doesn't work ;) Thanks
>>
>>Oliver
>>
>>#
>># $Id: ser.cfg,v 1.24 2003/11/11 15:32:36 andrei Exp $
>>#
>># simple quick-start config script
>>#
>>
>># ----------- global configuration parameters ------------------------
>>
>>#debug=3 # debug level (cmd line: -dddddddddd)
>>#fork=yes
>>#log_stderror=no # (cmd line: -E)
>>
>>/* Uncomment these lines to enter debugging mode
>>fork=no
>>log_stderror=yes
>>*/
>>
>>check_via=no # (cmd. line: -v)
>>dns=no # (cmd. line: -r)
>>rev_dns=no # (cmd. line: -R)
>>#port=5060
>>#children=4
>>fifo="/tmp/ser_fifo"
>>
>># ------------------ module loading ----------------------------------
>>
>># Uncomment this if you want to use SQL database
>>loadmodule "/usr/local/lib/ser/modules/mysql.so"
>>
>>loadmodule "/usr/local/lib/ser/modules/cpl-c.so"
>>loadmodule "/usr/local/lib/ser/modules/sl.so"
>>loadmodule "/usr/local/lib/ser/modules/tm.so"
>>loadmodule "/usr/local/lib/ser/modules/rr.so"
>>loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
>>loadmodule "/usr/local/lib/ser/modules/usrloc.so"
>>loadmodule "/usr/local/lib/ser/modules/registrar.so"
>>loadmodule "/usr/local/lib/ser/modules/textops.so"
>>
>># Uncomment this if you want digest authentication
>># mysql.so must be loaded !
>>loadmodule "/usr/local/lib/ser/modules/auth.so"
>>loadmodule "/usr/local/lib/ser/modules/auth_db.so"
>>
>># ----------------- setting module-specific parameters ---------------
>>
>># -- usrloc params --
>>
>>#modparam("usrloc", "db_mode", 0)
>>
>># Uncomment this if you want to use SQL database
>># for persistent storage and comment the previous line
>>modparam("usrloc", "db_mode", 2)
>>
>># -- auth params --
>># Uncomment if you are using auth module
>>#
>>modparam("auth_db", "calculate_ha1", yes)
>>#
>># If you set "calculate_ha1" parameter to yes (which true in this config),
>># uncomment also the following parameter)
>>#
>>modparam("auth_db", "password_column", "password")
>>
>># -- rr params --
>># add value to ;lr param to make some broken UAs happy
>>modparam("rr", "enable_full_lr", 1)
>>
>># -- cpl-c module --
>>modparam("cpl-c","cpl_db","sql://foo:bar@localhost/ser")
>>modparam("cpl-c","cpl_table","cpl")
>>modparam("cpl-c","cpl_dtd_file","/usr/local/etc/ser/cpl-06.dtd")
>>modparam("cpl-c","log_dir","/var/log/ser/cpl")
>>modparam("cpl-c","proxy_recurse",0)
>>
>># ------------------------- request routing logic -------------------
>>
>># main routing logic
>>
>>route{
>>
>> # initial sanity checks -- messages with
>> # max_forwards==0, or excessively long requests
>> if (!mf_process_maxfwd_header("10")) {
>> sl_send_reply("483","Too Many Hops");
>> break;
>> };
>> if (msg:len >= max_len ) {
>> sl_send_reply("513", "Message too big");
>> break;
>> };
>>
>> # we record-route all messages -- to make sure that
>> # subsequent messages will go through our proxy; that's
>> # particularly good if upstream and downstream entities
>> # use different transport protocol
>> if (!method=="REGISTER") record_route();
>>
>> # subsequent messages withing a dialog should take the
>> # path determined by record-routing
>> if (loose_route()) {
>> # mark routing logic in request
>> append_hf("P-hint: rr-enforced\r\n");
>> route(1);
>> break;
>> };
>>
>> if (!uri==myself) {
>> # mark routing logic in request
>> append_hf("P-hint: outbound\r\n");
>> route(1);
>> break;
>> };
>>
>> # if the request is for other domain use UsrLoc
>> # (in case, it does not work, use the following command
>> # with proper names and addresses in it)
>> if (uri==myself) {
>>
>> if (method=="REGISTER") {
>>
>> # Uncomment this if you want to use digest authentication
>> if (!www_authorize("t-systems.com", "subscriber")) {
>> www_challenge("t-systems.com", "0");
>> break;
>> };
>>
>> save("location");
>> break;
>> };
>>
>> lookup("aliases");
>> if (!uri==myself) {
>> append_hf("P-hint: outbound alias\r\n");
>> route(1);
>> break;
>> };
>>
>> # native SIP destinations are handled using our USRLOC DB
>> if (!lookup("location")) {
>> sl_send_reply("404", "Not Found");
>> break;
>> };
>> };
>> append_hf("P-hint: usrloc applied\r\n");
>> route(1);
>>}
>>
>>route[1]
>>{
>> # send it out now; use stateful forwarding as it works reliably
>> # even for UDP2TCP
>> if (!t_relay()) {
>> sl_reply_error();
>> };
>>}
>>
>>
>>Bogdan-Andrei IANCU [mailto:iancu@fokus.fraunhofer.de] wrote
>>
>>
>>
>>
>>
>>>Hi Oliver,
>>>
>>>The mysql module must be loade before the cpl-c one. Make sure about
>>>this in your configuration file.
>>>
>>>Bogdan
>>>
>>>
>>>
>>>
>>Brinker, Oliver wrote:
>>
>>
>>
>>
>>
>>>Hi Bogdan,
>>>now I fetch the whole cvs tree and compile SER and the needed modules.
>>>Everything works fine until I put the cpl-c modparam values into ser.cfg.
>>>I get an error message on my xconsole that the cpl-c module cannot bind
>>>to the database. The mysql module is loaded because digest authentications
>>>works since a few days. Is there anything to mind regarding the order of
>>>loading modules or setting params in the ser.cfg? Many thanks.
>>>
>>>Regards,
>>>Oliver
>>>
>>>
>>>Bogdan-Andrei IANCU [mailto:iancu@fokus.fraunhofer.de] wrote
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Hi Oliver,
>>>>
>>>>what branch of cvs do you use? or you use the head of cvs?
>>>>on CVS head everything is fixed - but you have to get the whole tree,
>>>>not only the TM.
>>>>
>>>>Regards,
>>>>Bogdan
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>Brinker, Oliver wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>Hi Bogdan,
>>>>
>>>>I try to patch the TM module and get an error during patching t_reply.c:
>>>>
>>>>Hunk #2 FAILED at 375
>>>>Hunk #3 FAILED at 400
>>>>
>>>>I'm not sure but could the faked_env function be the problem (expect four params,
>>>>but receiving only two)? Should I use a new version of the TM module from the CVS?
>>>>Many thanks.
>>>>
>>>>Regards,
>>>>Olli
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Hello,
>>>>>
>>>>>In order to compile the cpl-c module, you need to apply a patch to the
>>>>>tm_modulel you can finf this patch in modules/cpl-c/tm.patch.
>>>>>Please, use the patch from the same version of ser as the tm modules. Try to do
>>>>>so and let my know if it worked.
>>>>>
>>>>>Regards,
>>>>>Bogdan
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>_______________________________________________
>>Serusers mailing list
>>serusers(a)lists.iptel.org
>>http://lists.iptel.org/mailman/listinfo/serusers
>>
>>
>>
>>
>>
>
>
>
>
Hi List,
i tried on asterisk list as well, but any of you can give any idea abt SIP authenticatin problem with Asterisk and SIP UA (i tried SIPPS and X-Lite)
I could not properly get authenticated with my SIP UA to asterisk. i m using a username for UA "12321" and following are SIP.conf file user params
[12321]
type=friend
username=12321
host=dynamic
secret=ccarta
context=default
mailbox=1234,2345 ; Mailbox for message waiting indicator
[77777]
type=friend
username=77777
host=dynamic
secret=atracc
context=default
mailbox=1234,2345
m trying with SIPPS UA, that gets status "Acquired", not "Registered", Can anyone give any idea about it? I tried same with X-Lite, didnt work.
Sip debug messages are pasted below.
Best Regards,
JF
Sip read:
REGISTER sip:192.168.100.71 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.66:5062;branch=z9hG4bKnp992800961-40de3e5f192.168.100.66
From: <sip:12321@192.168.100.71>;tag=3b2cf0ba
To: <sip:12321@192.168.100.71>
Call-ID: 990209125-415b5d61@990209122-415b5d5e
Contact: ccarta <sip:12321@192.168.100.66:5062>;expires=600;q=0.500
Expires: 600
CSeq: 1 REGISTER
Content-Length: 0
User-Agent: Ahead SIPPS IP Phone Version 2.0.42.13
10 headers, 0 lines
Using latest request as basis request
Sending to 192.168.100.66 : 5062 (non-NAT)
Transmitting (no NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.100.66:5062;branch=z9hG4bKnp992800961-40de3e5f192.168.100.66
From: <sip:12321@192.168.100.71>;tag=3b2cf0ba
To: <sip:12321@192.168.100.71>;tag=as648287fa
Call-ID: 990209125-415b5d61@990209122-415b5d5e
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:12321@192.168.100.71>
Content-Length: 0
to 192.168.100.66:5062
Transmitting (no NAT):
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.100.66:5062;branch=z9hG4bKnp992800961-40de3e5f192.168.100.66
From: <sip:12321@192.168.100.71>;tag=3b2cf0ba
To: <sip:12321@192.168.100.71>;tag=as648287fa
Call-ID: 990209125-415b5d61@990209122-415b5d5e
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:12321@192.168.100.71>
Proxy-Authenticate: Digest realm="asterisk", nonce="7c7fba4d"
Content-Length: 0
to 192.168.100.66:5062
Sip read:
REGISTER sip:192.168.100.71 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.66:5062;branch=z9hG4bKnp992804895-411b471d192.168.100.66
From: <sip:12321@192.168.100.71>;tag=3b2d0018
To: <sip:12321@192.168.100.71>
Call-ID: 990209125-415b5d61@990209122-415b5d5e
Contact: ccarta <sip:12321@192.168.100.66:5062>;expires=600;q=0.500
Expires: 600
CSeq: 2 REGISTER
Content-Length: 0
Proxy-Authorization: Digest username="12321",realm="asterisk",uri="sip:192.168.100.66",nonce="7c7fba4d",nc="00000001",response="b8b1d7fc53eff354dfc31dfa3f800749"
User-Agent: Ahead SIPPS IP Phone Version 2.0.42.13
11 headers, 0 lines
Using latest request as basis request
Sending to 192.168.100.66 : 5062 (non-NAT)
Transmitting (no NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.100.66:5062;branch=z9hG4bKnp992804895-411b471d192.168.100.66
From: <sip:12321@192.168.100.71>;tag=3b2d0018
To: <sip:12321@192.168.100.71>;tag=as648287fa
Call-ID: 990209125-415b5d61@990209122-415b5d5e
CSeq: 2 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:12321@192.168.100.71>
Content-Length: 0
to 192.168.100.66:5062
Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.100.66:5062;branch=z9hG4bKnp992804895-411b471d192.168.100.66
From: <sip:12321@192.168.100.71>;tag=3b2d0018
To: <sip:12321@192.168.100.71>;tag=as648287fa
Call-ID: 990209125-415b5d61@990209122-415b5d5e
CSeq: 2 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Expires: 600
Contact: <sip:12321@192.168.100.71>;expires=600
Date: Tue, 14 Oct 2003 13:46:14 GMT
Content-Length: 0
to 192.168.100.66:5062
11 headers, 2 lines
Reliably Transmitting:
NOTIFY sip:12321@192.168.100.66:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.71:5060;branch=z9hG4bK3ecb7a3b
From: "asterisk" <sip:asterisk@192.168.100.71>;tag=as3f6e8c0e
To: <sip:12321@192.168.100.66:5062>
Contact: <sip:asterisk@192.168.100.71>
Call-ID: 074dfadf24b95dd75e17b56c67ffcaf1(a)192.168.100.71
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Event: message-summary
Content-Type: application/simple-message-summary
Content-Length: 36
Messages-Waiting: no
Voicemail: 0/0
(no NAT) to 192.168.100.66:5062
Sip read:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.100.71;branch=z9hG4bK3ecb7a3b
From: "asterisk" <sip:asterisk@192.168.100.71>;tag=as3f6e8c0e
To: <sip:12321@192.168.100.66:5062>;tag=3b302259
Call-ID: 074dfadf24b95dd75e17b56c67ffcaf1(a)192.168.100.71
CSeq: 102 NOTIFY
User-Agent: Ahead SIPPS IP Phone Version 2.0.42.13
Content-Length: 0
8 headers, 0 lines
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
I'm trying to do failure route to voicemail (which is working) but this
error is logged:
ERROR: t_should_relay: status rewrite by UAS: stored: 408, received: 487
I googled this and see that this came up last in October
(http://lists.iptel.org/pipermail/serusers/2003-October/002921.html) but
I don't see any evidence of a solution in the thread.
I suspect mine is the same problem as I have two UAs registered so the
initial dset is two places and then the append_branch on timeout is just
the voicemail uri.
BTW, I am doing this with asterisk for the usual DTMF access reasons
(altough I haven't yet figured out how to map sip:alan@columbia.edu to
DTMF. Maybe I'll have to give up and do numeric mailboxes:-(
I am rewriting with a prefix of "vm*u" before punting over to asterisk
which has
exten => _vm*u.,1,Wait,1
exten => _vm*u.,2,Voicemail(${EXTEN:3})
exten => _vm*u.,3,Goto(#,1)
Any pointers would be appreciated. My not-yet-complete ser.cfg is
attached (not yet punting voicemail for unregistered subscribers; just
registered subscribers who time out the invite).
/a
#
# $Id: ser.cfg,v 1.21.2.1 2003/07/30 16:46:18 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
debug=2 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
#listen=128.59.39.127
check_via=yes # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/ser_fifo"
alias="columbia.edu"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/acc.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
loadmodule "/usr/lib/ser/modules/exec.so"
# ----------------- setting module-specific parameters ---------------
# -- transaction timers --
modparam("tm", "fr_inv_timer", 15 )
modparam("tm", "fr_timer", 10 )
# -- usrloc params --
#
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "timer_interval", 10)
# -- auth params --
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# -- acc params --
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1 )
modparam("acc", "log_missed_flag", 2)
# ------------------------- request routing logic -------------------
# main routing logic
route{
/* ********* ROUTINE CHECKS ********************************** */
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
lookup("aliases");
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
break;
};
setflag(2);
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri=~"^sip:(.+@)?columbia.edu") {
if (method=="REGISTER") {
log(1, "REGISTER received\n");
if (!www_authorize("columbia.edu", "subscriber")) {
www_challenge("columbia.edu", "0");
break;
};
save("location");
break;
};
/* ********** Dial out to PSTN logic ************* */
# 5 Digit dialing, interior calls
if (uri=~"^sip:[1347][0-9]{4}@columbia\.edu") {
rewritehostport("128.59.59.242:5060");
log(1,"5 digit expression match");
route(2);
break;
};
# 10 Digit dialing with outlide line
if (uri=~"^sip:931[0-9]{10}@columbia\.edu") {
if(!(src_ip=="128.59.59.242")
& !(proxy_authorize("columbia.edu","subscriber"))) {
proxy_challenge("columbia.edu", "1");
break;
} else {
rewritehostport("128.59.59.242:5060");
log(1," 93 Outside line with 10 digit expression match");
route(2);
break;
};
};
/* voicemail access */
if (uri=~"^sip:\*86@columbia\.edu"
|uri=~"^sip:vm@columbia\.edu"
|uri=~"^sip:voicemail@columbia\.edu") {
route(3);
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
if (!exec_dset("/etc/ser/sipldap")) {
sl_send_reply("404", "Not Found");
break;
} else {
log(1," sipldap call");
};
}; #!lookup
};
if (method == "INVITE") {
t_on_failure("1");
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
route[2] {
log(1,"route[2]:SIP-to-PSTN call routed");
if (!t_relay()) {
sl_reply_error();
};
}
# ---- voicemail user access ----
route[3] {
rewritehostport("127.0.0.1:5069");
log(1,"voicemail access");
if (!t_relay()) {
sl_reply_error();
};
}
# ------------- handling of unregistered user ------------------
route[4] {
log(1,"route[4]: user not registered");
# non-Voip -- just send "off-line"
if (!(method == "INVITE" || method == "ACK" || method == "CANCEL")) {
sl_send_reply("404", "Not Found");
break;
};
# not voicemail subscriber
# if (!isflagset(4)) {
# sl_send_reply("404", "Not Found and no voicemail turned on");
# break;
# };
# forward to voicemail now
prefix("vm*u");
rewritehostport("127.0.0.1:5069");
t_relay_to_udp("127.0.0.1", "5069");
}
failure_route[1] {
# transfer to asterisk voicemail with uMAILBOX for unavailable.
# sip:USER@columbia.edu -> sip:vm*uUSER@127.0.0.1:5069
t_on_failure("2");
prefix("vm*u");
rewritehostport("127.0.0.1:5069");
append_branch();
log(1,"redirection to voicemail\n");
t_relay();
}
failure_route[2] {
# forwarding failed (voicemail down?)
log(1,"voicemail failed\n");
t_reply("500","Weasels have eaten voicemail again");
}
At 07:39 PM 8/14/2003, Chad Brown wrote:
>Perfect,
>
>Let me ask 2 quick follow-on questions...
>
>1. Can I go back to http://www.iptel.org/ser/tarball/ser_8_11_stable.tgz
>to get the latest patched and STABLE builds?
That's the latest, most stable source, you need to compile it myself.
There will be a new complete distribution by end of this month -- we are now
waiting to run SER through the upcoming SIPIT to release it.
>2. What location / version of the modules should I use when running
>builds for this location? (Serweb, mysql, jabber, etc)
All SER modules are included there.
uptodate SERWEB is now in the http://www.iptel.org/ser/tarball/ directory too.
-jiri
I'd like to run multiple SER instances on the same
database. I knew from previous experiments that
would not be possible because of the cache.
However, I just tried running multiple SER instances,
on the same database, but in different domains. This did
not work, they both wrote over each others location
entries in the database even though the domains on
each SER instance were different.
SER knows which domain it is in because of the
www_authorize("named.com", "subscriber")
authentication challenge.
So it seems reasonable that this instance of SER should only
mess with authorizations that it challenged. Perhaps the
problem is with the initial load of 'previous' registrations.
When SER starts, it loads the current location table. During
the load, ALL domains are loaded. Perhaps only the domains
listed by the 'alias="domain"' should be loaded and tracked,
and all of the rest should be ignored for each instance of SER?
---greg
Hi,
I have radius authentication working thanks to Jan's help but I am still not receiving any accounting messages to my radius server. I found a mention of setting radius_log_flag but ser 0.9.11 tells me it isn't found in the "acc" module. How can I set invite and goodbye messages (or any others for that matter) to send information to my radius server for accounting purposes. I
have read at leat 90% of the old messages but have yet to find an answer.
Thanks in advance,
Steve
Regarding the message below that I posted earlier today. I have some additional info..
I have tested this same accounting config on version 8.12 stable release of SER and it works fine. Is there bug in the SQL "acc" module for 8.12 CVS head?
Thanks!
Darren Nay
----- Original Message -----
From: Darren Nay
To: serusers(a)lists.iptel.org
Sent: Monday, December 29, 2003 11:51 AM
Subject: SQL Accounting - Problems
Hey All,
I am trying to get SQL accounting to work within SER, but I am having a problem. The data is not being saved into the database.
I've got the SER configured to use accounting. I've compiled the "acc" module with SQL support, and I believe that everything should be working.. However, I am getting the following errors in debug mode..
stateless - initializing
0(5814) Warning: uac does not spread accross the whole hash table
Maxfwd module- initializing
acc - initializing
0(5814) mod_init(): Database connection opened successfuly
textops - initializing
0(5814) auth_db:mod_init(): Database connection opened successfuly
0(0) INFO: udp_init: SO_RCVBUF is initially 8192
0(0) INFO: udp_init: SO_RCVBUF is finally 262144
2(5816) INFO: fifo process starting: 5816
2(5816) SER: open_uac_fifo: fifo server up at /tmp/ser_fifo...
2(5816) WARNING: no fifo_db_url given - fifo DB commands disabled!
This below is what I get when I make a call...
0(5814) BUG:tm:register_tmcb: no transaction found
0(5814) ERROR:acc:acc_onreq: cannot register additional callbacks
0(5814) BUG:tm:register_tmcb: no transaction found
0(5814) ERROR:acc:acc_onreq: cannot register additional callbacks
My call processing is working perfectly, but the accounting transactions (call records) are not being saved into the database in the "acc" table.
Also, my userloc registrations are being saved to the database in the "locations" table, and so I know that there isn't a problem with my mysql.so module. The database connectivity seems to be fine.
I have attached me ser.cfg as well.
If anyone knows why I am getting these errors, and why my accounting isn't being saved to the "acc" table in the database then I would very much appreciate the help!
Thanks!
Darren Nay - dnay(a)libertyisp.com
Hi,
I am trying to force incoming calls destined for a UA behind a symmetric
NAT through rtpproxy. In order to distinguish between those agents
behind a NAT and those out in the open, I saved their location in two
different tables upon registration. It now appears that even though I
set db_mode to '1' to force usrloc to immediately write-back all data
to the db, ser remembers a successful registration in the regular
location tables.
A REGISTER request is immediately written into my NAT tables while the
regular tables follows only a little later. When I call the UA in
question ser will find the agent in my regular location table. When I
manually delete the UA entry from the location table (and restart ser!)
my configuration will force the rtp stream just as expected.
Can anybody enlighten my whether this is a bug or a feature? Also I
would be very interested in learning how to handle UAs behind symmetric
NATs or how to keep state learned at registration time.
I attached parts of my configuration hoping to clarify what I am trying
to do.
Thilo
P.S.: this is ser 0.8.12
if (method=="REGISTER") {
if ("header indicates symmetric NAT") {
save("natlocation");
} else {
save("location");
};
};
[...]
if ((method==INVITE)) {
if(lookup("location")) {
xlog("L_ERR", "UA found in
'location'\n");
}
else {
if(lookup("natlocation")) {
xlog("L_ERR", "UA found in
'natlocation'\n");
force_rtp_proxy();
t_on_reply("2");
} else {
sl_send_reply("404", "Not
Found");
break;
};
};
};
[...]
onreply_route[2] {
if (status=~"2[0-9][0-9]"){
xlog("L_ERR", "forcing rtp stream back from NATed
UA through localhost\n");
force_rport();
force_rtp_proxy();
};
}