pass_fd.c: added #include <sys/uio.h>
tcp_main.c: moved #include <sys/select.h> underneath #include
<sys/types.h.>
Still getting this:
$ gmake
Makefile.defs:331: Old gcc detected (2.9x), use gcc >= 3.1 for better
results
gcc -g -O9 -funroll-loops -Wcast-align -Wall -m486 -malign-loops=4
-DNAME='"ser"' -DVERSION='"0.8.11pre6-tcp5-tm"' -DARCH='"i386"'
-DOS='"freebsd"' -DCOMPILER='"gcc 2.95"' -D__CPU_i386
-DCFG_DIR='"/usr/local/etc/ser/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP
-DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DDNS_IP_HACK -DUSE_IPV6
-DVOICE_MAIL -D_TOTAG -DUSE_TCP -DFAST_LOCK -DHAVE_SOCKADDR_SA_LEN
-DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -c
tcp_main.c -o tcp_main.o
tcp_main.c: In function `tcp_send':
tcp_main.c:351: `MSG_NOSIGNAL' undeclared (first use in this function)
tcp_main.c:351: (Each undeclared identifier is reported only once
tcp_main.c:351: for each function it appears in.)
gmake: *** [tcp_main.o] Error 1
Cannot find proper #define for MSG_NOSIGNAL
The flags, according to "send()" man page is:
The flags parameter may include one or more of the following:
#define MSG_OOB 0x1 /* process out-of-band data */
#define MSG_PEEK 0x2 /* peek at incoming message */
#define MSG_DONTROUTE 0x4 /* bypass routing, use direct
interface */
#define MSG_EOR 0x8 /* data completes record */
#define MSG_EOF 0x100 /* data completes transaction */
The flag MSG_OOB is used to send ``out-of-band'' data on sockets
that
support this notion (e.g. SOCK_STREAM); the underlying protocol
must also
support ``out-of-band'' data. MSG_EOR is used to indicate a record
mark
for protocols which support the concept. MSG_EOF requests that the
sender side of a socket be shut down, and that an appropriate
indication
be sent at the end of the specified data; this flag is only
implemented
for SOCK_STREAM sockets in the PF_INET protocol family, and is used
to
implement Transaction TCP (see ttcp(4)). MSG_DONTROUTE is usually
used
only by diagnostic or routing programs.
---
Lenny Tropiano E-mail: lenny(a)voiping.com
Partner, Networking Specialist Pager: pager-lenny(a)voiping.com
VoIPing, LLC URL: http://www.voiping.com/
PO Box 867, Cedar Park, TX 78630-0867 Mobile: 512-698-VOIP [8647]
This is a protocol question, I don't know if it is directly related
to ser. Concerning the Via tags, should any proxy/gateway modify tags
that don't belong to it, or should they simply be copied verbatum?
For example, I have a situation where I send an INVITE message, and the
TRYING response I receive modifies one of the Via: tags. I don't think
this is right. Here are the two packets in question:
#
U 2003/02/19 18:36:20.276844 164.9.42.25:5060 -> 184.294.324.2:5060
INVITE sip:12143357976@184.294.324.2:5060 SIP/2.0.
Max-Forwards: 10.
Record-Route: <sip:12143357976@164.9.42.25;branch=0>.
From: <sip:8178863582@216.87.145.22> ;tag=d8579116-fdc-3e542303-23d34-4a84.
To: <sip:12143357976@augustvoice.net> ;user=phone.
Call-ID: 59fd88-d8579116-fdc-3e542303-23d2f-3897(a)216.87.145.22.
CSeq: 2 INVITE.
Via: SIP/2.0/UDP 164.9.42.25;branch=z9hG4bKcc26.d3c125d.0.
Via: SIP/2.0/UDP 216.87.145.22:4060 ;branch=z9hG4bK-3e542304-23dfc-ea2.
Contact: <sip:8178863582@216.87.145.22:4060>.
User-Agent: FXS_GW (sip1028a.bin).
Content-Type: application/SDP.
Content-Length:291.
P-hint: LD GATEWAY.
.
v=0.
o=FXS_GW 12367 0 IN IP4 216.87.145.22.
s=Audio Session.
i=Audio Session.
c=IN IP4 216.87.145.22.
t=0 0.
m=audio 16384 RTP/AVP 0 18 4 8 96.
a=fmtp:96 0-11.
a=rtpmap:0 PCMU/8000/1.
a=rtpmap:18 G729/8000/1.
a=rtpmap:4 G723/8000/1.
a=rtpmap:8 PCMA/8000/1.
a=rtpmap:96 telephone-event/8000.
And your response is:
#
U 2003/02/19 18:36:20.902858 184.294.324.2:5060 -> 164.9.42.25:5060
SIP/2.0 100 Trying .
Via: SIP/2.0/UDP 164.9.42.25;branch=z9hG4bKcc26.d3c125d.0.
Via: SIP/2.0/UDP 216.87.145.22:4060.
From: <sip:8178863582@216.87.145.22> ;tag=d8579116-fdc-3e542303-23d34-4a84.
To: <sip:12143357976@augustvoice.net> ;user=phone;tag=27DC1DCC-F61.
Date: Thu, 20 Feb 2003 00:36:20 GMT.
Call-ID: 59fd88-d8579116-fdc-3e542303-23d2f-3897(a)216.87.145.22.
Server: Cisco-SIPGateway/IOS-12.x.
CSeq: 2 INVITE.
Allow-Events: telephone-event.
Content-Length: 0.
.
See how the :
Via: SIP/2.0/UDP 216.87.145.22:4060 ;branch=z9hG4bK-3e542304-23dfc-ea2.
Has been changed to:
Via: SIP/2.0/UDP 216.87.145.22:4060.
Does anyone have any perl script to take a ngrep protocol dump
and print it out in a pretty way?
---greg
Greg Fausak
August.Net Services, LLC
Hi,
I would add a user to subsriber table by sql command in my application (not
using serctl script).
What text strings I must use to calculate HA1 (=phplib_id) and ha1b values
if USER_ID=ivan,PASSWORD=ivanpswd and REALM=192.168.11.237 ?
Thanks in advance.
Regards,
Ivan Vignola.
_________________________________________________________________
Vinci la nuova Nissan Micra con MSN Messenger! http://www.msn.it/messenger/
bet i missed reading something, again :-/
but wasting too much time on this..
i get on solaris 8 the following:
# echo $SIP_DOMAIN
myser.my.net
# echo $PW
heslo
# serctl add user1 hispw user1(a)my.net
usage: tail [+/-[n][lbc][f]] [file]
tail [+/-[n][l][r|f]] [file]
new user added
# serctl passwd user1 newpw
usage: tail [+/-[n][lbc][f]] [file]
tail [+/-[n][l][r|f]] [file]
non-existent user
of course the user has been added to the database...
anyone came accross that before?
tia
-k
Hi again,
Here is how to get a segfault:
<snip>
#Load modules required by a stateful User Agent Service
loadmodule "modules/tm.so"
#SER timer parameters
modparam("tm", "fr_inv_timer", "10");
modparam("tm", "fr_timer", "10");
</snip>
This happened after quoting the numbers in the modparam.
Tested with ser-0.8.10 on Linux RH 8.0
-- Sebastien
Hi all,
I finally found solutions to my problem:
1) It is easier when setting "fork=no" because then ser does not
daemonise and stderr is then attached to the terminal in which I started
ser
2) The configuration file should set a debugging level ("set debug=1"),
and use a number equal or lower to the debug level in the log, like
'log(0, "Hello World")'
So my HelloWorld.cfg is as follows:
<snip>
debug=0
log_stderror=yes
fork=no
route[0]
{
log(0, "Hello World!");
}
</snip>
And it works with "ser -f HelloWorld.cfg"
Cheers,
-- Sebastien
Hi all,
I am trying to implement a very simple call forwarding use case with
SER. This use case is directly taken from a book entitled "Internet
Applications with SIP".
Here are the actors:
- SIP caller, wants to call <alice@domain>
- Proxy server of <domain>
- SIP phone which is default terminal for <alice(a)domain.com>
- Voicemail server
Here is the scenario:
0) SIP caller INVITEs <alice@domain>
1) Proxy receives INVITE
2) Proxy forwards INVITE to alice default SIP phone
3) Proxy responses 100 TRYING to SIP caller
4) SIP phone responses 100 TRYING to proxy
5) SIP phone responses 180 RINGING to proxy
6) Proxy reponses 180 RINGING to caller
7) After timeout, proxy send CANCEL to default SIP phone
8) SIP phone responses OK to proxy...
...
X) Proxy forward original INVITE to voice mail server...
The fact is that the proxy first notifies the caller that it is trying
to locate alice, listens for "180 RINGING" and forward it to the caller,
then cancels on the SIP phone side because of a timeout -- then the
proxy forwards the INVITE to the voice mail.
I have tried some configurations, but I did not see how to listen for
the 180 RINGING and forward them to the caller... is there a way to bind
a "route" to a provisional response like:
route[0]
{
...
#In case a 180 occur, we execute route[1]
t_on_provisional("180", "1");
#But we're also waiting for an OK or a timer
#event to arrive
t_on_negative("2");
t_relay();
...
}
route[1]
{
#Forwards the 180 Ringing from the SIP phone to
#the caller
t_relay();
}
BTW, I was wondering if t_on_negative is a *blocking* action ?
TIA,
-- Sebastien