Hi,
I've been looking at ser for a couple of days now and there some things I can't find in the documentation.
.1. Logging funktionality
I'm used to being able to log more detail than what I can get out ser. I'm problably missing something in the documentation, but what I want is something like the following
timestamp ser[pid] Incoming packet from ip:port [dump of packet (only the sip header/body)] timestamp ser[pid] Invite from [] to [] timestamp ser[pid] After rewrite: from [] to []
timestamp ser[pid] Relaying packet to [pstn-gw/other sip server] / timestamp ser[pid] Handling request for local user []
Can you send arguments to the log() function in the configuration file for example log(1,"Call from %s", uri:from); ??
.2. Rewrite rules
Is it possible to rewrite the from uri?
For example when I [sip:tomas@krixor.xy.org] want to call a pstn number I must rewrite the from address to [sip:myphonenumber@krixor.xy.org] before I send the request to the pstn gateway
And when a incoming call comes from the pstn gateway I want to rewrite the from address from [sip:number@ip-of-pstn-gateway] to {"PSTN Luser" sip:number@pstn-gw.mydomain.com]
I haven't looked at the source in the CVS yet, but I aim to do so soon, I saw in the list archive that you have lots of nice new features planned for the next release. ENUM support is one of the better ones :)
Anyway, looking forward to trying to help with the development of this software.
Best regards, Thomas Björklund
At 12:07 PM 2/18/2003, Tomas Björklund wrote:
.1. Logging funktionality
I'm used to being able to log more detail than what I can get out ser. I'm problably missing something in the documentation, but what I want is something like the following
We would like to have that too. We've been thinking of log("hello world: method=%m, src_ip=%s"). Unfortunately, it will not show up in the upcoming release, since we are simply too busy with making too many other changes. I would wish to have it in the overnext release.
.2. Rewrite rules
Is it possible to rewrite the from uri? For example when I [sip:tomas@krixor.xy.org] want to call a pstn number I must rewrite the from address to [sip:myphonenumber@krixor.xy.org] before I send the request to the pstn gateway
That is quite tricky -- it is close to protocol breaking. The From header field has been designed read-only in SIP. Nevertheless, this application has been already asked for. I wrote a short text on how to do that for those who wish to do so. http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/doc/tmemo/tmemo-jir...
I haven't looked at the source in the CVS yet, but I aim to do so soon, I saw in the list archive that you have lots of nice new features planned for the next release. ENUM support is one of the better ones :)
ENUM is on CVS, if you have courage to play with CVS code and problems occur we will be glad to help :-)
-Jiri
On Tue, 18 Feb 2003, Jiri Kuthan wrote:
At 12:07 PM 2/18/2003, Tomas Björklund wrote:
.1. Logging funktionality
I'm used to being able to log more detail than what I can get out ser. I'm problably missing something in the documentation, but what I want is something like the following
We would like to have that too. We've been thinking of log("hello world: method=%m, src_ip=%s"). Unfortunately, it will not show up in the upcoming release, since we are simply too busy with making too many other changes. I would wish to have it in the overnext release.
Maybe I can help, I'll take a look at the source over the weekend.
.2. Rewrite rules
Is it possible to rewrite the from uri? For example when I [sip:tomas@krixor.xy.org] want to call a pstn number I must rewrite the from address to [sip:myphonenumber@krixor.xy.org] before I send the request to the pstn gateway
That is quite tricky -- it is close to protocol breaking. The From header field has been designed read-only in SIP. Nevertheless, this application has been already asked for. I wrote a short text on how to do that for those who wish to do so. http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/doc/tmemo/tmemo-jir...
Great. I don't think that you should break the protol, but in this case it really doesn't matter cause I'm the only one receiving the request :)
I haven't looked at the source in the CVS yet, but I aim to do so soon, I saw in the list archive that you have lots of nice new features planned for the next release. ENUM support is one of the better ones :)
ENUM is on CVS, if you have courage to play with CVS code and problems occur we will be glad to help :-)
I tried to install the cvs version and first off it failed to compile due to pass_fd.c (support for TCP) so after disabling -DUSE_TCP in the makefile it compiled ok, but when I start it I get the following error:
krixor:/usr/local/ser/sbin# ./ser -P /var/run/ser.pid -E /usr/libexec/ld.so: Undefined symbol "_realm_column" in ser:/usr/local/ser/lib/ser/modules/auth.so
This is on a OpenBSD 3.1 with gcc version 2.95.3
Also, It's pretty annoying that 'gmake install' overwrites the configuration file all the time :)
Index: Makefile =================================================================== RCS file: /cvsroot/ser/sip_router/Makefile,v retrieving revision 1.98 diff -u -3 -r1.98 Makefile --- Makefile 2003/01/16 00:27:10 1.98 +++ Makefile 2003/02/18 20:20:55 @@ -158,8 +158,8 @@
install-cfg: $(cfg-prefix)/$(cfg-dir) sed -e "s#/usr/lib/ser/modules/#$(modules-target)#g" \ - < etc/ser.cfg > $(cfg-prefix)/$(cfg-dir)ser.cfg - chmod 644 $(cfg-prefix)/$(cfg-dir)ser.cfg + < etc/ser.cfg > $(cfg-prefix)/$(cfg-dir)default.cfg + chmod 644 $(cfg-prefix)/$(cfg-dir)default.cfg # $(INSTALL-CFG) etc/ser.cfg $(cfg-prefix)/$(cfg-dir)
/ Tomas
On Feb 18, 2003 at 21:33, Tomas Bj?rklund tomas@webservices.se wrote:
[...]
I tried to install the cvs version and first off it failed to compile due to pass_fd.c (support for TCP) so after disabling -DUSE_TCP in the makefile it compiled ok, but when I start it I get the following error:
Now the cvs version compiles on openbsd with -DUSE_TCP.
krixor:/usr/local/ser/sbin# ./ser -P /var/run/ser.pid -E /usr/libexec/ld.so: Undefined symbol "_realm_column" in ser:/usr/local/ser/lib/ser/modules/auth.so
This is on a OpenBSD 3.1 with gcc version 2.95.3
Also, It's pretty annoying that 'gmake install' overwrites the configuration file all the time :)
Index: Makefile
RCS file: /cvsroot/ser/sip_router/Makefile,v retrieving revision 1.98 diff -u -3 -r1.98 Makefile --- Makefile 2003/01/16 00:27:10 1.98 +++ Makefile 2003/02/18 20:20:55
Thanks for the patch. Maxim already included a fix for this in his patches (that were for a long time in my pending patch list :-)). The CVS version is patched.
Andrei
On Tue, 18 Feb 2003, Jiri Kuthan wrote:
At 12:07 PM 2/18/2003, Tomas Björklund wrote:
.2. Rewrite rules
Is it possible to rewrite the from uri? For example when I [sip:tomas@krixor.xy.org] want to call a pstn number I must rewrite the from address to [sip:myphonenumber@krixor.xy.org] before I send the request to the pstn gateway
That is quite tricky -- it is close to protocol breaking. The From header field has been designed read-only in SIP. Nevertheless, this application has been already asked for. I wrote a short text on how to do that for those who wish to do so. http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/doc/tmemo/tmemo-jir...
I'm beginning to see why this is a pain to do :)
Got it working 'kinda', the problem is not to change the From: adress but to actually change it back when sending messages to the originating UA.
Do you have any example configuration for SER to do this? It looks like you've done som testing in the area ? This is a feature many people (anyone with a pstn-gateway) could use.
Something like a './serctl enum add phonenumber sip-user[@domain.com]' that gets added to the sql database would be nice.
And a flag(X) to trigger the translation if the invite is coming from/going to the pstn gateway.
/ Tomas
Hello Tomas,
At 10:35 PM 2/18/2003, Tomas Björklund wrote: [...]
I'm beginning to see why this is a pain to do :)
Got it working 'kinda', the problem is not to change the From: adress but to actually change it back when sending messages to the originating UA.
From in requests would have to be rewritten, From in replies for these requests too, To in subsequent requests (and associated replies) from the other party too.
Do you have any example configuration for SER to do this? It looks like you've done som testing in the area ? This is a feature many people (anyone with a pstn-gateway) could use.
Unfortunately not -- that is a piece of work which would have to be implemented. We can provide guidance but have currently no cycles to do it ourselves. It is actually not such a big deal but all of us are now burdened with the upcoming ser release.
Something like a './serctl enum add phonenumber sip-user[@domain.com]' that gets added to the sql database would be nice.
Getting the aliases in the database is trivial part. Transaction rewriting is the major piece of work.
-Jiri