[OpenSIPS-Devel] DRouting module crashes
Hi List, My OpenSIPS crashes in drouting module with the logs bellow, could someone give me a hint ? The config file is quite simple with a call to do_routing(1); Best regards, Brian Logs: Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: uri params:transport=, val=, proto=0 Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: user-param=, val= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: method=, val= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri:ttl=, val= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: maddr=, val= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri:lr= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:drouting:do_routing: using dr group 1 Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: parsed uri: type=3 user=01(10) passwd=(0) host=x.x.x.x(14) port =(0): 0 params=user=phone(10) headers=(0) Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: uri params:transport=, val=, proto=0 Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: user-param=user=phone, val=phone Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: method=, val= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri:ttl=, val= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri: maddr=, val= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:core:parse_uri:lr= Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:drouting:do_routing: no matching for prefix 01 Jul 19 12:04:29 dns1 ./sbin/opensips[11071]: DBG:drouting:internal_check_rt: found rgid 1 (rule list 0x4073a500) Jul 19 12:04:29 dns1 ./sbin/opensips[11081]: DBG:core:io_wait_loop_sigio_rt: siginfo: signal=35 (35), si_code=6, si_band=0x18, si_fd=9 Jul 19 12:04:29 dns1 ./sbin/opensips[11081]: CRITICAL:core:receive_fd: EOF on 9 Jul 19 12:04:29 dns1 ./sbin/opensips[11081]: DBG:core:handle_ser_child: dead child 4, pid 11071 (shutting down?) Jul 19 12:04:29 dns1 ./sbin/opensips[11081]: DBG:core:io_watch_del: io_watch_del (0x81559c0, 9, -1, 0x0) fd_no=15 called Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: INFO:core:handle_sigs: child process 11071 exited by a signal 11 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: INFO:core:handle_sigs: core was generated Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: INFO:core:handle_sigs: terminating due to SIGCHLD Jul 19 12:04:29 dns1 ./sbin/opensips[11068]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11069]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11070]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11072]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11073]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11074]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11075]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11076]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11077]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11078]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11081]: INFO:core:sig_usr: signal 15 received Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:dialplan:destroy_rule: destroying rule with priority 0 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:dialplan:destroy_rule: destroying rule with priority 0 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:dialplan:destroy_rule: destroying rule with priority 0 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:dialplan:destroy_rule: destroying rule with priority 0 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:dialplan:destroy_rule: destroying rule with priority 0 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:dialplan:destroy_rule: destroying rule with priority 0 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:dialplan:destroy_rule: destroying rule with priority 0 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:dialplan:destroy_rule: destroying rule with priority 0 Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:core:pool_remove: connection still kept in the pool Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:core:pool_remove: removing connection from the pool Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:xlog:destroy: destroy module... Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:tm:tm_shutdown: tm_shutdown : start Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:tm:unlink_timer_lists: emptying DELETE list Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:tm:tm_shutdown: emptying hash table Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:tm:tm_shutdown: releasing timers Jul 19 12:04:29 dns1 ./sbin/opensips[11067]: DBG:tm:tm_shutdown: removing semaphores Jul 19 12:04:29 dns1
[OpenSIPS-Devel] new CDRTool release 8.0.0
Changelog: cdrtool (8.0.0) unstable; urgency=low [ Rating Engine ] * Fixed deblocking of users blocked by quota system * Apply the database changes from setup/mysql/alter_tables.mysql * Added support to debit balance for SMS * Separate calculate functions for Audio and SMS * Added import function for billing discounts * Added discounts per customer per destination * Added increment and min_duration per customer * Added daily_quota per data source setting and check quota usage based on it * Enlarged the login column in log table * Set daily_quota for new installations to 10% * Init the quota usage for today to 0 after quota reset * Improve syslog message for maxsessiontime * Use Subscriber instead of Account in rating tables display for consistency * Added discounts to the list of csv files to import * Rename profile name variables to match weekday and weekend * Added storage for daily quota * Log to syslog the result of maxsessiontime even if call is unlimited * Use sms or audio rate calculation depending on CDR type during normalization [ NGNPro Client ] * Hide Prepaid Card form for embedded clients * Define groups for enrollment of sip account in configuration * Use sender email when asking for cc payments [ WEB Output ] * Trim RPID for whitespaces * Renamed applicationType to application and fixed display of streams information * Improved look and feel of main menu * Fixed broken main css * Added MediaInfo selection box and beautify code a bit * Fixed display of gateways in delete rules screen * Improved documentation * Improved display of media trace stream sequence * Refactor rating engine to use Region to group destinations * Update Blink logo The software can be downloaded as a tar archive from: http://download.ag-projects.com/CDRTool/ For those running Debian unstable there is an official public repository. To use it, add these lines in /etc/apt/sources.list # AG Projects software deb http://ag-projects.com/debian unstable main deb-src http://ag-projects.com/debian unstable main Install the AG Projects debian software signing key: wget http://download.ag-projects.com/agp-debian-gpg.key apt-key add agp-debian-gpg.key After that, run: sudo apt-get update sudo apt-get install cdrtool Regards, Adrian ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] SF.net SVN: opensips:[7033] trunk/modules/b2b_entities
Revision: 7033 http://opensips.svn.sourceforge.net/opensips/?rev=7033view=rev Author: anca_vamanu Date: 2010-07-19 14:04:46 + (Mon, 19 Jul 2010) Log Message: --- - added the possibility to specify To and From display names when starting a new dialog from the server and the possiblity to specify a RURI different from To uri Modified Paths: -- trunk/modules/b2b_entities/client.c trunk/modules/b2b_entities/dlg.c trunk/modules/b2b_entities/dlg.h trunk/modules/b2b_entities/server.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] SF.net SVN: opensips:[7034] trunk/modules/b2b_entities/client.c
Revision: 7034 http://opensips.svn.sourceforge.net/opensips/?rev=7034view=rev Author: anca_vamanu Date: 2010-07-19 14:44:30 + (Mon, 19 Jul 2010) Log Message: --- - fixed wrong check Modified Paths: -- trunk/modules/b2b_entities/client.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] SF.net SVN: opensips:[7035] branches/1.6/modules/b2b_entities
Revision: 7035 http://opensips.svn.sourceforge.net/opensips/?rev=7035view=rev Author: anca_vamanu Date: 2010-07-19 14:49:17 + (Mon, 19 Jul 2010) Log Message: --- - - added the possibility to specify To and From display names when starting a new dialog from the server and the possiblity to specify a RURI different from To uri Modified Paths: -- branches/1.6/modules/b2b_entities/client.c branches/1.6/modules/b2b_entities/dlg.c branches/1.6/modules/b2b_entities/dlg.h branches/1.6/modules/b2b_entities/server.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
[OpenSIPS-Devel] Adding Display Name to From Field
Hello, I'm an undergrad working on a research project. This project involved the modification of several header fields depending on various factors. At this point, I've been able to remove the supplied display name and replace it with unverified. But, I'm stuck on how to add a display name to the from header when the UAC does not supply one. My code closely follows the work done in the uac module already in opensips. It works perfectly when a display name is present but when it is not present it adds garbage to the display field. For instance, wireshark shows my from field to be From: unverified .. .1..*d..*d1.0.1... ..ff1...25f @Q..|..1..11...sip:j...@mydomain ;tag=f04dda0088604f4892aed058306835e5 I'm fairly certain that I may not be setting my anchor point correctly since I'm not quite sure how the offset is calculated. 1. When a field is to be modified *[for instance the display field in the from header in the get_display_anchor function below]*, Why is the anchor set at an (address - msg-buf)? In the case of get_display_anchor, it uses the pointer to the first char () in the uri minus the msg-buf. Also, please note that QjSimple does not send the usually *sip:j...@mydomain*but sends *j...@mydomain*. When I looked in msg_parser.c, it says that the msg-buf variable is a scratch variable. So the only thing I can assume is that the pointer to first char is not pointing at the real header field in memory but is pointing a scratch address within the msg-buf so if you substract the size of msg-buf it will point to the real variable address. 2. When using the lump_struct to add, remove or insert headers, when is that operation executed? Thank you for all your help. John Please see the function get_display_anchor from uac_replace.c below: static struct lump* get_display_anchor(struct sip_msg *msg, struct hdr_field *hdr, struct to_body *body, str *dsp) { LM_INFO(Entering.); LM_INFO(Header Field=%.*s\n, hdr-body.len, hdr-body.s); LM_INFO(Body=%.*s\n, body-display.len, body-display.s); LM_INFO(DSP=%.*s\n, dsp-len, dsp-s); struct lump* l; char *p1; char *p2; /* is URI quoted or not? */ p1 = hdr-name.s + hdr-name.len; for( p2=body-uri.s-1 ; p2=p1 *p2!='' ; p2--); if (*p2=='') { LM_INFO(Is quoted ); l = anchor_lump( msg,* p2 - msg-buf*, 0, 0); // why p2 - msg-buff ?? if (l==0) { LM_ERR(unable to build lump anchor\n); return 0; } dsp-s[dsp-len++] = ' '; return l; } /* not quoted - more complicatedmust place the closing bracket */ l = anchor_lump( msg, (body-uri.s+body-uri.len) - msg-buf, 0, 0); if (l==0) { LM_ERR(unable to build lump anchor\n); return 0; } p1 = (char*)pkg_malloc(1); if (p1==0) { LM_ERR(no more pkg mem \n); return 0; } *p1 = ''; if (insert_new_lump_after( l, p1, 1, 0)==0) { LM_ERR(insert lump failed\n); pkg_free(p1); return 0; } /* build anchor for display */ l = anchor_lump( msg, body-uri.s - msg-buf, 0, 0); if (l==0) { LM_ERR(unable to build lump anchor\n); return 0; } dsp-s[dsp-len++] = ' '; dsp-s[dsp-len++] = ''; LM_INFO(Header Field=%.*s\n, hdr-body.len, hdr-body.s); LM_INFO(Body=%.*s\n, body-display.len, body-display.s); LM_INFO(DSP=%.*s\n, dsp-len, dsp-s); return l; } Please see my code below: static int new_func(struct sip_msg* _msg, char* notUsed1, char* notUsed2) { LM_INFO(Entering...); struct to_body *body; // [defined: parse_to.h] struct lump *l;// [defined: lump_struct.h] struct hdr_field *hdr;// [defined: hf.h] str d; str *display = d;// new display name 'unverified' str buf; str_copy(display,\unverified\, strlen(\unverified\)); if(parse_from_header(_msg) parse_headers(_msg, HDR_EOH_T, 0)) // Make sure the from field has been parsed { LM_ERR(Error Parsing Headers); return -1; } hdr = _msg-from;// Assign the address of the parsed header field to hdr body = (struct to_body*)hdr-parsed; // Get the parsed data from the header field // and cast it into a struct to_body l=0; if(body-display.len)// Check if there is a display name { LM_INFO(Removing display [%.*s]\n, body-display.len, body-display.s); l = del_lump(_msg, body-display.s-_msg-buf, body-display.len,0); // [defined: data_lump.c] buf.s = pkg_malloc(display-len + 2); memcpy(buf.s, display-s, display-len); buf.len = display-len; LM_INFO( Anchor Start ---); l = get_display_anchor(_msg, hdr, body, buf); LM_INFO(
[OpenSIPS-Devel] very minor bug in opensips tm fwd
Hi, I believe there is a minor bug in opensips HEAD in the tm module t_fwd.c. The function update_uac_dst sets ser_error to one of two options: E_OUT_OF_MEM or E_NO_SOCKET. This is overwritten by add_uac. The simple one line fix is: --- a/modules/tm/t_fwd.c +++ b/modules/tm/t_fwd.c @@ -430,7 +430,7 @@ static int add_uac( struct cell *t, struct sip_msg *request, str *uri, t-uac[branch].request.dst.proto = proxy-proto; if ( update_uac_dst( request, t-uac[branch] )!=0) { - ret = E_OUT_OF_MEM; + ret = ser_error; goto error02; } A more elaborate fix might be to not set ser_error at all in update_uac_dst and just return the error code. Note that this error condition occurs when a REGISTER Path header has bogus (unreachable) URI. Unfortunately this is all too easy to do, and having a useful error message is helpful. Regards, Kennard___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Re: [OpenSIPS-Devel] how to use the db_http module
hi I have written a APACHE module as the webserver,and the opensips Successful Start,but i do not know how to use the opensips, the opensips How to work with apache module Also this topic might help: http://lists.opensips.org/pipermail/users/2010-May/012786.html Andrei Dragus wrote: See this topic : http://lists.opensips.org/pipermail/users/2010-May/012732.html And the documentation: http://www.opensips.org/html/docs/modules/devel/db_http.html Your problem is that the server returns an error code (404) for the request. Use wireshark or ngrep to see what the request looks like and make sure the server can reply to this kind of requests. Also try to use the user list for this kind of questions. Andrei heiio098 wrote: hello every one how to use the db_http module error: ERROR:db_http:do_http_op: Error in CURL: HTTP response code said error ERROR:db_http:do_http_op: Description : The requested URL returned error: 404 ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel -- Andrei Dragus www.voice-system.ro ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel ___ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel