Hello,
Does someone know of a SIP UA that has support for end-to-end encryption by
using PGP or some other application for encryption of SIP message body's?
Does SER have support for hop-to-hop encryption or some other sort?
Would love to hear it!
Thanks in advance!
Met vriendelijke groet,
Q&I
Wouter Prins
Q&I NEDERLAND BV
Delftech Park 35 - 37
P.O. Box 402 - 2600 AK DELFT
Phone [+31] 15-8880444 - Fax [+31] 15-8880445
info(a)qi.nl - www.qi.nl
Jiri wrote:
There is other problem though -- the failure_route logic for VM should
be different from that in route block -- you can't create transaction state two
times (first time with t_relay, second time with t_newtran). SER will
certainly complain with some error message in your logs.
-----------------------
Can anyone tell me how to set up vm to work on a failure route. I've tried several times and although Jiri says the logic has to be different because you can't create a transaction two times, I can't figure out how to make it work, and I haven't found any documentation detailing this issue. I have seen the errors in the logs that verify what Jiri is saying.
Jiri said that he'd introduce new commands to hide tansaction functionality from script writers, but I'd like to know how to make this work without those new commands.
Also, is there a command that queries whether or not a sip message is for a user in the subscriber table? I need to know if the user exists regardless of whether or not lookup("location") = true.
Thanks,
G
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
Hi,
When trying to send a SIP message through the fifo server, it comes back with an
error:
"400 fifo_uac: next hop address expected"
What could be causing this and how could we monitor what gets in and out of the
fifo?
Thanks!
Jaime
*******************************************************************************
Important.
Confidentiality: This communication is intended for the above-named person and
may be confidential and/or legally privileged. Any opinions expressed in this
communication are not necessarily those of the company. If it has come to you
in error you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender immediately.
Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation. Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.
Orange PCS Limited is a subsidiary of Orange SA and is registered in England No
2178917, with its address at St James Court, Great Park Road, Almondsbury Park,
Bradley Stoke, Bristol BS32 4QJ.
*******************************************************************************
>> I did place this portion inside the myself check
>>and it still tries to transfer to vm after the time expires.
>I'm puzzled -- did not you want to transfer to vm after the time
expires?
I will try to make this clearer. I am behind an ATA with a SIP proxy of
209.242.10.153. If I call someone else registered on my domain and they
are not available, I want to go to voice mail. If I call 1-800-555-1212
from my phone, I do not want my sip proxy to reroute the call to
voicemail after 10 seconds if no one answers(or ever for that matter).
Right now if I dial 18005551212 from my handset, I see the destination
as sip:18005551212@209.242.10.153 on the server which matches to myself
and ser tries to send it to voicemail.
Someone calling into the network is not a problem. They will never hit
our server unless the destination is local.
>>This is the part that I really need help with! When the call timer
>>fails, the call goes to the route[1]. How do I get it into voice mail
>>from that point?
>See bellow, I think that should work.
This is what I had originally, and I get the following syslog.
Sep 10 16:36:36 voip2 ser: parse error (127,37-38): Command cannot be
used in the block
Sep 10 16:36:36 voip2 ser: ERROR: bad config file (1 errors)
Sep 10 16:36:36 voip2 ser: ser startup failed
Is says that vm is not valid in the block. According the admin guide,
only certain commands can be used within a failure block. I assume that
is the problem here. If not, please let me know as this is exactly what
I want to do.
>THE SAME STUFF LIKE ABOVE, YOU DON'T WANT TO t_relay ANYTHING
>if(!vm("/tmp/am_fifo","voicemail")){
> t_reply("500", "SEMS
>error");
> };
> break;
Any other suggestions?
Subject: Re: [Serusers] voicemail question - dial plan example -
pstngateway example
On (02.10.03 23:28), Alexander Mayrhofer wrote:
> replacing
>
> rewritehostport("219.242.10.153:5061");
>
> with
>
> append_branch("sip:219.242.10.153:5061");
>
> in the fialure_route should do the trick.
err, i hate replying to my own mails.
The above line will make you loose the user part of the URI, and is
therefore not a working solution ... we'd need a function to reset the
branch status value here, which afaik does currently not exist ...
axelm
I am looking for the following feature
A list of Directory Services is displayed on the serweb, (for example, Hotel List, Emergency List, Airlines List ect).
A registered user will subscribe to the intended list (Eg a hotel will subsribe to the hotel list).
A normal user will be able to view the selected list. The seleted list show only online members at that time. Off-line members will only be shown when they are login in.
Can this feature be done?
Thanks
At the top of the config I have the following statement....
if (method=="INVITE") {
record_route();
if (!radius_www_authorize("")) {
log(1,"radius auth failure");
www_challenge("voip2.test.net","0");
break;
};
append_rpid_hf();
};
If I call a phone with caller-id and my username is 256, it shows 256 on
the phone, if I call with a username of test, it shows 4534 on the
handset even though I have the sip-rpid set to 222.
Stephen
Subject: Re: [Serusers] caller-id with raius using sip-rpid
Retrieving caller-id when users register doesn't work because REGISTER
messages are processed by the server and the server generates a reply
only.
What you need is to insert Remote-Party-ID header field into INVITE
message, to make it work you must authenticate also INVITE messages.
My guess is that you do not authenticate INVITE messages and therefore
there is nothing append_rpid_hf can add.
Jan.
On 02-10 11:35, Steve Dolloff wrote:
> I want to retrieve the caller-id of a user from radius when they
> register and use it when I redirect an invite request to the voicemail
> system so that the voicemail system can route the call based on
> caller-id. I also want to be able to send it to the sip gateway when
I
> am routing calls to the pstn.
>
> I have this in my config currently and it doesn't appear to set the
> caller-id in the invite message.
>
>
rewritehostport("209.242.10.153:5061");
> append_rpid_hf();
> t_relay();
>
>
> Subject: Re: [Serusers] caller-id with raius using sip-rpid
>
> append_rpid_hf has no parameters. Version with 2 parameters is in
> unstable branch in the CVS only. What exactly do you want to do ?
>
> Jan.
>
> On 02-10 11:26, Steve Dolloff wrote:
> > I found this example in a previous Serusers message.
> >
> > append_rpid_hf("<sip:+",
> >
> >
>
"@zettou.net>;party=calling;id-type=subscriber;privacy=off;screen=yes");
> >
> > I tried calling append_rpid_hf();, but it does nothing.
> >
> > I also tried
> >
>
append_rpid_hf("party=calling;id-type=subscriber;privacy=off;screen=yes"
> > ); but I get an unknown command presumably because I am not using
the
> > right number of parameters.
> >
> > I only want to modify the calling-id info.
> >
> > Can anyone provide an example?
> >
> > -----Original Message-----
> > From: Jan Janak [mailto:jan@iptel.org]
> > Sent: Thursday, October 02, 2003 11:09 AM
> > To: Steve Dolloff
> > Cc: serusers(a)lists.iptel.org
> > Subject: Re: [Serusers] caller-id with raius using sip-rpid
> >
> > If you want to add Remote-Party-ID header field then you have to
call
> > append_rpid_hf function in your script.
> >
> > Jan.
> >
> > On 02-10 11:07, Steve Dolloff wrote:
> > > OK, I am setting up a Voicemail system (using asterisk) and I am
> > > currently doing a rewritehostport(ip:port) and then trelay() to
send
> > it
> > > to the voicemail system if an invite fails.
> > >
> > > Should I change something? See my ser.cfg and output from the call
> to
> > > the vm.
> > >
> > > Here is the code from ser.cfg
> > >
> > >
> > rewritehostport("219.242.10.153:5061");
> > > t_relay();
> > >
> > > Here is the sip info from asterisk.
> > >
> > > INVITE sip:200@219.242.10.153:5061;user=phone SIP/2.0
> > > Max-Forwards: 10
> > > Record-Route: <sip:200@219.242.10.153;ftag=2236658534;lr=on>
> > > Via: SIP/2.0/UDP 219.242.10.153;branch=z9hG4bK13de.31901234.0
> > > Via: SIP/2.0/UDP 226.145.234.113:5060;rport=5060
> > > From: sip:test@voip2.test.net;tag=2236658534
> > > To: <sip:200@voip2.test.net;user=phone>
> > > Call-ID: 2218108971(a)226.145.234.113
> > > CSeq: 1 INVITE
> > > Contact: <sip:test@226.145.234.113:5060;transport=udp>
> > > User-Agent: Cisco ATA 186 v2.16.2 ata18x (030909a)
> > > Expires: 300
> > > Content-Length: 271
> > > Content-Type: application/sdp
> > >
> > >
> > >
> > > Subject: Re: [Serusers] caller-id with raius using sip-rpid
> > >
> > > Remote-Party-ID header field is inserted into forwarded requests,
> not
> > > responses.
> > >
> > > Jan.
> > >
> > > On 02-10 10:53, Steve Dolloff wrote:
> > > > Ser doesn't appear to be passing the Caller-id to the ata at
auth
> or
> > I
> > > > am doing something wrong. Can anyone point me in the right
> > direction?
> > > >
> > > > Thanks,
> > > >
> > > > Stephen
> > > >
> > > > I have the following entry in my freeradius users file.
> > > >
> > > > test(a)voip2.test.net Auth-Type := Digest, User-Password == "test"
> > > > Reply-Message = "Hello, test with digest", Sip-Rpid =
> > > > "8472222222"
> > > >
> > > > When I run a radclient test I get the correct info..
> > > >
> > > > radclient -f digest.test 219.242.10.153:1812 auth testing
> > > > Received response ID 134, code 2, length = 57
> > > > Reply-Message = "Hello, test with digest"
> > > > Sip-Rpid = "8472222222"
> > > >
> > > > This is the output from ngrep port 5060
> > > >
> > > > U 216.222.234.113:5060 -> 219.242.10.153:5060
> > > > REGISTER sip:voip2.test.net SIP/2.0..Via: SIP/2.0/UDP
> > > > 216.222.234.113:5060..
> > > > From: sip:test@voip2.test.net;tag=277486986..To:
> > > > sip:test@voip2.test.net..Cal
> > > > l-ID: 2687235586@216.222.234.113..CSeq: 2 REGISTER..Contact:
> > > > <sip:test@216.
> > > > 222.234.113:5060;transport=udp>;expires=120..User-Agent: Cisco
> ATA
> > > 186
> > > > v2.
> > > > 16.2 ata18x (030909a)..Authorization: Digest
> > > >
> > >
> >
>
username="test",realm="voip2.test.net",nonce="3f7c49b40e81572eff05bdf50c
> > > > 867a85bbb0da3c",uri="sip:voip2.test
> > > >
> .net",response="1684410c130d6faa9a3c573365f36ab6"..Content-Length:
> > > > 0....
> > > > #
> > > > U 219.242.10.153:5060 -> 216.222.234.113:5060
> > > > SIP/2.0 200 OK..Via: SIP/2.0/UDP
> > > > 216.222.234.113:5060;rport=5060..From: sip
> > > > :test@voip2.test.net;tag=277486986..To:
> > > > sip:test@voip2.test.net;tag=b27e1a1d3
> > > > 3761e85846fc98f5f3a7e58.13c2..Call-ID:
> > > > 2687235586@216.222.234.113..CSeq: 2
> > > > REGISTER..Contact:
> > > > <sip:test@216.222.234.113:5060;transport=udp>;q=0.00;exp
> > > > ires=120..Server: Sip EXpress router (0.8.12dev-t16
> > > > (i386/linux))..Content-
> > > > Length: 0..Warning: 392 219.242.10.153:5060 "Noisy feedback
> tells:
> > > > pid=121
> > > > 59 req_src_ip=216.222.234.113 req_src_port=5060
> > > > in_uri=sip:voip2.test.net ou
> > > > t_uri=sip:voip2.test.net via_cnt==1"....
> > > >
> > > > _______________________________________________
> > > > Serusers mailing list
> > > > serusers(a)lists.iptel.org
> > > > http://lists.iptel.org/mailman/listinfo/serusers
Hi
I m using RADIATOR with ser0.8.11, while ser is running it doesnt send req to radius, following are snapd of log generated at ser (ngrep o/p)
#
U 202.133.64.66:5060 -> 202.133.64.71:5060
REGISTER sip:voice.cooking.com.pk SIP/2.0..Via: SIP/2.0/UDP 202.133.64.66;branch=z9hG4bKnp1730137267-43b5a45e202.133.64.6
6..From: <sip:12321@voice.cooking.com.pk>;tag=671fccba..To: <sip:12321@voice.cooking.com.pk>..Call-ID: 1969536413-43c1d03
a@1969536416-43c1d037..Contact: <sip:12321@202.133.64.66>;expires=600;q=0.500..Expires: 600..CSeq: 22 REGISTER..Content-
Length: 0..User-Agent: Ahead SIPPS IP Phone Version 2.0.42.13....
#
U 202.133.64.71:5060 -> 202.133.64.66:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 202.133.64.66;branch=z9hG4bKnp1730137267-43b5a45e202.133.64.66..From: <sip:123
;tag=671fccba..To">21(a)voice.cooking.com.pk>;tag=671fccba..To: <sip:12321@voice.cooking.com.pk>;tag=b27e1a1d33761e85846fc98f5f3a7e58.bdca..Ca
ll-ID: 1969536413-43c1d03a@1969536416-43c1d037..CSeq: 22 REGISTER..WWW-Authenticate: Digest realm="cooking.com.pk", nonce
="3f7d19d62902cb25358e2c666df77d1369d90974"..Server: Sip EXpress router (0.8.11 (i386/linux))..Content-Length: 0..Warning
: 392 202.133.64.71:5060 "Noisy feedback tells: pid=13339 req_src_ip=202.133.64.66 req_src_port=5060 in_uri=sip:voice.co
oking.com.pk out_uri=sip:voice.cooking.com.pk via_cnt==1"....
While here is my ser.cfg
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_radius.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_dbs", "calculate_ha1", yes)
modparam("auth_radius", "radius_config", "/usr/local/etc/radiusclient/radiusclient.conf")
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")
modparam("auth_radius", "service_type", 15)
:
:
:
:
# Uncomment this if you want to use digest authentication
if (!radius_www_authorize("cooking.com.pk")) {
www_challenge("cooking.com.pk", "0");
break;
};
Any hint?
JF
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
Can I replace nathelper.c from ser-0.8.11 (release) with the latest from dev
and recompile? I tried that and recompiled just nathelper.so.
What happens now is that for fix_nated_sdp or force_rtp_proxy I get 'ERROR:
extract_mediaip: no `c=' in SDP'. What is happening is that in each of those
functions it calls extract_mediaip twice. The first time is OK. The 2nd it
gives this error. Then when it sends out the request, it has the correct IP
AND the proxy IP (e.g. 1.2.3.44.3.2.1)
Does it need the full latest CVS to work? I get a mysql error with that.
Thanks in advance.
Dovid
I have been fighting with this for a month now and still can't get it
work. Can someone please tell me what's wrong?
Relevant configs...
modparam("tm", "fr_inv_timer", 5 )
modparam("tm", "fr_timer", 10 )
t_on_failure("2");
if (!t_relay()) {
sl_reply_error();
break;
};
failure_route[2]{
log(1,"call sent to voicemail due to no answer\n");
rewritehostport("219.242.10.153:5061");
t_relay();
break;
}
I get this error in my logs.....
Oct 2 15:16:13 voip2 ser[15512]: ERROR: t_forward_nonack: no branched
for fwding
Oct 2 15:16:13 voip2 ser[15512]: ERROR: w_t_relay (failure mode):
forwarding failed
-----Original Message-----
From: Jiri Kuthan [mailto:jiri@iptel.org]
Sent: Thursday, September 25, 2003 4:49 PM
To: Gavin Bensom; serusers(a)lists.iptel.org
Subject: Re: [Serusers] voicemail question - dial plan example -
pstngateway example
At 07:16 PM 9/25/2003, Gavin Bensom wrote:
>In the ser admin guide it says
>
>"You can refer to voicemail example config file to know what your
configuration file should include. Note that voicemail uses subsriber
database table to determine recepient's email address. Read the README
file in the vm module directory for complete description of the
functions and variables that are used by voicemail and how they work."
>
>I can't find any complete descriptions of the functions and variables
and how they work. The README file is very short and basic.
>
>In the example config file there are many calls to vm(/tmp/am_fifo",
"*"); where * is "announcement" or "voicemail" or "echo" or "bye" or
"conference." Are these all required in a basic voicemail setup? C
If you want to setup voicemail, use just vm("/tmp/am_fifo",
"voicemail"); the second parameter
describes behaviour of the media component. You don't want to deploy the
other examples.
>an anyone point me to more information on how this works and what each
of these modules are doing?
>
>If I call a user who isn't logged in I can hear the voicemail default
greeting, but then the line goes silent. I don't think there is any
voice recording happening. See ser.cfg attached.
Recorder is silent when it records, that's normal behaviour. What
matters is whether you
then receive a WAV file by email or not. SEMS is running (you hear
announcement), so you
should.
>Also, if a timer is set to send calls to vm (using failure_route) after
a certain timeout, is there a way to prevent that timeout from killing
calls routed to the PSTN?
If you want failure_route to be evoked only for some calls, then
set t_on_failure_route for such. You already do so in your script,
don't you?
There is other problem though -- the failure_route logic for VM should
be different
from that in route block -- you can't create transaction state two times
(first time with t_relay, second time with t_newtran). SER will
certainly
complain with some error message in your logs.
I will introduce some new command which hides details of transaction
processing
from script writers and can be used from both route[] and
failure_route[].
(I didn't think of it before since I used voicemail on some other
machine
than proxy server.)
-jiri
>
>Thanks,
>G.
>
>
>Do you Yahoo!?
><http://shopping.yahoo.com/?__yltc=s%3A150000443%2Cd%3A22708228%2Cslk%3
Atext%2Csec%3Amail>The New Yahoo! Shopping - with improved product
search
>#
># $Id: ser.cfg,v 1.20 2003/05/31 21:12:19 jiri 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
>debug=8
>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"
>sip_warning=no
>#
># ------------------ 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/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/vm.so"
>loadmodule "/usr/local/lib/ser/modules/pa.so"
>loadmodule "/usr/local/lib/ser/modules/msilo.so"
>loadmodule "/usr/local/lib/ser/modules/acc.so"
>loadmodule "/usr/local/lib/ser/modules/textops.so"
>#
>#loadmodule "/usr/local/lib/ser/modules/nathelper.so"
>#loadmodule "/usr/local/lib/ser/modules/uri.so"
>#loadmodule "/usr/local/lib/ser/modules/group.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")
>#
>#
>modparam("acc", "log_level", 1)
>modparam("acc", "log_flag", 2)
>modparam("acc", "log_missed_flag", 2)
>modparam("acc", "log_fmt", "fimos")
>#
>#modparam("tm", "fr_inv_timer", 35) #INVITE timeout
>#modparam("tm", "fr_timer", 30) #negative INVITE replay or no
> #final reply for a request for ACK
>#
>modparam("voicemail", "db_url", "sql://ser:heslo@localhost/ser")
>#
>#modparam("acc", "db_url", "sql://ser:heslo@localhost/ser")
>#modparam("acc", "db_flag", 2)
>#modparam("acc", "db_missed_flag", 2)
>#
># ------------------------- request routing logic -------------------
>#
># main routing logic
>#
>alias=10.10.10.49 #sip server IP address
>alias=jiffypop #sip server name
>alias=mydomain.com #sip domain/realm
>alias=jiffypop.mydomain.com #sip server FQDN
>#
>route{
> log(1,"entering main route");
> #prevent strangers from claiming to belong to our domain;
> #if sender claims to be in our domain in From header field,
> #better authenticate him
> # code not inserted yet :)
>
> # 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 (len_gt( 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
> record_route();
> # loose-route processing
> if (loose_route()) {
> t_relay();
> break;
> };
>
> setflag(2); #set flag for accounting
>
> # 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") {
> # digest authentication
> log(1,"request for registration");
> if (!www_authorize("mydomain.com",
"subscriber")) {
> www_challenge("mydomain.com", "0");
> break;
> };
> save("location");
> break;
> };
>
>/* ********** Dial out to PSTN logic ************* */
>
> #forward numerical 7 digit requests to gateway
>
if(uri=~"^sip:[0-9]{7}@(mydomain\.com|10\.10\.10\.49)"){
>#
append_hf("Remote-Party-ID:<sip:6508466600@mydomain.com>;party=calling;i
d-type=subscriber;privacy=off;screen=no;\r\n");
> rewritehostport("10.10.10.5:5060");
> log(1,"7 digit expression match");
> route(2);
> break;
>
> };
> # strip 650 and forward to GW is user dials 650 before
phone no.
>
if(uri=~"^sip:650[0-9]{7}@(mydomain\.com|10\.10\.10\.49)"){
> strip(3);
> rewritehostport("10.10.10.5:5060");
> log(1,"650 area code dialed, 650 stripped");
> route(2);
> break;
>
> };
> #forward numerical 10 digit requests to gateway, append
a 1 first
>
if(uri=~"^sip:[0-9]{10}@(mydomain\.com|10\.10\.10\.49)"){
> prefix("1");
> rewritehostport("10.10.10.5:5060");
> log(1,"10 digit expression match, prefix 1");
> route(2);
> break;
> };
> #forward numerical 11 digit requests that start with a
1 to GW
>
if(uri=~"^sip:1[0-9]{10}@(mydomain\.com|10\.10\.10\.49)"){
> rewritehostport("10.10.10.5:5060");
> log(1,"10 digit exp match w/leading 1");
> route(2);
> break;
> };
> #forward international N digit requests to gateway
>
if(uri=~"^sip:011[0-9]+@(mydomain\.com|10\.10\.10\.49)"){
> rewritehostport("10.10.10.5:5060");
> log(1,"international expression match");
> route(2);
> break;
> };
>
>/* ********** VOICEMAIL logic ************* */
>
> if (uri=~"^sip:voicemail\+@"){
> t_newtran();
> t_reply("100", "Trying -- just a second");
> if(!vm("/tmp/am_fifo","announcement")){
> t_reply("500", "SEMS error");
> };
> log(1,"sip:voicemail uri match");
> break;
> };
>/* ****** Find Aliases and Locations of users ********* */
>
># It is very important to lookup "aliases" before looking up
"locations"
>
> if(!lookup("aliases")){
> log(1,"Couldn't find any matching alias");
> sl_send_reply("404", "User does not exist");
> break;
> };
>
> if(!lookup("location")) {
> log(1,"unable to locate user");
> route(3);
> break;
> };
>
> };
>
>
> # forward to current uri now; use stateful forwarding; that
> # works reliably even if we forward from TCP to UDP
> t_on_failure("1");
> if (!t_relay()) {
> sl_reply_error();
> };
> log(1,"eof");
>}
>
>route[2]{
> log(1,"route[2]:SIP-to-PSTN call routed");
> if(!t_relay()){
> sl_reply_error();
> };
>}
>
>route[3]{
> log(1,"route[3]: voicemail processing");
> if(method=="INVITE" || method=="ACK"){
> log(1,"1st if entered in route[3] *vm*");
> t_newtran();
> t_reply("100","Trying -- just a second");
> if(!vm("/tmp/am_fifo","voicemail")){ # "announcement"
was replaced with "voicemail"
> log(1,"vm module called and failed");
> t_reply("500", "SEMS error");
> };
> break;
> };
> log(1,"end of route[3], 1st if check not entered");
>}
>
>failure_route[1]{
> log(1,"failure_route[1]:jump to vm processing");
> route(3);
># break;
>}
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
--
Jiri Kuthan http://iptel.org/~jiri/
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers