I need help constructing an if statement to check for a specific header field. If my proxy receives an INVITE I would like to check further into the message body for a connection address with a value of all zeros (0.0.0.0). Does anyone on this list know the syntax for performing this check?
Thanks,Steve
I'm using ubuntu 7.10 and install ser 0.9.7 and rtp, after the installation i test and it can call both users, when i try to restart the computer xten can not register anymore so i check the settings and its ok. but when i check the /var/run/ser.pid there is no file, also the /tmp/ser_fifo has no file so restart the ser using the /etc/ser restart or force-reload but still pid and fifo has no file. pls. help me to solve this problem....
Thank you..
Allan
Send instant messages to your online friends http://uk.messenger.yahoo.com
I'd like to think I'm not stupid, but I've been dealing with OpenSER for 2-3 years now and it still frustrates me just as much as it did the very first time I looked at it.
Can LCR do failover? I have this below. I can see that one of my gateways is selected, seemingly at random, and then when it doesn't reply (because I used a bogus IP), it doesn't time-out after 3s and go to the next gw. Is this possible? How do I do it?
Btw... can anyone recommend a book on OpenSER, since the documentation is so lacking?
modparam("tm", "fr_inv_timer_avp", "$avp(i:705)")
route{
$avp(i:705) = "3";
...
if (!lookup("location")) {
switch ($retcode) {
case -1:
case -3:
t_newtran();
sl_send_reply("100","Trying");
if (!load_gws()) {
sl_send_reply("500", "Internal server error, unable to load gateways");
exit;
}
if(!next_gw()){
sl_send_reply("503", "Service not available, no gateways found");
exit;
};
route(1);
}
}
route[1] {
if (is_method("INVITE")) {
t_on_branch("2");
t_on_reply("2");
t_on_failure("1");
}
if (!t_relay()) {
sl_reply_error();
};
exit;
}
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
I have a problem with SER 2.0.0-RC1 and rtpproxy that
needs some help.
I have a PSTN gateway config and a SER box all in a 10.x.x.x address
space. Directly connected to two interfaces on the connect to a
Cisco router, which performs 1:1 NAT conversion to provide
public Internet IPs to those interfaces, one for SIP and
one for RTP. (They are separate for bandwidth, debugging
and access-list reasons.)
Another two interfaces on the SER connect to the PSTN switch,
which has separate ports for SIP and RTP traffic.
Across the Internet or direct connections to the Cisco
router are from Asterisk boxes or similar devices that
proxy all SIP/RTP data from their SIP phones.
It looks like this:
Asterisk SIP SIP SIP
Server +-----+ +-+ +------+
66.1.2.3--internet--208.4.5.6|Cisco|----10.1.1.2|S|10.2.1.1--.2|PSTN |
| 1:1 | |E| |Switch|
208.4.5.7| NAT |----10.5.1.2|R|10.6.1.1--.2|TDM |
+-----+ +-+ +------+
RTP RTP RTP
208.4.5.6 is converted to 10.1.1.2 and vice versa
208.4.5.7 is converted to 10.5.1.2 and vice versa
(Cisco command)
ip nat inside source static 10.1.1.2 208.4.5.6
ip nat inside source static 10.5.1.2 208.4.5.7
rtpproxy is in use, and has 10.5.1.2(em5) (toward Cisco) and
10.6.1.1(em4) (toward PSTN switch).
SER listens on 10.1.1.2(em1) and 10.2.1.1(em0).
Ser.cfg takes care of the small amount of SIP-related tweaking
that must be done to make SIP work:
if (dst_ip==10.1.1.2) { #Received on em1
force_send_socket("10.2.1.1"); #emit on em0
rewritehost("10.2.1.2"); #Send to PSTN Switch
$gw_ip = "10.2.1.2"; #Send to PSTN Switch
When the INVITE message finally reaches the PSTN switch, it says:
U 2008/03/23 04:05:55.780069 10.2.1.1:5060 -> 10.2.1.2:5060
INVITE sip:4097679102@10.2.1.2 SIP/2.0.
Via: SIP/2.0/UDP 10.2.1.1;branch=z9hG4bK7572.3545b131.0.
Via: SIP/2.0/UDP 66.1.2.3:5060;branch=z9hG4bK39eee695;rport=5060.
From: "VOIP TEST 1000" <sip:4697271700@66.1.2.3>;tag=as571000e7.
To: <sip:4097679102@208.4.5.6>.
Contact: <sip:4697271700@66.1.2.3>.
Call-ID: 2bf456fe3016fd6b62a1649c7cb6cd75(a)66.1.2.3.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX.
Max-Forwards: 16.
Date: Sun, 23 Mar 2008 04:05:50 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Supported: replaces.
Content-Type: application/sdp.
Content-Length: 490.
.
v=0.
o=root 55522 55522 IN IP4 66.1.2.3.
s=session.
c=IN IP4 10.6.1.1.
t=0 0.
m=audio 35010 RTP/AVP 0 3 8 112 5 10 7 97 111 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:112 AAL2-G726-32/8000.
a=rtpmap:5 DVI4/8000.
a=rtpmap:10 L16/8000.
a=rtpmap:7 LPC/8000.
a=rtpmap:97 iLBC/8000.
a=fmtp:97 mode=30.
a=rtpmap:111 G726-32/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.
So the invite sent to the PSTN looks wonderful, correctly pointing
SIP and RTP back to the SER box.
The problem is on the Cisco side of the SER box, and shows up when the
183/200 messages are emitted by the SER. SER/rtpproxy rewrite the
c=IN IP4 line to point to 10.5.1.2, which would be fine except that
I need the public IP address 208.4.5.7 to appear in this position.
I have tried using force_rtp_proxy("flags","208.4.5.7") in the
reply_route section, and I know it is getting executed, but
nothing changes. I've tried a variety of flag combinations,
but obviously haven't tried all 720 combinations (although it feels
like I have).
I also tried fix_nated_sdp("2") by itself, with an empty
force_rtp_proxy() and a force_rtp_proxy("","208.4.5.7") and
all that did was create a "none of the above value" for c= of
10.6.1.110.5.1.2, pasting the two IP addresses together from
the rtpproxy command line, and ignoring the value right value
I'm trying to provide.
So, the question is: How do you say to SER "Here is the value
that should be used for c= on this call"? How do I set this?
For complex reasons eliminated here to make the example simple,
extending the public IP address over to the em5 interface
so it is public already is not practical. I need a fix that
changes the SDP c= value to one I will know based on whom the
distant asterisk server (or equivalent) device will be.
There may be other fields that also need fixing for RFC compliancy,
but c= being wrong is the current problem.
Thanks for suggestions.
/etc/odbc.ini:
[sqlite1]
Description = SQLite
Driver = SQLite
Database = /root/test.db
Timeout = 9000
Trace = Yes
TraceFile = /tmp/sqlite.log
/etc/odbcinst.ini:
[SQLite]
Description = SQLite ODBC Driver
Driver = /usr/local/lib/libsqlite3odbc.so
Setup = /usr/local/lib/libsqlite3odbc.so
openser.cfg:
modparam("avpops", "db_url", "unixodbc://localhost/sqlite1")
What's the correct format for specifying the DSN when using SQLite with ODBC?
SQLite doesn't use a user/password or host.
I tried the above, "unixodbc://localhost/sqlite1" and openser barfs with:
ERROR:unixodbc:new_connection: failed to connect
I also tried:
modparam("avpops", "db_url", "unixodbc://sqlite1")
and openser barfed with:
new_db_id: Error while parsing database URL: unixodbc://sqlite1
What's the correct format? Is it even supported in Openser 1.2.0?
Thanks,
Doug
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
I put this in openser.cfg:
modparam("avpops","avp_url","mysql://unixodbc:passwd@host/database")
When I start openser it complains and then EXITS.
ERROR:avpops_init: "AVP_DB" present but "AVP_TABLE" found empty
Why do I need to specify an avp_table? I plan to use avp_db_query() to retrieve values from another table. That's if using avp_db_query against an odbc source is even possible. People say it is, but given that it's not documented, I'm not sure.
Doug.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
I'm trying to use avpops with unixodbc.
What's the format of the avp_uri for unixodbc?
The documentation has:
modparam("avpops","avp_url","mysql://user:passwd@host/database")
What format do I use? Is it this? Is it something else?
modparam("avpops","avp_url","unixodbc://user:passwd@host/database")
Why isn't this documented?
Doug
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Hi Mates,
IM having my OpenSER in the university campus where all the communication
have to go through a http Proxy which always asks for user name and
password.
Where in the O'SER config file should i place these credentials (
http://user:pass@proxyname:port";)
Do i have to do the same in the Mediaproxy config file as well?
WBR,
LU.
Dear All
I am using Openser with TLS, the client connects successfully however
once I press the call button the connection to the client get's closed
"Actually the client stays open however I do check with netstat and the
connection is not there anymore".
As for the openser server
The following is noted in the logs
Mar 18 15:13:56 [1396] DBG:core:handle_ser_child: read response=
b613c8d8, 1, fd -1 from 5 (1378)
Mar 18 15:13:56 [1378] DBG:core:tcp_send: after receive_fd: c=
0xb613c8d8 n=4 fd=14
Mar 18 15:13:56 [1378] DBG:core:tcp_send: sending...
Mar 18 15:13:56 [1378] DBG:core:tls_update_fd: New fd is 14
Mar 18 15:13:56 [1378] DBG:core:tls_write: write was successful (580
bytes)
Mar 18 15:13:56 [1378] DBG:core:tcp_send: after write: c= 0xb613c8d8
n=580 fd=14
Mar 18 15:13:56 [1378] DBG:core:tcp_send: buf=
SIP/2.0 408 Request Timeout
Via: SIP/2.0/TLS
192.168.0.149:9071;rport=9071;branch=z9hG4bK30231106nh26;received=my.own
.public.ip
From: 9613041705 <sip:9613041705@server.ip>;tag=30231106
To: 9613041705
<sip:9613041705@server.ip>;tag=22c184cf1a1beaaaab06669b2c48f35d-e4d8
Call-ID: F96E5BE097AAtYP4(a)server.ip
CSeq: 2 REGISTER
Server: OpenSER (1.3.0-tls (i386/linux))
Content-Length: 0
Warning: 392 xx.yy.yy.yy:443 "Noisy feedback tells: pid=1378
req_src_ip=xx.xx.xx.xx req_src_port=9071 in_uri=sip:87.236.144.13
out_uri=sip:pstn.gw.ip.here:5060 via_cnt==0"
Mar 18 15:13:56 [1378] DBG:tm:relay_reply: sent buf=0x816aed8: SIP/2.0
4..., shmem=0xb614fb38: SIP/2.0 4
Mar 18 15:13:56 [1378] DBG:tm:final_response_handler: done
Mar 18 15:13:56 [1385] DBG:core:tls_update_fd: New fd is 20
Mar 18 15:13:56 [1385] DBG:core:_tls_read: connection closed cleanly
Mar 18 15:13:56 [1385] DBG:core:tcp_read_req: EOF
Mar 18 15:13:56 [1385] DBG:core:io_watch_del: io_watch_del (0x813d8c0,
20, -1, 0x10) fd_no=2 called
Mar 18 15:13:56 [1385] DBG:core:release_tcpconn: releasing con
0xb613c8d8, state -1, fd=20, id=12
Mar 18 15:13:56 [1385] DBG:core:release_tcpconn: extra_data 0xb614c9f0
Mar 18 15:13:56 [1396] DBG:core:handle_tcp_child: reader response=
b613c8d8, -1 from 0
Mar 18 15:13:56 [1396] DBG:core:tcpconn_destroy: destroying connection
0xb613c8d8, flags 0002
Mar 18 15:13:56 [1396] DBG:core:tls_close: closing SSL connection
Mar 18 15:13:56 [1396] DBG:core:tls_update_fd: New fd is 24
Mar 18 15:13:56 [1396] DBG:core:tls_shutdown: shutdown successful
Mar 18 15:13:56 [1396] DBG:core:tls_tcpconn_clean: entered
Mar 18 15:13:58 [1378] DBG:tm:utimer_routine: timer
routine:7,tl=0xb615f734 next=(nil), timeout=3056900000
Mar 18 15:14:01 [1378] DBG:tm:timer_routine: timer
routine:2,tl=0xb615f630 next=(nil), timeout=3060
Mar 18 15:14:01 [1378] DBG:tm:wait_handler: removing 0xb615f5e8 from
table
Mar 18 15:14:01 [1378] DBG:tm:delete_cell: delete transaction 0xb615f5e8
Mar 18 15:14:01 [1378] DBG:tm:wait_handler: done
Mar 18 15:14:41 [1378] DBG:presence:msg_watchers_clean: cleaning pending
subscriptions
Mar 18 15:14:41 [1378] DBG:core:db_free_rows: freeing 0 rows
Mar 18 15:14:41 [1378] DBG:presence:msg_presentity_clean: cleaning
expired presentity information
Mar 18 15:14:41 [1378] DBG:core:db_free_rows: freeing 0 rows
With Regards
Ali Jawad
System Administrator
Splendor Telecom (www.splendor.net)
Beirut, Lebanon
Phone: +961 1 373725
Fax: + 961 1 375554