If you are using following scripts, then you problem may be caused by the
additional ^ after =~ expression. I am a new comer to both SER and RegEx, so
I do not know why this ^ is added in some of the example scripts. Remove it
and try again.
______________________
if (uri=~"^sip:[0-9]*") {
forward (192.168.15.41,5060); # 192.168.15.41 is my CISCO SIP2PSTN
~~~~~~~~~~~~~~~~~~~~~~
Younger Wang
----- Original Message -----
From: Jade Chen Yan
To: 'Younger Wang'
Sent: Thursday, June 19, 2003 12:15 AM
Subject: RE: [Serusers] ser.cfg for PSTN GW
thank u very much.
my configuration.
serrouter 's IP addr : 172.30.10.230
the PSTN GW addr: 192.168.15.41 at the gateway, there is a phone num 8010
the invite uri from my sipphone to SER is "sip:8010@172.30.10.230"
I hope after the statement rewritehostport("192.168.15.41:5060"); the
invite message's uri will be changed to "sip: 8010(a)192.168.15.41"
but from the CISCO's GW, i found the uri is the same as the original. that
is :"sip:8010@172.30.10.230"
so the GW return an 400 invalid IP addr error.
Regards,
Jade
-----Original Message-----
From: Younger Wang [mailto:wygmail@yeah.net]
Sent: Friday, June 20, 2003 6:00 AM
To: jade(陈雁); serusers(a)lists.iptel.org
Subject: Re: [Serusers] ser.cfg for PSTN GW
It seems ok with your syntax. Should you give more detail?
----- Original Message -----
From: Jade Chen Yan <mailto:jade@tencent.com>
To: 'Younger Wang' <mailto:wygmail@yeah.net> ; serusers(a)lists.iptel.org
Sent: Wednesday, June 18, 2003 11:46 PM
Subject: RE: [Serusers] ser.cfg for PSTN GW
thank u for your kindly reply . the ser can be started. by I alway got the
400 "invilid ip addr"error.
i use the following to provide the GW IP
#forward (192.168.15.41,5060);
#rewritehostport("192.168.15.41:5060");
t_relay_to( "192.168.15.41", "5060");
each of which cannot work out .got the same error.
can u give me other suggestions.?
-----Original Message-----
From: Younger Wang [mailto:wygmail@yeah.net]
Sent: Friday, June 20, 2003 4:51 AM
To: jade(陈雁); serusers(a)lists.iptel.org
Subject: Re: [Serusers] ser.cfg for PSTN GW
Please add a semicolon ';' after the last '}'
Younger Wang
----- Original Message -----
From: Jade Chen Yan <mailto:jade@tencent.com>
To: serusers(a)lists.iptel.org
Sent: Wednesday, June 18, 2003 10:41 PM
Subject: [Serusers] ser.cfg for PSTN GW
hi, all,
whenever I add the following lines in the ser.cfg, the ser cannot start up.
:
#for PSTN gateway
if (uri=~"^sip:[0-9]*") {
forward (192.168.15.41,5060); # 192.168.15.41 is my CISCO SIP2PSTN
GW.
#rewritehostport("192.168.15.41","5060")
break;
}
I just add in the default ser.cfg.
when I comment these lines. the ser can be started.
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
# if (!www_authorize("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "0");
# break;
# };
save("location");
break;
};
#for PSTN gateway
#if (uri=~"sip:8010") {
# forward (192.168.15.41,5060);
# #rewritehostport("192.168.15.41","5060")
# break;
#}
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
can anyone tell me what 's wrong with these line.
Best Regards,
Jade
_____
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers