Hello,
avpops module has a new function which allow to execute raw SQL queries
and store the result in AVPs.
avp_db_query(query, dest);
The query given as parameter can contain pseudo-variables. Using this
function you can benefit of full database system features, being able to
do joins, unions, etc. Old db-related functions are in place since they
are faster for their usage case.
The documentation of the of avpops module was updated and posted at:
http://openser.org/docs/modules/1.1.x/avpops.html
A small example of usage: limit the number of calls done in the last day:
if(is_method("INVITE") && !has_totag())
{
if(avp_db_query("select count(*) from acc where username='$fU' and
domain='$fd' and method='INVITE' and timestamp>=$Ts-24*3600",
"$avp(i:234)"))
{
if(avp_chech("$avp(i:234)", "ge/i:10"))
{
sl_send_reply("403", "too many calls in the last day");
exit();
}
}
}
Cheers,
Daniel
Hi everyboy,
I have a problem when my SER 0.9.4 has to connect to a carrier thru tcp
transport.
I'm working in stateful mode, of course, and I use
t_relay_to_tcp(ipcarrier,port) when I can detect that the carrier GW wants
to speak with SER thru TCP.
It works not very well as there is the following errors when the carrier GW
send a 200 OK to SER after the INVITE procedure :
tcp_blocking_connect : timeout(10)
tcpconn_connect : connect failed
tcp_send: connect failed
tcp_send failed
msg_send : tcp_send failed
t_forward_nonack : sending request failed
The UAS which sent the INVITE receive a 477 : next hop error
Is it a timeout problem ?
If so, how to resolve it? How to increase this timeout for TCP?
Thanks a lot
Christian
Hi,
How to disable sending Contact HF in OK send to a successful (i.e.
authenticated) REGISTER request?
Just use remove_hf() from textops or there is other option?
I've got stupid UA that behaves badly when working behind NAT. First it
sends REGISTER without anything (no Contact, Expires). On successful
authentication SER responds 200 OK with Contact HF, set to public IP,
exactly how SER sees UA behind NAT (like some_IP:61001).
Then the stupid UA sends another REGISTER message, this time with
Contact and Via HF set to this public value (i.e. some_IP:61001).
It spoils my nathelper/rtpproxy detection of devices behind NAT.
Of course I can enable it by regexp on User-Agent HF, but his is not an
option, as plenty of those UAs runs not behind NAT.
--
Regards,
Arek Bekiersz
Hi,
i installed openser (1.0 stable) and sems (0.9 stable). I recive
"ERROR:tm:write_to_fifo: writev failed: Cannot allocate memory" error
when openser send request to sems voice mail. Is it compile error or do
you have any solution for this.
regards
openser voicemail seciton;
--------------------------
# switch to stateful mode:
if (!t_newtran()){
sl_send_reply("500","could not create transaction");
return;
};
# prevent timeout on the other side:
t_reply("100","Trying - just wait a minute !");
# actively absorb ACKs
if (method == "ACK") {
t_relay();
return;
}
if (method=="INVITE"){
# no service number, redirect to voicemail.
# do not forget to load AVPs so that voicemail gets the
# callee's email address.
avp_db_load("$ruri","i:34/$email_scheme");
if(!t_write_req("/tmp/am_fifo","voicemail/vm_email")) {
t_reply("500","error contacting sems");
};
return;
}
else if (method=="BYE" || method=="CANCEL") {
# Sems should already know which plug-in is handling that
# call. "bye" is no plug-in name. It is a reserved name
which
# tells Sems to terminate the call.
if(!t_write_req("/tmp/am_fifo","bye")) {
t_reply("500","error contacting sems");
};
};
openser log;
------------
Feb 23 17:18:17 voip /usr/sbin/openser[28398]: ERROR:tm:write_to_fifo:
writev failed: Cannot allocate memory
Feb 23 17:18:17 voip /usr/sbin/openser[28398]: ERROR:tm:t_write_req:
write_to_fifo failed
Feb 23 17:18:17 voip /usr/sbin/openser[28396]: Warning: sl_send_reply: I
won't send a reply for ACK!!
Feb 23 17:18:18 voip /usr/sbin/openser[28392]: Warning: sl_send_reply: I
won't send a reply for ACK!!
Feb 23 17:18:20 voip /usr/sbin/openser[28396]: Warning: sl_send_reply: I
won't send a reply for ACK!!
Feb 23 17:18:24 voip /usr/sbin/openser[28398]: Warning: sl_send_reply: I
won't send a reply for ACK!!
Feb 23 17:18:28 voip /usr/sbin/openser[28394]: Warning: sl_send_reply: I
won't send a reply for ACK!!
Feb 23 17:18:32 voip /usr/sbin/openser[28398]: Warning: sl_send_reply: I
won't send a reply for ACK!!
Feb 23 17:18:36 voip /usr/sbin/openser[28394]: Warning: sl_send_reply: I
won't send a reply for ACK!!
Feb 23 17:18:40 voip /usr/sbin/openser[28398]: Warning: sl_send_reply: I
won't send a reply for ACK!!
Feb 23 17:18:44 voip /usr/sbin/openser[28394]: Warning: sl_send_reply: I
won't send a reply for ACK!!
sems log;
------------
Feb 23 17:19:45 voip Sems[28477]: Error: (AmUtils.cpp)(str2i)(147):
str2i: unexpected char s in ser
Feb 23 17:19:45 voip Sems[28477]: Error: (AmUtils.cpp)(str2i)(147):
str2i: unexpected char s in ser
Feb 23 17:19:45 voip Sems[28480]: Debug: (sems.cpp)(main)(386): Loading
application plug-ins
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/apps/announcement.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAppPlugIn)(281): application 'announcement' loaded.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(SemsConfiguration.cpp)(reloadModuleConfig)(70): using inline
configuration for module announcement
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/apps/bot.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAppPlugIn)(281): application 'bot' loaded.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmServer.cpp)(registerFct)(401): AmUnServer::registerFct: function
'bot_start' has been registered.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmServer.cpp)(registerFct)(208): AmFifoServer::registerFct: function
'bot_start' has been registered.
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/apps/conference.so ...
Feb 23 17:19:45 voip Sems[28482]: Debug: (AmThread.cpp)(_start)(63):
Thread 28482 is starting.
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmThread.cpp)(start)(85):
Thread 28482 is just created.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAppPlugIn)(281): application 'conference' loaded.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(SemsConfiguration.cpp)(reloadModuleConfig)(70): using inline
configuration for module conference
Feb 23 17:19:45 voip Sems[28480]: Warning: (Conference.cpp)(onLoad)(77):
no join_sound specified in configuration
Feb 23 17:19:45 voip Sems[28480]: Warning: (Conference.cpp)(onLoad)(78):
file for module conference.
Feb 23 17:19:45 voip Sems[28480]: Warning: (Conference.cpp)(onLoad)(84):
no drop_sound specified in configuration
Feb 23 17:19:45 voip Sems[28480]: Warning: (Conference.cpp)(onLoad)(85):
file for module conference.
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/apps/echo.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAppPlugIn)(281): application 'echo' loaded.
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/apps/isdngw.so ...
Feb 23 17:19:45 voip Sems[28480]: Info:
(IsdnConfiguration.cpp)(reload)(91): isdngw version 0.2 loading
(supported backends: isdn4linux) ...
Feb 23 17:19:45 voip Sems[28480]: Warning:
(SemsConfiguration.cpp)(reloadModuleConfig)(66): no configuration found
for module isdngw, maybe you want to specify config.isdngw in config file.
Feb 23 17:19:45 voip Sems[28480]: Info:
(IsdnGatewayFactory.cpp)(IsdnGatewayFactory)(81): isdngw: isdn4linux
support disabled in configuration
Feb 23 17:19:45 voip Sems[28480]: Info:
(IsdnGatewayFactory.cpp)(IsdnGatewayFactory)(148): isdngw initialization
successful.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAppPlugIn)(281): application 'isdngw' loaded.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(IsdnGatewayFactory.cpp)(onLoad)(199): registering fifo function
isdninfo for web access...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmServer.cpp)(registerFct)(208): AmFifoServer::registerFct: function
'isdninfo' has been registered.
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/apps/number_reader.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAppPlugIn)(281): application 'number_reader' loaded.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(SemsConfiguration.cpp)(reloadModuleConfig)(70): using inline
configuration for module number_reader
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/apps/voicemail.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAppPlugIn)(281): application 'voicemail' loaded.
Feb 23 17:19:45 voip Sems[28480]: Debug:
(SemsConfiguration.cpp)(reloadModuleConfig)(70): using inline
configuration for module voicemail
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AnswerMachine.cpp)(loadEmailTemplates)(103): loading
/etc/sems//default.template ...
Feb 23 17:19:45 voip Sems[28480]: Debug: (sems.cpp)(main)(390): Loading
audio plug-ins
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/audio/gsm.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(218): codec id 3 inserted
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(233): payload 'GSM'inserted with id 3
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/audio/ilbc.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(218): codec id 4 inserted
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(237): payload 'iLBC'inserted with id 96
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(257): file format iLBC inserted
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/audio/speex.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(218): codec id 6 inserted
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(237): payload 'speex'inserted with id 96
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmPlugIn.cpp)(load)(87):
loading /usr/lib/sems/plug-in/audio/wav.so ...
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(218): codec id 1 inserted
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(218): codec id 2 inserted
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(233): payload 'PCMU'inserted with id 0
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(233): payload 'PCMA'inserted with id 8
Feb 23 17:19:45 voip Sems[28480]: Debug:
(AmPlugIn.cpp)(loadAudioPlugIn)(257): file format Wav inserted
Feb 23 17:19:45 voip Sems[28480]: Debug: (sems.cpp)(main)(394): Starting
session container
Feb 23 17:19:45 voip Sems[28486]: Debug: (AmThread.cpp)(_start)(63):
Thread 28486 is starting.
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmThread.cpp)(start)(85):
Thread 28486 is just created.
Feb 23 17:19:45 voip Sems[28480]: Debug: (sems.cpp)(main)(397): Starting
mailer
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmThread.cpp)(start)(85):
Thread 0 is just created.
Feb 23 17:19:45 voip Sems[28480]: Debug: (sems.cpp)(main)(400): Starting
RTP scheduler
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmThread.cpp)(start)(85):
Thread 0 is just created.
Feb 23 17:19:45 voip Sems[28480]: Debug: (sems.cpp)(main)(403): Starting
ICMP watcher
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmThread.cpp)(start)(85):
Thread 0 is just created.
Feb 23 17:19:45 voip Sems[28480]: Debug: (AmThread.cpp)(start)(85):
Thread 0 is just created.
Feb 23 17:19:45 voip Sems[28480]: Info: (AmServer.cpp)(run)(147): FIFO
server started
Feb 23 17:19:45 voip Sems[28487]: Debug: (AmThread.cpp)(_start)(63):
Thread 28487 is starting.
Feb 23 17:19:45 voip Sems[28488]: Debug: (AmThread.cpp)(_start)(63):
Thread 28488 is starting.
Feb 23 17:19:45 voip Sems[28489]: Debug: (AmThread.cpp)(_start)(63):
Thread 28489 is starting.
Feb 23 17:19:45 voip Sems[28489]: Error: (AmIcmpWatcher.cpp)(run)(47):
ICMP Watcher: could not create RAW socket: Operation not permitted
Feb 23 17:19:45 voip Sems[28489]: Error: (AmIcmpWatcher.cpp)(run)(48):
ICMP Watcher: try to run SEMS as root or suid.
Feb 23 17:19:45 voip Sems[28489]: Debug: (AmThread.cpp)(_start)(68):
Thread 28489 is ending.
Feb 23 17:19:45 voip Sems[28490]: Debug: (AmThread.cpp)(_start)(63):
Thread 28490 is starting.
Feb 23 17:19:45 voip Sems[28490]: Info: (AmServer.cpp)(run)(321): Unix
socket server started
Hi,
As my current work may be interesting
for the rest, I wonder if you will find those new features useful.
Every opinion is appreciated.
Some time ago I commited a small 'ldap' module, all-in-one.
As there was some (small :-) ) feedback from people using this module, I
propose to split it into following modules:
1) auth_ldap: set of authentication routines, working with standard or
user-defined Ldap schemas
2) group_ldap: group membership module based on Ldap backend
3) uri_ldap: uri mangling module, based on ldap backend
4) avp_ldap: (new) module for operating on AV-pairs from Ldap, working
with both user-defined or standard dbase schemas
Later, it is possible to write small SER 'soap' modules, using one of
freely available C/C++ soap libraries. Those modules will perform
various tasks:
5) soap_ipdr: module for reporting service usage information (billing)
in XML, to be used by external billing systems. Information will include
all call attempts (also failed ones like CC,CAD,UCN,UCI and possibly CID
completion codes from IPDR's VoIP service definition). It will return
following XML documents (using SOAP as transport):
* IPDRDoc - usage for specific user (user@domain)
* IPDRSettlementDoc - usage for domain
NOTE: that using IPDRSettlementDoc for domain is based on model where
our cooperants have one virtual SIP domain. it is then easiest way to
make settlement using IPDRSettlementDoc for one domain.
6) soap_parlayx: Such module would act as a gateway between SER and
external Parlay X Web Services software. When called, this module will
analyze SIP request and forward it to external Parlay X software. That
software will fulfill request and return ReturnValue, with specific
Action. Then SER soap_parlayx module will perform desired action on SIP
request.
More on Parlay X Web services v.2.0 can be found at:
http://www.parlay.org/en/specifications/
NOTE: This behaviour mimics a hypothetic SIP-CGI gateway, but this time
it is a SIP-SOAP gateway.
EXAMPLE: could be the HandleBusy operation from "Part 3: Call
Notification" of Parlay X Web services:
1. SIP encounters "486 Busy" situation
2. SER Script writer calls parlayx_handle(HandleBusy) function from
soap_parlayx module
3. soap_parlayx module calls external software, sending
handleBusyRequest, containing CallingParty, CalledParty
4. external software returns handleBusyResponse with Action structure,
containing ActionToPerform (like 'route' on not route), RoutingAddress,
Charging (charge for using of service)
5. SER soap_parlayx module modifies SIP request and forwards it to
voicemail_SIP location. In addition it stores relevant info in IPDR data
recorder for later use.
External Parlay X software will be basically a SOAP engine, it can be
written in any language. Unlike a soap_parlayx module itself, that
engine will not be a part of SER.
7) SIP SOAP initiative
Seems that IP world is slowly evolving in direction of service
enabled architecture, usually based on SOAP/UDDI standards. For this
reason maybe it is worth to initiate work on SIP SOAP draft standard?
It would basically mimic existing IETF SIP CGI draft standard, but with
far greater opportunities for creating new services, that SOAP standard
brings.
It will beautifuly fulfil current work in progress in my company and an
European project, codename VISP (Virtual Internet Service Provider),
that we are coordinator of. Project is focusing on enabling smooth
company-to-company interoperability in mutual creation of new services
in fast changing IP world. Including VoIP. More information can be found
on Web site:
http://www.visp-project.org/
--
Regards,
Arek Bekiersz
Why can't I do this??? Arrgh! I want to be able to call onreply_route[35] when we get a reply. So, not surprisingly, in onreply_route[35] I want to see what sort of reply I got, and then send ANOTHER reply back to the originater of the message telling them something was wrong. Why can't I use t_reply in a reply_route? What's the most likely away around this, because I sure must be missing something fundamental.
route[10] {
t_on_failure("11");
t_on_reply("35");
rewritehostport("pbx1-mgt0.ipt.oneeighty.com:5060");
if ( !t_relay() ) {
xlog ("L_INFO","t_relay() returned error");
} else {
xlog ("L_INFO","t_relay() returned ok");
}
}
onreply_route[35] {
xlog ("L_INFO","Got some sort of reply");
if (t_check_status("603")) {
xlog ("L_INFO","got a decline");
t_reply("603","Declined");
}
return;
}
How can I check for SIP responses, say 'Decline' for example? Do I have to use t_check_status()? I tried but I think it wants me to create a transaction first, and seeing as though the OpenSER docs are so bad, I don't know how to do this. Is there a stateless way to check for a SIP response?
In general, it seems as though you can't check SIP response messages. There's the 'if method = <something>' approach, say for example 'if method == INVITE', but I have not seen any examples of how you can check for SIP response messages just as easy in a stateless fashion. Say, something like 'if response == DECLINE' or 'if response == 'Not Found'. How can this be done???
Thanks,
Doug.
Helo!
I find a list, where the same problem occured with EDH-RSA-DES-CBC-SHA cipher...
http://marc.theaimsgroup.com/?l=openssl-users&m=109844857431850&w=2
The offered solution is the following:
"You need to include a call to SSL_CTX_set_tmp_dh() which the DH parameters
too."
How can I include the above?
Thans:
Tóth Péter
Hi,
I just returned from FOSDEM, held today at ULB Free University, Brussels.
It was a great event, helping to encourage growth of free software.
You could see many designers and developers working to make Open Source better.
I must say I "recharged my batteries", raising my spirit a little.
I joined SER presentation by Jan Janak, held at 14:00 at "Chavanne" room, building "U".
Jan's appearance was recepted very warmly by audience.
Presentation was professional and it fitted well in schedule, still leaving a lot of time for questions from the public.
I must say that new SER logo (the big "S") looked very good on the big screen, during presentation.
Jan presented origins of SER project, overview of architecture and functionality and also few typical SER installation scenarios. For those knowing less about SER or willing to learn it was a best primer. He also presented answers for frequent questions like "what SER is and what is not" and what can be done to get additional functionalities.
There is a photograph attached to this letter. It's was taken with 3G phone but you can still see Jan on the right, with one of his slides.
:-)
After SER there was Asterisk presentation and workshop, held by Mark Spencer and his colleagues.
He's a great developer too and in addition he revealed his showman skills, adding many jokes for the audience to laugh at. I was particularly disarmed by funny voice prompts with Asterisk's IVR voice of Alice, although one could found some them a little abrupt :-)
--
Regards,
Arek Bekiersz
mailto:arek@perceval.net