Hi jiri,
What we are trying to do is take a register request, save the location and then forward the register, with the contact re-writen to another SIP server. So I would register with the SER SIP Proxy using my laptops IP address and the SER would then forward my register request onto the other sip server with the contact re-writen to be jo(a)ser.server not jo@laptop.
Hope that make some sence...
-----Original Message-----
From: Jiri Kuthan [mailto:jiri@iptel.org]
Sent: Thursday, 20 November 2003 16:13 p.m.
To: Stephen Miles; serusers(a)lists.iptel.org
Subject: Re: [Serusers] Rewrite Contact Field
Stephen,
I hope you excuse if I leave RE definition to you, I am not into
doing this dirty work either ;), especially if we did not see
what RE resulted in the replacement you are talking about.
The command you wish to use to replace with a fixed value is textops/replace.
To replace a string with a new string which includes part of the original
string, you may use textops/subst.
More importantly, it would be good to understand to know why you need
to mangle the requests -- there may be perhaps other ways to achive
what you are trying to do. There is for example a contact mangling
module, called mangler.
-jiri
At 03:45 AM 11/20/2003, Stephen Miles wrote:
>Hi All,
>
>Hoping you regular expression gurus out there can help me out a bit.
>
>I am wanting to rewrite the Contact header field inside a sip message using either the replace or subst from the textops module. I've done my best but complex/long regular expressions are just a bit beyond me.
>
>I want to change Contact "potato" <sip:99196026@ns.commverge.co.nz:5060>
>to Contact "potato" <sip:99196026@sipsrv2.tranzpeer.net:5060>.
>
>So far I can change bits of it and almost get it right but I am still seeing the original contact right after the new one i.e: Contact "potato" <sip:99196026@ns.commverge.co.nz:5060.sip:99196026@sipsrv2.tranzpeer.net:5060>
>
>HELP
>
>Thanks in advance,
>Stephen
>
>
>-----------------------------------------------------------------------------------------------
>This message and any attachments contain privileged and confidential information. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify the sender immediately via email and then destroy this message and any attachments.
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
--
Jiri Kuthan http://iptel.org/~jiri/
I am using ser 0.8.11 with redhat 9. I am not using mysql or authentication
and currently have a pretty simple config due to my limited programming
skills.
I have orig phone A registered to SER and have SER rewriting A's INVITES so
our
softswitch will be happy. Terminating phone B is registered to our
softswitch.
Phone A can call a phone B and 2 way voice is established. Phone B can
terminate the call and the session will end. All is ok until I try and
use Record-Route (by removing comment #) in my ser.cfg below.
Using Record-Route, when the terminating phone answers, the 200 OK
will propagate all the way through SER and to the originating phone but
at this point the ACK will not get sent back by SER. Because of
this our softswitch will continue to send the 200 OK and after some time
it gives up and terminates both legs with BYE's. Please reference the
attached sip_scenario trace file (which has end packets removed to conserve
space)
Could someone suggest how I might use Record-Route properly?
Thanks in advance!
Tim
=========================================
(10.16.1.218) is SER registered phone who initiates call
10.16.1.147 is SER
172.17.4.102 is our softswitch acting as back2back user agent.
(10.16.1.214) is softswitch registered phone answers/terminates call.
================================================
Here is 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 (len_gt( max_len )) {
sl_send_reply("513", "Message too big");
break;
};
if (method=="INVITE") {
rewritehostport("172.17.4.102");
# record_route();
t_relay();
# forward (172.17.4.102, 5060);
};
# 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;
#};
# 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("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "0");
# break;
# };
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
# 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();
#};
}
<<test3.txt>>
Can I change the configuration of ser without restarting?
I'm afraid if I restart it is stopping the ser and starting again which will
destroy the current session.
Is it possible that I can store the forwarding conditions on mysql-table and
ser will take it and forward it without restarting?
Pls help.
Kannaiyan
Hi,
after couple of months of SER experience I'm now facing a problem with CLIR type of supplementary service which I'm not able solve by myself, hopefully I'll receive some hints from seruser list readers.
The case is that in pstn connection I have Cisco as5300 gw in use and when calling from pstn side I can omit the calling line id e.g. by typing the prefix #31# just before the b-sub uri in number format --> calleed party (being now sip uac registered in to SER) will see anonymous caller via pstn gw, OK (the same can be monitored from the sip messages coming from gw to ser).
But how do the same when calling from sip uac (registered to SER) to pstn ? I have understood that one way is to use Append_rpid_hf (in september posts there were nice descriptions for the usage of it, but I'm not sure if I understood it thoroughly). Before playing with prefix and suffix I just tested how the append_rpid_hf would work and added the line in my ser.cfg...only that when I make call from sip client and monitor the sip messages there is no Remote-Party id line appended to the initial sip invite header ?
btw, I'm using radius auth and ser 0.8.11
reg.
timlaa
............................................................
Maksuton sähköposti aina käytössä http://luukku.com
Kuukausimaksuton MTV3 Internet-liittymä www.mtv3.fi/liittyma
Make sure your SER script includes route-processing, as in SER's
default config file in beginning. E.g, like
# 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;
};
-jiri
At 10:23 PM 11/19/2003, Garey, Tim wrote:
>I am using ser 0.8.11 with redhat 9. I am not using mysql or authentication
>and currently have a pretty simple config due to my limited programming
>skills.
>I have orig phone A registered to SER and have SER rewriting A's INVITES so
>our
>softswitch will be happy. Terminating phone B is registered to our
>softswitch.
>
>Phone A can call a phone B and 2 way voice is established. Phone B can
>terminate the call and the session will end. All is ok until I try and
>use Record-Route (by removing comment #) in my ser.cfg below.
>
>Using Record-Route, when the terminating phone answers, the 200 OK
>will propagate all the way through SER and to the originating phone but
>at this point the ACK will not get sent back by SER. Because of
>this our softswitch will continue to send the 200 OK and after some time
>it gives up and terminates both legs with BYE's. Please reference the
>attached sip_scenario trace file (which has end packets removed to conserve
>space)
>
>Could someone suggest how I might use Record-Route properly?
>
>Thanks in advance!
>
>Tim
>=========================================
>
>(10.16.1.218) is SER registered phone who initiates call
>10.16.1.147 is SER
>172.17.4.102 is our softswitch acting as back2back user agent.
>(10.16.1.214) is softswitch registered phone answers/terminates call.
>================================================
>Here is 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 (len_gt( max_len )) {
> sl_send_reply("513", "Message too big");
> break;
> };
>
> if (method=="INVITE") {
> rewritehostport("172.17.4.102");
> # record_route();
> t_relay();
> # forward (172.17.4.102, 5060);
> };
>
> # 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;
> #};
>
> # 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("iptel.org", "subscriber")) {
># www_challenge("iptel.org", "0");
># break;
># };
>
> save("location");
> break;
> };
>
> # native SIP destinations are handled using our USRLOC DB
> if (!lookup("location")) {
> sl_send_reply("404", "Not Found");
> break;
> };
> };
> # 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();
> #};
>
>}
>
> <<test3.txt>>
>
>
>
>
>
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
--
Jiri Kuthan http://iptel.org/~jiri/
HI,
is there anyone using Asterisk as voicemail backend for SER ?
I would like to know if this is possible and what can I expect from
this integration ...
Tnx !
--
Best regards,
Alessio mailto:alessiof@interconnessioni.it
Hi,
I have installed ser-0.8.11 on my redhat linux 7.3. SER is running fine.
To check whether my server is responding to requests, i installed
sipsack.
My SIP_DOMAIN= "myserver.foobar.com".
On giving command
sipsak -T -s sip:admin@myserver.foobar.com.
It shows following error.
"no gethostbyname: No such file or directory"
Regards
Prince Arora
Hi,
In my SER the users can register either by using sip uri (name at domain) or numerical
sip uri (number at domain). Everything is ok if user registers with numerical format uri but
if the user registers with e.g. timlaa at domain type of uri (and also numerical uri exists for
the same user, but not active registeration) how can I then direct the calls from pstn to
this sip client or vice versa direct sip client's calls to pstn i.e. somehow the timlaa at
domain should be converted to user's number at domain uri format.
One solution I believe is to use alias. I read all the former posts and added the line lookup("aliases") in to my ser.cfg and
tried to test it by using serctl add alias command, but when the command is executed
it seems that ser will go to infinite loop (the only way to recover is to kill ser process and start
it again).
Or is this going to be a solution overall for the above described case ?
reg.
timlaa
............................................................
Maksuton sähköposti aina käytössä http://luukku.com
Kuukausimaksuton MTV3 Internet-liittymä www.mtv3.fi/liittyma
Hi,
I would like to use aliases in combination with radius authentication.
Is it possible to administrate the aliases using the radius?
Greetings,
Axel
We are trying to compile ser 0.8.11 on Solaris 2.8 using gcc 3.3. Since
we don't have librt.so on our system, we change the Makefile.defs to use
libpthread instead, we also added "<sched.h>" to be inclueded in the
main.c file. However, during the compilation, we still got the error message:
Extra objs:
gcc -O2 action.o crc.o data_lump.o data_lump_rpl.o dprint.o dset.o error.o fifo_server.o flags.o forward.o hash_func.o ip_addr.o main.o md5.o md5utils.o modparam.o msg_translator.o pass_fd.o proxy.o receive.o resolve.o route.o route_struct.o script_cb.o sr_module.o stats.o tcp_main.o tcp_read.o timer.o udp_server.o mem/f_malloc.o mem/mem.o mem/memtest.o mem/q_malloc.o mem/shm_mem.o mem/vq_malloc.o parser/hf.o parser/msg_parser.o parser/parse_content.o parser/parse_cseq.o parser/parse_event.o parser/parse_expires.o parser/parse_fline.o parser/parse_from.o parser/parse_hname2.o parser/parse_hostport.o parser/parse_nameaddr.o parser/parse_param.o parser/parse_rr.o parser/parse_to.o parser/parse_uri.o parser/parse_via.o parser/parser_f.o parser/digest/digest.o parser/digest/digest_parser.o parser/digest/param_parser.o parser/contact/contact.o parser/contact/parse_contact.o db/db.o lex.yy.o cfg.tab.o -lfl -ldl -lresolv -L/usr/local/lib -lfl -lxnet -lpthread -lnsl -o ser
Undefined first referenced
symbol in file
sched_yield main.o
ld: fatal: Symbol referencing errors. No output written to ser
collect2: ld returned 1 exit status
make: *** [ser] Error 1
Do we really need librt.so? Which GNU package does that come from? Are there
anyone who successfully install ser 0.8.11 on Solaris?
Thanks very much.
Ziying Sherwin