[OpenSIPS-Users] acc record outbound response to originator
I'm wanting to record the response sent back to the call originator, not just the last winning response selected by tm module. There are cases where opensips translates like a received 503 to a 500 or like if you don't trust the response you received from a vendor that is not using sip codes properly. Also want to log when I reject a call without making any outbound attempts. Like for loop detected or some other invalid formatting. It seems it only logs after t_relay has been used. -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Forward() question
Luis, forward() does not accept a variable for an argument. instead use like: $du = sip: + src_ip + :5070; I think it needs URI format without the user portion. see: http://www.opensips.org/Resources/DocsCoreVar17#toc34 There are a bunch of older functions that do not accept variables as arguments. Some of them like this have read/write variables that can be used instead. It would probably be good to farmiliarize yourself with all the vars on that page especially the read/write ones. Dave On Sun, Oct 2, 2011 at 7:17 PM, Luis Morales luisalfredo_m...@hotmail.comwrote: Greetings, I'd like to use a variable with the function forward() to pass it the destination, but I can't find a way to do it. I've look in the documentation, but i don't know if I'm doing something wrong, or it just can't be done. I'd like to something like this: $var(dest) = src_ip + :5070; forward( $var(dest)); Thanks, Luis Morales. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] need step by step guide lines for media proxy installation
Have you checked if relay and dispatcher are actually running? Have you run them in the foreground with debug turned on to see why use_media_proxy returned an error? I'm betting Brett is right that radius is at least primarily the problem. I would disable it's use in opensips.cfg and mediaproxy/config.ini to see where that gets you. With the instructions that you followed I'm guessing you installed on a debian based system. I used those instructions along with a couple others to get it working on CentOS (Red Hat) systems. I posted my detailed steps http://opensips.org/pipermail/users/2011-January/016399.html It might help for working out the kinks of the configs. There are also links to the other instruction sources I used. Dave On Mon, Sep 12, 2011 at 12:47 PM, Akib Sayyed akibsay...@gmail.com wrote: please i want instruction to install mediaproxy On Mon, Sep 12, 2011 at 9:58 PM, Adrian Georgescu a...@ag-projects.comwrote: That web site instructions are completely bogus Adrian On Sep 12, 2011, at 5:39 PM, Akib Sayyed wrote: Guys i want step by step guide for installing and running mediaproxy. i followed http://voiprookie.blogspot.com/2009/04/blog-post.html instructions but i received following error Sep 12 21:06:03 localhost /usr/local/sbin/opensips[15062]: rc_ip_hostname: couldn't look up host by addr: 73FCBDE7 Sep 12 21:06:03 localhost /usr/local/sbin/opensips[15062]: rc_send_server: no reply from RADIUS server unknown:1813 Sep 12 21:06:03 localhost /usr/local/sbin/opensips[15062]: ERROR:acc:acc_aaa_request: Radius accounting request failed for status: 'Failed' Call-Id: '4006d02bca688a29MDY2NjMyZWU0Njk5ODVlYTkzZWI1ZDliMzA5NDBhYzc.' Sep 12 21:06:08 localhost /usr/local/sbin/opensips[15062]: ACC: transaction answered: timestamp=1315841768;method=BYE;from_tag=21357d7c;to_tag=63261562;call_id=624deb2d230cae3bMDY2NjMyZWU0Njk5ODVlYTkzZWI1ZDliMzA5NDBhYzc.;code=200;reason=OK Sep 12 21:06:16 localhost /usr/local/sbin/opensips[15058]: rc_ip_hostname: couldn't look up host by addr: 73FCBDE7 Sep 12 21:06:16 localhost /usr/local/sbin/opensips[15058]: rc_send_server: no reply from RADIUS server unknown:1813 Sep 12 21:06:16 localhost /usr/local/sbin/opensips[15058]: ERROR:acc:acc_aaa_request: Radius accounting request failed for status: 'Start' Call-Id: '624deb2d230cae3bMDY2NjMyZWU0Njk5ODVlYTkzZWI1ZDliMzA5NDBhYzc.' Sep 12 21:06:16 localhost /usr/local/sbin/opensips[15063]: ERROR:mediaproxy:use_media_proxy: mediaproxy returned error Sep 12 21:06:17 localhost /usr/local/sbin/opensips[15060]: rc_ip_hostname: couldn't look up host by addr: 73FCBDE7 Sep 12 21:06:17 localhost /usr/local/sbin/opensips[15060]: rc_send_server: no reply from RADIUS server unknown:1813 Sep 12 21:06:17 localhost /usr/local/sbin/opensips[15060]: ERROR:acc:acc_aaa_request: Radius accounting request failed for status: 'Alive' Call-Id: '624deb2d230cae3bMDY2NjMyZWU0Njk5ODVlYTkzZWI1ZDliMzA5NDBhYzc.' i am using media-dispatcher and media-relay command to run dispatcher and relay resp please let me know thanks in advance -- Akib Sayyed Matrix-Shell akibsay...@gmail.com akibsay...@matrixshell.com Mob:- +91-966-514-2243 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Akib Sayyed Matrix-Shell akibsay...@gmail.com akibsay...@matrixshell.com Mob:- +91-966-514-2243 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] avp set in branch_route
avps are per transaction. A branch is just part of a transaction. Until the transaction is terminated the avp stays active. Be aware that a call's avp is write-able in all branches and assigning a value to an existing avp pushes the new value on the top of the avp array. Calls do not go back to request routing after any reply or failure. Assuming you set to trigger all routing block types as in route below, the order is route, branch route, reply route, failure route. route { . do_routing(1); route(my_stuff); t_relay; exit; } on_branch[tb]{ #each branch runs through here (assuming triggered as above.) after the exit is hit. } on_reply[tr]{ #all replies received hit here but not communication timeouts. #avps written here are not saved unless avpops param is set to } on_failure[tf] { #all avps (except from on_reply if appropriate avpops param is not set) and only pseudo vars from the winning branch are available here. #from here you can kick off another serial/parallel fork. #you can call any custom named route block with route(my_stuff). #Be sure that what is in that route block can be used by the # primary route mode (REQUEST_ROUTE, ONREPY_ROUTE, # FAILURE_ROUTE, etc) it is being called from. Example, you # wouldn't call route(my_stuff) (see below) from an ONREPLY_ROUTE # block because it contains t_relay which can not be used in that route # block mode. Calling from the wrong one will cause config check test # to warn of config error. if(use_next_gw()) { route(my_stuff); } } route[my_stuff] { t_on_reply(tr); t_on_branch(tb); t_on_failure(tf); t_relay(); exit; } On Tue, Aug 30, 2011 at 8:54 AM, Jeff Pyle jp...@fidelityvoice.com wrote: Hello, If an avp is set in a branch_route, does that avp still exist if a failure_route catches a negative reply and sends the call back into request routing for a serial fork? Or, does the avp go away once that branch goes away? - Jeff ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Preparing new major release 1.7.0 - UPDATE
Speaking of suggestions... (understandable probably won't make it in 1.7, more likely 2.0) I've been thinking about variables in the script and a couple other things. 1. New variables for direct read/write access to value currently only available by function (very beneficial for example with cdrs) a. Dialog variable like $dlg(name) b. Memcache local like $mcl(name). example usage: if ( $mcl(bad_auth_cnt/$si) == null ) { $mcl(bad_auth_cnt/$si) = 1 } else { if ( $mcl(bad_auth_cnt/$si) 10 ) { xlog(WARNING, Bad password count exceeded for $si) ; drop; } ; $mcl(bad_auth_cnt/$si) = $mcl(bad_auth_cnt/$si) + 1 } ; # when var is set it uses default cache timeout optionally set in core setting section of script ( like listen option ) c. Memcache regular like $mc(name) d. Message var that lasts the duration of the mesage like mvar(name). Fast like var but don't have to worry if it was set by this message or a previous message. 2. Make all pseudo vars (avp, var, dlg, mc, mcl, mvar) support all data types like avps: a. arrays b. json c. string d. int e. float (new) f. hash (new) 3. Make all pseudo vars (avp, var, dlg, mc, mcl, mvar) support all the functions, operators and assignment capabilities of avps like avp_db_load, avp_check, and avp_subst. The only difference between avp and var, dlg etc would be what part of memory they are stored in. This would be useful for many thing like loading memcache from db. 4. Add function that combines functionality of avp_db_load and avp_db_query. Eg: var_db_load_query($mvar(qry), $avp(qres)/h); # result from db of query from $mvar(qry) is in same format (columns) as returned for avp_db_load. Results are loaded into $avp(qres) as a hash. Since it is loaded into a single var results can be loaded several times into different vars without concern for an avp(name) already being loaded (so if results say to forward call to PSTN for a call from PSTN you can reload options for diverting user and not worry about weather the avp was loaded by the first load. 5. Add an option flag to t_on_failure(1, m), m for manual failure route rather than auto as done with DNS SRV so you can choose weather to try the next dest according to SRV etc dependent on response. In this case it might be beneficial to store the SRV records in a json (would be able to represent difference between load balance hosts and fail over host of SRV) or avp. 6. Enhancements for DRouting a. Cache drouting user/domain group id and attr in mem like rules and gateways. (Used memcache to speed things up.) b. Fix do_routing to convert a number in an avp string. (Annoyance if for example pulled from memcache as string, must be converted to int before passed to do_routing.) c. Add support for ability to look up user/domain and default/domain with user/domain group id and attr being the first values and default/domain in the result avps if there is a user/domain match. If you had 50,000 users but only 50 could do international you could save 49,949 db entries. (I implemented this with a fairly complex sql query with avp_db_query) d. Add support to pass | separated list of user/domain vars to use in user/domain look up, first var set without null is used for look up. Eg: do_routing(o/$di|$(ai{uri.user})@$si|$(re{uri.user})@$si|$fU@$si); could support a short hand like do_routing(SO/darf); S indicates to use $si for domain and O indicates the header order to try. ( I implemented this with checking in order of preference if the various headers were present setting $avp(s:readSI) and using that in the avp_db_query used to group id) e. Add support for aliasing multiple domains to a single alias domain that so duplication of user/domain settings can be avoided. Like if you had a 5 proxy servers all setup to send calls from 50,000 users, you would have 250,000. With aliasing you would have only 25,006. ( This I used dalias in the username column of the db and in the description only put the domain it was aliased to, again adding to the complexity of the query) f. Add support for only checking domain. Eg: do_routing(ds); d for domain only and s for use $si for domain. ( I implemented this by using any in the db for the user and added to the complexity of the query) g. Add support for re-lookup of source domain according to a custom header like X-RealSrcIP:192.168.0.1. Might add a column to the dr_groups table for options and a mod param defining the custom header name or search the attr column for a key/val pair like XSH=X-RealSrcIP This is good for your topology hiding servers that would pass the source IP they got the call from. ( I checked the returned attr avp for a key/val pair and reran if necessary) h. Add attr column to dr_gateways. Had to use description column to store what I would in attr column and assign it to the avp in the avp_db_query call. So where are suggestions usually posted? :-) Thanks again to all who have contributed to make OpenSIPS
Re: [OpenSIPS-Users] /etc/init.d/opensips restart returns OK when opensips is down...
Toyima, What I've done to deal with errors on a restart is to copy the config to a temp, replace a couple things like fifo file and ports, start it with foreground option, piping output to check for errors. The group is backgrounded with and the init script waits for 2 sec. If bk process is still running and no errors, it is killed and real restart is proceeded with. I posted my init script a few months back in the list if you want more details. Be cautious of the script return value as restart failure may be just that the config was bad and opensips was not restarted but still running old config, you may not want to have HA kick to other server. Dave On Mon, Jun 6, 2011 at 3:24 PM, Robert Thomas tho...@gmail.com wrote: I have an HA setup with Pacemaker using heartbeat stack. I created a script that monitors opensips via the pid file. Eventhough the start event succeed and then opensips crash due to a module. The next monitor round will report an error, and the resource would be migrated to the next node. I don't think the start stop daemon utility used to bring up opensips would succeed, and then opensips would crash starting the modules. On Mon, Jun 6, 2011 at 10:44 AM, Toyima Dias toyim...@gmail.com wrote: Ok, but it any case, the script should return 1 if opensips failed to initialize; i'm thinking to build a HA infraestructure with opensips (heartbeat, cluster glue...) and this opensips init script behavior seems not to be appropriate; i will have to take a deeper look at the opensips.init script 2011/6/6 Andrew Pogrebennyk andrew.pogreben...@portaone.com On 06.06.2011 14:15, Toyima Dias wrote: If opensips has not started (ps -ef | grep opensips doesn't show any opensips pid), how is possible that /etc/init.d/opensips returns [OK] when you execute /etc/init.d/opensips restart...is this beacuse of mysql? is that what you mean...this script should return 1 (not succesfull, different than 0) it no pid file has been created, am i right? Correct, but there can be a case when opensips starts but then some module's initialization function fails due to mysql connect error or incompatible table version and the opensips will exit. -- Sincerely, Andrew Pogrebennyk ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Robert ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] multiple subscribers per alias
Erik, Just typed this up so probably has some mistakes. :-) This form pulls all alias db results into an avp which are looped though to do a lookup for each that only a user alias. You could do the append branch mode for alias_db but then lookup would have to be in branch route and Im not sure if branches created by lookup would run through another round of branch route to handle last minute per branch message settings. So for what it is worth: if( alias_db_find(dbaliases , $ru, $avp(s:ru_alias), d) { $var(append_next) = 0; $var(i) = 0; while( $(avp(s:ru_alias)[$var(i)]) != null ) { if ( $var(append_next) == 1 ) append_branch(); else $var(append_next) = 1; $ru = $(avp(s:ru_alias)[$var(i)]); if ( rui == myself ) { if ( ! lookup(locaion) ) # lookup failed $var(append_next) = 0; } $var(i) = $var(i) + 1; } if ( $var(append_next) == 0 ) { # user not registered, sent to VM server or reply not found sl_send_reply(404, User not found); exit; } t_on_branch(branch_changes); route(1); } else { if ( lookup(location) ) { Hope this helps. Dave On Wed, May 25, 2011 at 1:17 PM, Erik Dekkers erik.dekk...@wvds.nl wrote: Hi folks, I am having trouble finding the best way of solving this situation; Customer can login via a webinterface to change his/her settings like usernames of sip-accounts, passwords, etc. The customer would like to change his/her aliasses too. So they can configure themself wich sip-account(s) should be used for a specifice inbound phonenumber. In this case it can happen a customer would like to have two sip accounts behind one alias (e.g. phonenumber 12345 let ring phones registered with account sip1 and sip2). The most logical way for me is to configure this within the alias_db module, but I can't put in two alias-records with different subscribers. How should I make this possible without hardcode it in the script? Kind regards, Erik Dekkers ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] adding 1 alias to more than one subscriber
Toyima, Not sure how much you know about branches, so... With that switch branches are added for each alias. By default any test or action in the rest of the main route script only applies to the first branch. That is why only the first branch has the lookup location done to it. In order to test/act on other branches, you need to use t_on_branch() and define a route block. When t_on_branch() is set to that route block it will be run for all branches that were created. Also of note is that in failure route, the vars like $ru and headers are all set to the way they were before any branch route is run (may have an effect on how you failover to voicemail). So consider that when choosing to apply changes in main routing or branch routing. A good example is uac_replace_from() which can only be run once on a message so it is good to put it as one of the last things and if there are branches, do it in the branch block. What I've found to work good is to define a named route block to handle last minute changes and test in main route block if there are multiple branches. If only main branch, just call the last_minute_changes from main route before exit; other wise set t_on_branch() and call last_minute_changes from the branch route block. Hope that helps. Dave On Thu, May 19, 2011 at 2:58 AM, Toyima Dias toyim...@gmail.com wrote: Hi Dave, i've added the line modparam(alias_db, append_branches, 1), but now i'm trying to call the alias 314001 and the INVITE is going to both users 1000 and 1001 as expected: that's nice... # U 2011/05/18 13:55:52.918314 192.168.131.129:5060 - 192.168.131.1:61052 INVITE sip:vipexamk@192.168.131.1:61052 SIP/2.0 Record-Route: sip:192.168.131.129;lr=on Via: SIP/2.0/UDP 192.168.131.129;branch=z9hG4bKec48.66d63466.0 Via: SIP/2.0/UDP 192.168.131.1:5060;branch=z9hG4bK-d8754z-801d2084170f1b21-1---d8754z- Max-Forwards: 69 Contact: sip:1000@192.168.131.1:5060;transport=UDP To: sip:314001@192.168.131.129;transport=UDP From: 1000sip:1000@192.168.131.129;transport=UDP;tag=ff69d424 Call-ID: N2JiMTRhODJhNTRiNTgzNjc3NjdkZTI1NThiOWQ1MTU. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Content-Type: application/sdp User-Agent: Zoiper rev.5324 Content-Length: 329 v=0 o=Zoiper_user 0 0 IN IP4 192.168.131.1 s=Zoiper_session c=IN IP4 192.168.131.1 t=0 0 m=audio 8000 RTP/AVP 3 0 8 110 98 101 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:110 speex/8000 a=rtpmap:98 iLBC/8000 a=fmtp:98 mode=30 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv # U 2011/05/18 13:55:52.918371 192.168.131.129:5060 - 192.168.131.129:5060 INVITE sip:1000@192.168.131.129 SIP/2.0 Record-Route: sip:192.168.131.129;lr=on Via: SIP/2.0/UDP 192.168.131.129;branch=z9hG4bKec48.66d63466.1 Via: SIP/2.0/UDP 192.168.131.1:5060;branch=z9hG4bK-d8754z-801d2084170f1b21-1---d8754z- Max-Forwards: 69 Contact: sip:1000@192.168.131.1:5060;transport=UDP To: sip:314001@192.168.131.129;transport=UDP From: 1000sip:1000@192.168.131.129;transport=UDP;tag=ff69d424 Call-ID: N2JiMTRhODJhNTRiNTgzNjc3NjdkZTI1NThiOWQ1MTU. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Content-Type: application/sdp User-Agent: Zoiper rev.5324 Content-Length: 329 v=0 o=Zoiper_user 0 0 IN IP4 192.168.131.1 s=Zoiper_session c=IN IP4 192.168.131.1 t=0 0 m=audio 8000 RTP/AVP 3 0 8 110 98 101 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:110 speex/8000 a=rtpmap:98 iLBC/8000 a=fmtp:98 mode=30 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv As you can see, the R-URI of the first invite is ok, but not the second, as you can see the domain part is the ip address of the proxy and not the ip of the location user 1000, what's happening? seems to be a loop on the second branch (192.168.131.129:5060 - 192.168.131.129:5060)...as i can see, the DB alias is correctly fetching both users from DB, but only the first one is resolved via lookup(location) (registration search). any suggest? Many thanks! 2011/5/18 Dave Singer dave.dorasin...@gmail.com Toyima, check: http://www.opensips.org/html/docs/modules/1.6.x/alias_db.html#id250030 Dave On Tue, May 17, 2011 at 6:44 AM, Toyima Dias toyim...@gmail.com wrote: Is it possible to add the same alias to more than one subscriber? for example, if an incoming call to the number 14882736524 is assigned to subscriber 1000, is it possible to assign this DID to subscriber 1001? the idea is to create a group of ringing or something like that, is that possible? i've tried to insert the data on phpmyadmin and also on opensips-panel, it doesn't work: Error consulta SQL: INSERT INTO `opensips`.`dbaliases` ( `id` , `alias_username` , `alias_domain` , `username` , `domain` ) VALUES ( NULL , '314001', '192.168.131.129', '1000', '192.168.131.129' ) MySQL ha
Re: [OpenSIPS-Users] Rewrite Username in URI when using userloc
Spencer, Looks like you just need to move $rU=$oU; into branch_route[2] Note that in failure route it will be reset to what it was before changes done in branch route so you may want to do it in main route and in branch route. Dave On Thu, May 19, 2011 at 4:02 PM, Spencer Thomason spen...@5ninesolutions.com wrote: Hello all, I'm using Opensips in between several Freeswitch and Asterisk boxes (each with multiple DIDs) and my ITSP's proxies. The local IP PBXs register to Opensips and inbound routing is done via the userloc module. The problem I have is that I need to send in incoming INVITE to the original username, not the registered contact so the PBXs can perform the proper routing. Currently I set $rU=$Ou in the request route which works perfectly if there is only one contact registered. If there is more than one contact registered, the INVITE is sent to the registered contact and then the PBX doesn't know how to route the call since it hits a default contact. Is there a better way to do this? I'm fairly new to Opensips and would appreciate any help. :-) A snippet from my script: route { ... if (!lookup(location,m)) { switch ($retcode) { case -1: case -3: t_newtran(); t_reply(404, Not Found); exit; case -2: sl_send_reply(405, Method Not Allowed); exit; } } $rU=$oU; 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; } branch_route[2] { xlog(new branch at $ru\n); } onreply_route[2] { xlog(incoming reply\n); } failure_route[1] { if (t_was_cancelled()) { exit; } if (t_check_status(3[0-9][0-9])) { t_reply(404,Not found); exit; } } Thanks, Spencer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips+rtpproxy strange locks
Nick, Have you verified there is no firewall on the opensips server with iptables -L I believe the dump pulls the packets before they go through iptables. So what you capture may be just dropped by iptables and not reaching opensips. Though really that shouldn't be a problem since iptables should be keeping track of the conversation and allowing replies. If there are active rules, try iptables -F to see if no firewall makes a difference. Dave On Tue, May 17, 2011 at 8:11 AM, Razvan Crainea razvancrai...@opensips.org wrote: Hi Nick, Can you send me the tcpdump trace just when OpenSIPS sends the offer and waits for the reply? Regards, Razvan On 05/17/2011 05:23 PM, n...@uni-petrol.com wrote: Dear Razvan! Exactly! And it is worst that opensips hang for 15-20 minutes and stop responding on client requests (REGISTER/OPTIONS/INVITE/etc) and only write in log ERROR messages. If I restart opensips then it see response, begin response on client request and write that rtpproxy found: INFO:rtpproxy:rtpp_test: rtp proxy udp:rtp proxy ip:2 found, support for it enabled On Tue, 17 May 2011 16:06:22 +0300, Razvan Crainea wrote: Hi Nick, So you can see RTPProxy's reply with tcpdump, but OpenSIPS doesn't and signals that error? On 05/17/2011 03:24 PM, n...@uni-petrol.com [12]wrote: Dear Razvan! I don't have firewall between rtpproxy and opensips at all so this is not a problem. rtpproxy are on same LAN and in the same broadcast. Also I run tcpdump when this errors appear and I see packets in both direction. Regarding downgrading rtpproxy, I just replace rtpproxy binary without changing anything. On Tue, 17 May 2011 14:39:07 +0300, Razvan Crainea wrote: Hello Nick, It seems that RTPProxy responds to your queries, but OpenSIPS doesn't receive them properly. So probably there is somebody in the middle blocking the messages, most likely a firewall. Have you changed the socket when tried with the older version? Regards, Razvan On 05/17/2011 02:01 PM, n...@uni-petrol.com [9][9]wrote: Dear Razvan! Unfortunately my mail client strip some chars. The real string was:May 13 17:10:51 /usr/sbin/opensips[7990]: ERROR:rtpproxy:send_rtpp_command: proxydoes not respond, disable it I think there is some bug in rtpproxy, because I downgrade rtpproxy to older version with ag-project patches from opensips.org site and have not such locks anymore. On Tue, 17 May 2011 11:23:17 +0300, Razvan Crainea wrote: Hello Nick, Have you removed the RTPProxy IP from the logs, or these are the exactly error logs that OpenSIPS provide? Regards, Razvan On 05/13/2011 07:35 AM, n...@uni-petrol.com [3][3][3]wrote: Dear All! opensips + rtpproxy latest from trunk. I catch strange opensips locks. Opensips stop responding and output to syslog only these errors: May 10 13:21:47 /usr/sbin/opensips[3662]: ERROR:rtpproxy:send_rtpp_command: proxy :2 does not respond, disable it May 10 13:21:48 /usr/sbin/opensips[3661]: ERROR:rtpproxy:send_rtpp_command: proxy :2 does not respond, disable it May 10 13:22:05 /usr/sbin/opensips[3660]: ERROR:rtpproxy:send_rtpp_command: proxy :2 does not respond, disable it ... May 10 13:29:22 /usr/sbin/opensips[5428]: ERROR:rtpproxy:send_rtpp_command: proxy :2 does not respond, disable it I tried increase debug level through fifo but verbosity don't increase. In rtpproxy in debug mode I have these messages: DBUG:handle_command: received command 3660_595 Uc8,0,18,4,3,110,97,101 0e70ed1b54b0727d20297cdf7da7ae33@:5060 12290 as6c1cbf1f;1 INFO:handle_command: new session 0e70ed1b54b0727d20297cdf7da7ae33@:5060, tag as6c1cbf1f;1 requested, type strong INFO:handle_command: new session on a port 13184 created, tag as6c1cbf1f;1 INFO:handle_command: pre-filling caller's address with :12290 DBUG:doreply: sending reply 3660_595 13184 DBUG:handle_command: received command 3660_596 Uc0,8,18,3,101 0e70ed1b54b0727d20297cdf7da7ae33@:5060 16496 as1a95022b;1 as6c1cbf1f;1 INFO:handle_command: adding strong flag to existing session, new=1/0/0 INFO:handle_command: lookup on ports 13184/18324, session timer restarted INFO:handle_command: pre-filling callee's address with :16496 DBUG:doreply: sending reply 3660_596 18324 DBUG:handle_command: received command 3662_610 Uc0,8,18,3,101 0e70ed1b54b0727d20297cdf7da7ae33@:5060 16496 as1a95022b;1 as6c1cbf1f;1 INFO:handle_command: adding strong flag to existing session, new=1/0/0 INFO:handle_command: lookup on ports 13184/18324, session timer restarted DBUG:doreply: sending reply 3662_610 18324 DBUG:handle_command: received command 3661_605 Uc0,8,18,3,101 0e70ed1b54b0727d20297cdf7da7ae33@:5060 16496 as1a95022b;1 as6c1cbf1f;1 INFO:handle_command: adding strong flag to existing session, new=1/0/0 INFO:handle_command: lookup on ports 13184/18324, session timer restarted DBUG:doreply: sending reply 3661_605 18324 ... DBUG:handle_command: received command 3661_607 Uc0,8,18,3,101
Re: [OpenSIPS-Users] adding 1 alias to more than one subscriber
Toyima, check: http://www.opensips.org/html/docs/modules/1.6.x/alias_db.html#id250030 Dave On Tue, May 17, 2011 at 6:44 AM, Toyima Dias toyim...@gmail.com wrote: Is it possible to add the same alias to more than one subscriber? for example, if an incoming call to the number 14882736524 is assigned to subscriber 1000, is it possible to assign this DID to subscriber 1001? the idea is to create a group of ringing or something like that, is that possible? i've tried to insert the data on phpmyadmin and also on opensips-panel, it doesn't work: Error consulta SQL: INSERT INTO `opensips`.`dbaliases` ( `id` , `alias_username` , `alias_domain` , `username` , `domain` ) VALUES ( NULL , '314001', '192.168.131.129', '1000', '192.168.131.129' ) MySQL ha dicho: #1062 - Duplicate entry '314001-192.168.131.129' for key 'alias_idx' Thanks! ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] FIFO very fragile
Brett, I believe you need the full path to the reply fifo. Try: echo -e :address_dump:/tmp/my_fifo\n\n /tmp/opensips_fifo you may also have a permissions ( chmod a+w /tmp/my_fifo ) and/or SELinux issue (very likely if SELinux is enabled, I posted a howto for SELinux in the list a number of months back) Dave On Mon, May 9, 2011 at 9:40 AM, Brett Nemeroff br...@nemeroff.com wrote: Hello List, So I've been doing some testing with the mi_fifo and found that it appears to be really fragile. Here's what I've done: mkfifo /tmp/my_fifo cat /tmp/my_fifo echo -e :address_dump:my_fifo\n\n /tmp/opensips_fifo *returns* 200 OK 48 1.2.3.4,2, 0, 0, NULL, NULL ** cat process ends cat /tmp/my_fifo echo -e :address_dump:my_fifo\n\n /tmp/opensips_fifo ** nothing At this point, I can't make the fifo work again until I restart opensips. If I detach from the fifo (kill the cat, so to speak), and reattach it doesn't work. Nothing seems to make it responsive again. At first I though something was horribly broken, but then I removed one of my \n from the fifo command and now it works as expected. Two new-lines shouldn't break the fifo, right? Thanks! -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] FIFO very fragile
Are you actually able to get results out of the reply fifo? It's been a long time since I created my bash fifo script so I don't remember all the particulars of what I ran into. It can be important to start the read fifo before sending the command Hear is a snippet from a bash fifo I did. trap \rm -f $dlg $fifo_reply ${fifo_answer}* 2 /dev/null; exit 1 0 if [ ! -w $FIFO ] ; then # can I write to FIFO server? echo Error opening ser's FIFO $FIFO $DEBUG_OUT echo FAILED exit 1 fi mkdir -p $fifo_dir 2 /dev/null mkfifo $fifo_reply # create a reply FIFO if [ $? -ne 0 ] ; then echo error opening reply fifo $fifo_reply $DEBUG_OUT echo FAILED exit 1 fi chmod a+w $fifo_reply # start reader now so that it is ready for replies # immediately after a request is out cat $fifo_reply $dlg fifo_job=$! # set trap to cleanup in case of problems or outside kill trap kill -9 $fifo_job $fifo_answer_job 21 $DEBUG_OUT ; exit 1 0 # finally actually push command to the fifo echo reply pid: $fifo_job, reply fifo: $fifo_reply $DEBUG_OUT You may want to just use the fifo handeling built into opensipsctl eg: /path/opensipsctl fifo ps Dave On Mon, May 9, 2011 at 1:42 PM, Brett Nemeroff br...@nemeroff.com wrote: Dave, I don't think those are the issues. First of all, if I supply the full path to the reply fifo, I get an error message that the filename is invalid. More importantly, it doesn't work. :) without the full path, it does work. Secondly, I don't think it's SELinux issue because it *does work* repeatedly over and over. But an extra carriage return spoils the fun for everyone and I can't fix it without restarting opensips. Do you believe SELinux could cause an issue like that? Thanks! -Brett On Mon, May 9, 2011 at 3:39 PM, Dave Singer dave.dorasin...@gmail.comwrote: Brett, I believe you need the full path to the reply fifo. Try: echo -e :address_dump:/tmp/my_fifo\n\n /tmp/opensips_fifo you may also have a permissions ( chmod a+w /tmp/my_fifo ) and/or SELinux issue (very likely if SELinux is enabled, I posted a howto for SELinux in the list a number of months back) Dave On Mon, May 9, 2011 at 9:40 AM, Brett Nemeroff br...@nemeroff.comwrote: Hello List, So I've been doing some testing with the mi_fifo and found that it appears to be really fragile. Here's what I've done: mkfifo /tmp/my_fifo cat /tmp/my_fifo echo -e :address_dump:my_fifo\n\n /tmp/opensips_fifo *returns* 200 OK 48 1.2.3.4,2, 0, 0, NULL, NULL ** cat process ends cat /tmp/my_fifo echo -e :address_dump:my_fifo\n\n /tmp/opensips_fifo ** nothing At this point, I can't make the fifo work again until I restart opensips. If I detach from the fifo (kill the cat, so to speak), and reattach it doesn't work. Nothing seems to make it responsive again. At first I though something was horribly broken, but then I removed one of my \n from the fifo command and now it works as expected. Two new-lines shouldn't break the fifo, right? Thanks! -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Pjsip dialler with openIMS core
Looks like you sent your request to the wrong list. On Mon, May 9, 2011 at 12:24 AM, abid khan abidkhan...@gmail.com wrote: Hello everybody, I want to know main criteria or parameters which i have to fulfill if i want to register* pjsip dialer* with openIMS core. When i try to register pjsip dialler with openims core my server send does not send Authorization to pjsip in response and then 504 (request time out) in end. So any one can please help me in this. -- *Abid khan * ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] FIFO very fragile
Brett, In your perl app are you starting and forking/threading the read before print FIFO :uptime:reply_fifo\n; ? I seem to remember starting the read process first to be very important. My speculation is the reply fifo is not truely active until it has a process actively attached and reading from it. So when opensips tries to write to it, it succeeds checking the fifo file exists and it has proper properties but when it tries to write to it linux says it is not ready or something since it is not a buffer per say. Then opensips waits for something to update/push it which never happens. (again just my speculation from my previous efforts) Dave On Mon, May 9, 2011 at 5:01 PM, Brett Nemeroff br...@nemeroff.com wrote: Dave, Yeah, I do actually get a reply. Works reliably too as long as I'm careful about what I'm asking for. I'm trying to do all of this directly from perl. For some reason I can't write to the fifo with a simple: open(FIFO,/tmp/opensips_fifo); print FIFO :uptime:reply_fifo\n; The fifo never receives it.. now, if I leave the reader attached and use echo from bash, it works great. Really, the concern I have it doing things that cause the fifo to die and become unavailable. I've seen this with the opensipsctl script as well, where the fifo just stops responding until you restart. -Brett On Mon, May 9, 2011 at 4:03 PM, Dave Singer dave.dorasin...@gmail.com wrote: Are you actually able to get results out of the reply fifo? It's been a long time since I created my bash fifo script so I don't remember all the particulars of what I ran into. It can be important to start the read fifo before sending the command Hear is a snippet from a bash fifo I did. trap \rm -f $dlg $fifo_reply ${fifo_answer}* 2 /dev/null; exit 1 0 if [ ! -w $FIFO ] ; then # can I write to FIFO server? echo Error opening ser's FIFO $FIFO $DEBUG_OUT echo FAILED exit 1 fi mkdir -p $fifo_dir 2 /dev/null mkfifo $fifo_reply # create a reply FIFO if [ $? -ne 0 ] ; then echo error opening reply fifo $fifo_reply $DEBUG_OUT echo FAILED exit 1 fi chmod a+w $fifo_reply # start reader now so that it is ready for replies # immediately after a request is out cat $fifo_reply $dlg fifo_job=$! # set trap to cleanup in case of problems or outside kill trap kill -9 $fifo_job $fifo_answer_job 21 $DEBUG_OUT ; exit 1 0 # finally actually push command to the fifo echo reply pid: $fifo_job, reply fifo: $fifo_reply $DEBUG_OUT You may want to just use the fifo handeling built into opensipsctl eg: /path/opensipsctl fifo ps Dave On Mon, May 9, 2011 at 1:42 PM, Brett Nemeroff br...@nemeroff.com wrote: Dave, I don't think those are the issues. First of all, if I supply the full path to the reply fifo, I get an error message that the filename is invalid. More importantly, it doesn't work. :) without the full path, it does work. Secondly, I don't think it's SELinux issue because it *does work* repeatedly over and over. But an extra carriage return spoils the fun for everyone and I can't fix it without restarting opensips. Do you believe SELinux could cause an issue like that? Thanks! -Brett On Mon, May 9, 2011 at 3:39 PM, Dave Singer dave.dorasin...@gmail.com wrote: Brett, I believe you need the full path to the reply fifo. Try: echo -e :address_dump:/tmp/my_fifo\n\n /tmp/opensips_fifo you may also have a permissions ( chmod a+w /tmp/my_fifo ) and/or SELinux issue (very likely if SELinux is enabled, I posted a howto for SELinux in the list a number of months back) Dave On Mon, May 9, 2011 at 9:40 AM, Brett Nemeroff br...@nemeroff.com wrote: Hello List, So I've been doing some testing with the mi_fifo and found that it appears to be really fragile. Here's what I've done: mkfifo /tmp/my_fifo cat /tmp/my_fifo echo -e :address_dump:my_fifo\n\n /tmp/opensips_fifo *returns* 200 OK 48 1.2.3.4,2, 0, 0, NULL, NULL ** cat process ends cat /tmp/my_fifo echo -e :address_dump:my_fifo\n\n /tmp/opensips_fifo ** nothing At this point, I can't make the fifo work again until I restart opensips. If I detach from the fifo (kill the cat, so to speak), and reattach it doesn't work. Nothing seems to make it responsive again. At first I though something was horribly broken, but then I removed one of my \n from the fifo command and now it works as expected. Two new-lines shouldn't break the fifo, right? Thanks! -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] high process count
Bret, try: ps aux --forest | grep opensips that will show you parent and child processes in tree diagram and if any opensips master process is actually responsible for so many of them. I agree that it is probably being spawned many times with a cron job, loop in the init script or a service like monit. Dave On Sat, Apr 30, 2011 at 12:53 PM, Bret McDanel trix...@0xdecafbad.comwrote: On Sat, 2011-04-30 at 19:37 +0100, Stanisław Pitucha wrote: You mean that fifo ps returns a low number of processes? How are you starting up opensips? What kind of scripts / process management are you using? I would guess that something you use to start up opensips is not working as you expect and keeps respawning it all the time. Of course new processes won't stay around for long because they'll try to bind on some ports which are already taken. But if you're respawning often enough, the total count could go into thousands. The extra processes are because it is forking doing something, it is not multiple instances being started like you suggested. They all have the same parent ID. ps auxww | grep opensips | wc -l the list keeps growing. And if I kill opensips most die but not all, and those are only terminated with a kill -9. I show about 7 with opensipsctl ps but hundreds (it constantly grows they never die). They are clearly blocking somewhere, and it cannot be a syscall because a kill -9 cant take those out. I am about to dig in and try to find out where and more importantly why. I start opensips fork=no logstderr=yes debug=10 with only a -f and -P option in a standard shell. -- Trixter aka Bret McDanel website: http://www.0xdecafbad.com pgp key: http://bit.ly/9XYK4b ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Mediaproxy remove unknown session errors
Jeff, Sounds like the bye is not getting matched with the dialog. There are some settings for dialog module for matching fallback that you probably want to look at. Also there are a number of threads that have discussed matching problems that may be helpful. Dave On Tue, May 3, 2011 at 2:46 PM, Jeff Pyle jp...@fidelityvoice.com wrote: Hello, I use engage_media_proxy() in this case to call Mediaproxy 2.4.4 from Opensips 1.6.4. Each day my syslog is full of messages like this: media-dispatcher[25715]: error: Got `remove' command from OpenSIPS for unknown session with call-id '[call-id]'. So far today I count 328 of them. What would cause the dispatcher to seemly forget about a call that was set up with engage_media_proxy()? - Jeff ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Validate To Uri
Jan, I'm assuming you actually meant $tU which is the user portion of the To URI. If all you are trying to do is test if they are numeric then regex is the best way to test it. Something like: if ( ! $tU =~ ^[0-9]*$ ) { ... deal with non numeric user ... } Dave On Wed, May 4, 2011 at 2:07 AM, Denis Putyato denis7...@mail.ru wrote: Hello Try to use dialplan module http://www.opensips.org/html/docs/modules/devel/dialplan.html#id249075 -Original Message- From: users-boun...@lists.opensips.org [mailto: users-boun...@lists.opensips.org] On Behalf Of Jan D. Sent: Wednesday, May 04, 2011 1:00 PM To: users@lists.opensips.org Subject: [OpenSIPS-Users] Validate To Uri In an INVITE I want to validate the To Uri ($Tu). This should be a numeric value (ie. 31201234567). Is there a function I can use or should I validate against a regexp (if so, do you have an example). Regards, Jan -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Validate-To-Uri-tp6330114p6330114.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips geographic redundancy
Marcello, Might check into getting an IP with BGP (Border Gateway Protocol) or some other IP routing protocol. Not all ISPs offer these services and it is usually offered on a subnet of addresses not a single address. If your providers/contacts can't do this or don't have good answers you might check with www.spectrumnet.us. Dave On Fri, Apr 29, 2011 at 9:22 AM, Marcello Lupo ml...@itspecialist.itwrote: Hi to all, i have a problem and hope someone can give me a clue on it. We have an Opensips infrastructure with heartbeat HA and it is working fine. I'm implementing the geographic redundancy on our VoIP infrastructure with opensips 1.6.4. There are 2 different locations. 2 server in each location (one running the Opensips and the other running the mysql DB). The 2 structures are totally independent but share the same DB data (with mysql master-slave-master replication). So each location can handle customer requests independently, the registrations are duplicated from one server to the other to maintain all the CPE's reachable from both servers. Now I'd like to use the DNS SRV records to let the CPEs to use the 2 servers in a kind of load balance. I discovered that lot of CPE are not implementing the SRV records logic in a correct way. Patton CPE with 5.7 firmware make the first REGISTER (without authentication) on one server and after the server answer back with 401 Unauthorized the CPE retry the REGISTER (with authentication) on the other server that reject it because an invalid nonce is found (it was generated from the other server obviously). It should continue the session with the same server it started with the first REGISTER because it received an answer and the server is alive. Asterisk 1.6 is making the REGISTER properly (one for each server) but place all the calls through only one server even if it is down. I'm sure will find that lot of other CPE will have trouble with SRV records correct implementation. I'd like to find a way to do it in a CPE software independent way. So i'm starting to search another solution that let me implement the geographic redundancy without the SRV records but I'm short of ideas now without inserting any Single Point of Failure in the system. I thought to a front end proxy (in HA redundancy like the one of now) to be a load balancer to the other 2 proxies but in any way i don't' have a geographic redundancy. Have you any suggestions? Thank you all. Regards, Marcello ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- David Singer ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] need OpenSIPS installation
Jeff, I would be interested in working with you. I've been integrating OpenSIPS in hosted VOIP environment for 4 years. Unfortunately I will be laid off the end of this week, Apr 22 (I'm the last one to go). You can look at my resume on Linkedin ( http://www.linkedin.com/in/davesingercando ) or Monster.com or I can send you one if you are interested. Thanks, Dave On Wed, Apr 6, 2011 at 9:50 AM, Jeff Matson j...@thresholdcommunications.com wrote: We are looking to implement OpenSIPS within our hosted VOIP environment. If you are interested in contracting out to assist us in the configuration and initial programming, please let me know. regards Jeff ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Problem with Diversion when added in failure route and RURI uses DNS SRV
I have a server running 1.6.3. In failure route I add a Diversion and the RURI is a DNS SRV record and sometimes one of the servers times out and opensips auto tries the second server from the SRV records but without the diversion header in the new message Is this proper/expected behavior or a bug? I would think for SRV it would only change the destination IP. Especially where you don't have an opportunity to make any fixes to the original message (what it was just before any branches). Dave ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Need ideas to tamper with CSeq
Cinthia, The CSeq needs to be changed before it hits opensips. So you could do something where if the cancel is not matched, lookup the right cseq using a memcache lookup (that you stored during the accepted invite) and send it out to it self with the modified CSeq. I wouldn't be surprised if this too doesn't work since it would be coming from itself rather than the ATA like the INVITE. Might be worth a try though. Dave On Wed, Mar 30, 2011 at 5:21 PM, Cindy Leung cinthia...@gmail.com wrote: I know I'm doing something bad here. However, we are having a problem with one of the SIP phones that we support. When it sends out an INVITE and then CANCEL, the CANCEL is not being forwarded. We are suspecting that it is caused by a wrong CSeq value. INVITE #1 gets challenged. INVITE #2 accepted. CANCEL is sent, but CSeq is the same as the one in INVITE #1. It is less than ideal for us to contact their support and we'd like to get it fixed asap. I've tried subst(), remove_hf and append_hf to play with CSeq with no luck. Any suggestions? Thanks! Cinthia ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server
Duong, The MI commands are for opensips and ps does NOT take any arguments. The easiest way for it to connect when on the same box is with fifo. Here is a snippet from the boxes.global.inc.php: /* DEFINITION OF BOXES (servers) */ // each server is a box $box_id=0; $boxes[$box_id]['mi']['type']=fifo; $boxes[$box_id]['mi']['fifo']=/tmp/opensips_fifo; This does require that opensips module mi_fifo is loaded and configured with the same path/file as you set in the config above (above path is the default path). opensipsctl uses it also (unless it was configured to use xmlrpc (not sure it can)). Opensips xmlrpc module by default lisetns on port 8000, not the sip port 5060. That is why you got that message. I've not been able to get xmlrpc to compile and work on Centos 5 servers. Dave On Thu, Mar 24, 2011 at 12:17 AM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Thank Dave! When going to the MI commands tab, surprisingly i found that Cannot connect to OpenSIPS Server via Management Interface (127.0.0.1/8000) Execute MI Command After i executed the ps -A command, i only got this 14:02:20 | ps -A | 127.0.0.1:8000 The same result for opensipsctl online command 14:04:37 | opensipsctl online | 127.0.0.1:8000 And i think the problem is my CP does not connect to my Opensips server on 5060 port. I remember that i have not configured CP listening port before, it is default :-( (CP Opensips server were installed in the same machine) Checking these files db.inc.php ; local.inc.php; globals.php in the CP config directory /var/www/opensips-cp/config I don't see anywhere to config CP listening port ! Please help me to figure out, thanks! 2011/3/24 Dave Singer dave.sin...@wideideas.com Duong, Yea missed that. :-) To check basic CP connection to opensips, go to System, MI Commands. In box under Execute MI Command, put ps and click execute. It should show a bunch of lines about the opensips processes that are running. As far as showing Online Users, it may be using presence module/table rather than active registrations to qualify a user as online. Someone else will have to answer that or you can look at the CP source code for that answer. Dave On Wed, Mar 23, 2011 at 12:35 PM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Thank David, But i found that in my opensips.cfg file: # - usrloc params - # modparam(usrloc, db_mode, 0) /* uncomment the following lines if you want to enable DB persistency for location entries */ modparam(usrloc, db_mode, 2) modparam(usrloc, db_url, mysql://opensips:opensipsrw@localhost/opensips) So i think that my db_mode is not the cause of my failed CP 2 - Write-Back scheme. This is a combination of previous two schemes. All changes are made to memory and database synchronization is done in the timer. The timer deletes all expired contacts and flushes all modified or new contacts to database. Use this scheme if you encounter high-load peaks and want them to process as fast as possible. The mode will not help at all if the load is high all the time. Also, latency of this mode is much lower than latency of mode 1, but slightly higher than latency of mode 0. My CP still does not work :-( , even the simple function like show online user --- no data found (While checking by using opensipsctl is ok) opensipsctl online database engine 'MYSQL' loaded Control engine 'FIFO' loaded 1001 Please tell me how to check my CP and its connection to Opensips server? Thanks ! -- Message: 1 Date: Tue, 22 Mar 2011 21:06:21 -0700 From: Dave Singer dave.sin...@wideideas.com Subject: Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server To: OpenSIPS users mailling list users@lists.opensips.org Message-ID: AANLkTimB=bQZ1buVKaWzMKq2LM=uslhesaqww+ufr...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 The key I think is usrloc db mode is 0, which means db is not used. http://www.opensips.org/html/docs/modules/1.6.x/usrloc.html#id292029 On Tue, Mar 22, 2011 at 6:47 PM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Dear Dave! Thanks for your help. I've checked the opensips.cfg again but i still can not find out what stuff is incorrect ! :-( I attached my config file in this email, hope that will help my problem to be?clearer! If anyone has had the same issue, please tell me how can i check or fix it. (Hope to receive relatively specific informations) Thanks and Best Regards. Date: Mon, 21 Mar 2011 08:45:03 -0700 From: Dave Singer dave.sin...@wideideas.com Subject: Re: [OpenSIPS-Users] Opensips Control Pannel does not take ? ? ? ?effect into Opensips Server To: OpenSIPS users mailling list users@lists.opensips.org Message-ID
Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server
Duong, Sorry. I forgot I modified my CP and those options. You need to have it: $boxes[$box_id]['mi']['conn']=/tmp/opensips_fifo; and remove: $boxes[$box_id]['mi']['type']=fifo; $boxes[$box_id]['mi']['fifo']=/tmp/opensips_fifo; Are you sure cdrs are being recorded (you have seen cdrs in the acc table)? Have you verified online users is using the location (registered users) table and not the presence module fifo/table (I haven't used presence so don't know what is available and how CP would pull presence info). My guess is that online users uses presence module. Dave On Thu, Mar 24, 2011 at 11:31 AM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Hi Dave, My default config in was : // default: $boxes[$box_id]['mi']['conn']=127.0.0.1:8000; // default: $boxes[$box_id]['mi']['conn']=/tmp/opensips_fifo; then i changed it to $boxes[$box_id]['mi']['type']=fifo; $boxes[$box_id]['mi']['fifo']=/tmp/opensips_fifo; And i found some functions of CP works such as: Add/edit users; Add/edit domain. But a lot of others still dont work such as: cdrs, show online users, I see the apply changes to server button, i hit it and get this message for a new web browser tab: http://10.2.14.122/cp/tools/system/domains/apply_changes.php Cannot connect to OpenSIPS Server via Management Interface () I come to /cp/tools/system/domains but find no apply_changes.php file :-( Please help me to find out how i can connect to Opensips Server and making changes Thanks! 2011/3/24 Dave Singer dave.sin...@wideideas.com Duong, The MI commands are for opensips and ps does NOT take any arguments. The easiest way for it to connect when on the same box is with fifo. Here is a snippet from the boxes.global.inc.php: /* DEFINITION OF BOXES (servers) */ // each server is a box $box_id=0; $boxes[$box_id]['mi']['type']=fifo; $boxes[$box_id]['mi']['fifo']=/tmp/opensips_fifo; This does require that opensips module mi_fifo is loaded and configured with the same path/file as you set in the config above (above path is the default path). opensipsctl uses it also (unless it was configured to use xmlrpc (not sure it can)). Opensips xmlrpc module by default lisetns on port 8000, not the sip port 5060. That is why you got that message. I've not been able to get xmlrpc to compile and work on Centos 5 servers. Dave On Thu, Mar 24, 2011 at 12:17 AM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Thank Dave! When going to the MI commands tab, surprisingly i found that Cannot connect to OpenSIPS Server via Management Interface (127.0.0.1/8000) Execute MI Command After i executed the ps -A command, i only got this 14:02:20 | ps -A | 127.0.0.1:8000 The same result for opensipsctl online command 14:04:37 | opensipsctl online | 127.0.0.1:8000 And i think the problem is my CP does not connect to my Opensips server on 5060 port. I remember that i have not configured CP listening port before, it is default :-( (CP Opensips server were installed in the same machine) Checking these files db.inc.php ; local.inc.php; globals.php in the CP config directory /var/www/opensips-cp/config I don't see anywhere to config CP listening port ! Please help me to figure out, thanks! 2011/3/24 Dave Singer dave.sin...@wideideas.com Duong, Yea missed that. :-) To check basic CP connection to opensips, go to System, MI Commands. In box under Execute MI Command, put ps and click execute. It should show a bunch of lines about the opensips processes that are running. As far as showing Online Users, it may be using presence module/table rather than active registrations to qualify a user as online. Someone else will have to answer that or you can look at the CP source code for that answer. Dave On Wed, Mar 23, 2011 at 12:35 PM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Thank David, But i found that in my opensips.cfg file: # - usrloc params - # modparam(usrloc, db_mode, 0) /* uncomment the following lines if you want to enable DB persistency for location entries */ modparam(usrloc, db_mode, 2) modparam(usrloc, db_url, mysql://opensips:opensipsrw@localhost/opensips) So i think that my db_mode is not the cause of my failed CP 2 - Write-Back scheme. This is a combination of previous two schemes. All changes are made to memory and database synchronization is done in the timer. The timer deletes all expired contacts and flushes all modified or new contacts to database. Use this scheme if you encounter high-load peaks and want them to process as fast as possible. The mode will not help at all if the load is high all the time. Also, latency of this mode is much lower than latency of mode 1, but slightly higher than latency of mode 0. My CP still does not work :-( , even the simple function like show
Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server
Duong, That is probably a selinux problem. I dealt with that a couple months ago and posted a little howto for easily dealing with selinux problems the right way (not disabling selinux). Just google for: selinux opensips dave Dave On Thu, Mar 24, 2011 at 8:57 PM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Hi Dave! I changed my config to $box_id=0; // mi host:port pair || fifo_file //$boxes[$box_id]['mi']['type']=fifo; //$boxes[$box_id]['mi']['fifo']=/tmp/opensips_fifo; $boxes[$box_id]['mi']['conn']=127.0.0.1:8000; $boxes[$box_id]['mi']['conn']=/tmp/opensips_fifo; And i've got the same results: OK with add users only! When i hit the apply changes to server button, i see this sorry -- cannot open write fifo Or when using MI commands: 10:40:18 | opensipsctl online | /tmp/opensips_fifo sorry -- cannot open write fifo Check the file: [root@opensips tmp]# ls -l opensips_fifo prw-rw-rw-. 1 root root 0 Mar 25 10:31 opensips_fifo I think that file's permission here is ok !! Continued checking the opensips.cfg, i had added the lines following # - mi_fifo params - modparam(mi_fifo, fifo_mode, 0666) modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) But error is still occured :-( My acc table has cdr_id filed, not the cdr field additionally, i have Cdrs table separately. Both 2 tables above are empty. (although i made several internal calls) And i've checked the location table and it truly contained records of online users (not the presence module as you suggested) Please tell me what are the next steps to check ? Thanks! 2011/3/25 Dave Singer dave.sin...@wideideas.com Duong, Sorry. I forgot I modified my CP and those options. You need to have it: $boxes[$box_id]['mi']['conn']=/tmp/opensips_fifo; and remove: $boxes[$box_id]['mi']['type']=fifo; $boxes[$box_id]['mi']['fifo']=/tmp/opensips_fifo; Are you sure cdrs are being recorded (you have seen cdrs in the acc table)? Have you verified online users is using the location (registered users) table and not the presence module fifo/table (I haven't used presence so don't know what is available and how CP would pull presence info). My guess is that online users uses presence module. Dave On Thu, Mar 24, 2011 at 11:31 AM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Hi Dave, My default config in was : // default: $boxes[$box_id]['mi']['conn']=127.0.0.1:8000; // default: $boxes[$box_id]['mi']['conn']=/tmp/opensips_fifo; then i changed it to $boxes[$box_id]['mi']['type']=fifo; $boxes[$box_id]['mi']['fifo']=/tmp/opensips_fifo; And i found some functions of CP works such as: Add/edit users; Add/edit domain. But a lot of others still dont work such as: cdrs, show online users, I see the apply changes to server button, i hit it and get this message for a new web browser tab: http://10.2.14.122/cp/tools/system/domains/apply_changes.php Cannot connect to OpenSIPS Server via Management Interface () I come to /cp/tools/system/domains but find no apply_changes.php file :-( Please help me to find out how i can connect to Opensips Server and making changes Thanks! 2011/3/24 Dave Singer dave.sin...@wideideas.com Duong, The MI commands are for opensips and ps does NOT take any arguments. The easiest way for it to connect when on the same box is with fifo. Here is a snippet from the boxes.global.inc.php: /* DEFINITION OF BOXES (servers) */ // each server is a box $box_id=0; $boxes[$box_id]['mi']['type']=fifo; $boxes[$box_id]['mi']['fifo']=/tmp/opensips_fifo; This does require that opensips module mi_fifo is loaded and configured with the same path/file as you set in the config above (above path is the default path). opensipsctl uses it also (unless it was configured to use xmlrpc (not sure it can)). Opensips xmlrpc module by default lisetns on port 8000, not the sip port 5060. That is why you got that message. I've not been able to get xmlrpc to compile and work on Centos 5 servers. Dave On Thu, Mar 24, 2011 at 12:17 AM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Thank Dave! When going to the MI commands tab, surprisingly i found that Cannot connect to OpenSIPS Server via Management Interface (127.0.0.1/8000) Execute MI Command After i executed the ps -A command, i only got this 14:02:20 | ps -A | 127.0.0.1:8000 The same result for opensipsctl online command 14:04:37 | opensipsctl online | 127.0.0.1:8000 And i think the problem is my CP does not connect to my Opensips server on 5060 port. I remember that i have not configured CP listening port before, it is default :-( (CP Opensips server were installed in the same machine) Checking these files db.inc.php ; local.inc.php; globals.php in the CP config directory /var/www/opensips-cp
Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server
Duong, Yea missed that. :-) To check basic CP connection to opensips, go to System, MI Commands. In box under Execute MI Command, put ps and click execute. It should show a bunch of lines about the opensips processes that are running. As far as showing Online Users, it may be using presence module/table rather than active registrations to qualify a user as online. Someone else will have to answer that or you can look at the CP source code for that answer. Dave On Wed, Mar 23, 2011 at 12:35 PM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Thank David, But i found that in my opensips.cfg file: # - usrloc params - # modparam(usrloc, db_mode, 0) /* uncomment the following lines if you want to enable DB persistency for location entries */ modparam(usrloc, db_mode, 2) modparam(usrloc, db_url, mysql://opensips:opensipsrw@localhost/opensips) So i think that my db_mode is not the cause of my failed CP 2 - Write-Back scheme. This is a combination of previous two schemes. All changes are made to memory and database synchronization is done in the timer. The timer deletes all expired contacts and flushes all modified or new contacts to database. Use this scheme if you encounter high-load peaks and want them to process as fast as possible. The mode will not help at all if the load is high all the time. Also, latency of this mode is much lower than latency of mode 1, but slightly higher than latency of mode 0. My CP still does not work :-( , even the simple function like show online user --- no data found (While checking by using opensipsctl is ok) opensipsctl online database engine 'MYSQL' loaded Control engine 'FIFO' loaded 1001 Please tell me how to check my CP and its connection to Opensips server? Thanks ! -- Message: 1 Date: Tue, 22 Mar 2011 21:06:21 -0700 From: Dave Singer dave.sin...@wideideas.com Subject: Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server To: OpenSIPS users mailling list users@lists.opensips.org Message-ID: AANLkTimB=bQZ1buVKaWzMKq2LM=uslhesaqww+ufr...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 The key I think is usrloc db mode is 0, which means db is not used. http://www.opensips.org/html/docs/modules/1.6.x/usrloc.html#id292029 On Tue, Mar 22, 2011 at 6:47 PM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Dear Dave! Thanks for your help. I've checked the opensips.cfg again but i still can not find out what stuff is incorrect ! :-( I attached my config file in this email, hope that will help my problem to be?clearer! If anyone has had the same issue, please tell me how can i check or fix it. (Hope to receive relatively specific informations) Thanks and Best Regards. Date: Mon, 21 Mar 2011 08:45:03 -0700 From: Dave Singer dave.sin...@wideideas.com Subject: Re: [OpenSIPS-Users] Opensips Control Pannel does not take ? ? ? ?effect into Opensips Server To: OpenSIPS users mailling list users@lists.opensips.org Message-ID: ? ? ? ?aanlktingldzzbugjgqxod_93r31hjnhavazpmo64k...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Duong, Some modules, like drouting, you have to click a reload module button in the control pannel. However, I think your problem is that you haven't implemented the needed stuff in opensips.cfg script. CP only provides an interface to managing/accessing the databases tables. You still have to impliment the logic in opensips.cfg. Dave On Sat, Mar 19, 2011 at 3:04 AM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Hi all, I have followed all instructions about Opensips CP installations After done all configurations, the Web interface is appeared but unfortunately, when i use modules in this interfaces, it seems there is no connection between Opensips CP and Opensips Server Core! Take add/manage users module as an example: I registered user 1001, then i selected this module to show online users = But the result was no data found :-( I've created opensips database, correctly insert parameters to opensips CP config files (including mysql user/pass to connect to opensips database) No error found ! But i still can not use Opensips CP, someone help me to figure out why Opensips CP has no effect ?? Do i misconfig ?(or forget to config) some important parameters to make Opensips CP connect properly to Opensips Server Core? (Something likes authenticationsetc) Thanks a lot! ___ Users mailing list ?Users@lists.opensips.org ?http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http
Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server
The key I think is usrloc db mode is 0, which means db is not used. http://www.opensips.org/html/docs/modules/1.6.x/usrloc.html#id292029 On Tue, Mar 22, 2011 at 6:47 PM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Dear Dave! Thanks for your help. I've checked the opensips.cfg again but i still can not find out what stuff is incorrect ! :-( I attached my config file in this email, hope that will help my problem to be clearer! If anyone has had the same issue, please tell me how can i check or fix it. (Hope to receive relatively specific informations) Thanks and Best Regards. Date: Mon, 21 Mar 2011 08:45:03 -0700 From: Dave Singer dave.sin...@wideideas.com Subject: Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server To: OpenSIPS users mailling list users@lists.opensips.org Message-ID: aanlktingldzzbugjgqxod_93r31hjnhavazpmo64k...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Duong, Some modules, like drouting, you have to click a reload module button in the control pannel. However, I think your problem is that you haven't implemented the needed stuff in opensips.cfg script. CP only provides an interface to managing/accessing the databases tables. You still have to impliment the logic in opensips.cfg. Dave On Sat, Mar 19, 2011 at 3:04 AM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Hi all, I have followed all instructions about Opensips CP installations After done all configurations, the Web interface is appeared but unfortunately, when i use modules in this interfaces, it seems there is no connection between Opensips CP and Opensips Server Core! Take add/manage users module as an example: I registered user 1001, then i selected this module to show online users = But the result was no data found :-( I've created opensips database, correctly insert parameters to opensips CP config files (including mysql user/pass to connect to opensips database) No error found ! But i still can not use Opensips CP, someone help me to figure out why Opensips CP has no effect ?? Do i misconfig ?(or forget to config) some important parameters to make Opensips CP connect properly to Opensips Server Core? (Something likes authenticationsetc) Thanks a lot! ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips Control Pannel does not take effect into Opensips Server
Duong, Some modules, like drouting, you have to click a reload module button in the control pannel. However, I think your problem is that you haven't implemented the needed stuff in opensips.cfg script. CP only provides an interface to managing/accessing the databases tables. You still have to impliment the logic in opensips.cfg. Dave On Sat, Mar 19, 2011 at 3:04 AM, Duong Manh Truong ngoahotanglon...@gmail.com wrote: Hi all, I have followed all instructions about Opensips CP installations After done all configurations, the Web interface is appeared but unfortunately, when i use modules in this interfaces, it seems there is no connection between Opensips CP and Opensips Server Core! Take add/manage users module as an example: I registered user 1001, then i selected this module to show online users = But the result was no data found :-( I've created opensips database, correctly insert parameters to opensips CP config files (including mysql user/pass to connect to opensips database) No error found ! But i still can not use Opensips CP, someone help me to figure out why Opensips CP has no effect ?? Do i misconfig (or forget to config) some important parameters to make Opensips CP connect properly to Opensips Server Core? (Something likes authenticationsetc) Thanks a lot! ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Stopping a T.38 reinvite with Opensips loose_route()
JP, The two end points have to agree on an RTP protocol. You may look at the SDP in the initial INVITEs to see if T.38 is offered and if it is, remove it. Also if the re-INVITE contains G711 along with the T.38 you should be able to just remove the T.38. That should accomplish the same effect as the customer disabling T.38. FYI: FaxBack has a very reliable T.38 implementation NET SatisFAXtion that we have been using for quite some time. Dave On Sun, Mar 6, 2011 at 1:52 PM, Iñaki Baz Castillo i...@aliax.net wrote: 2011/3/6 Jeff Pyle jp...@fidelityvoice.com: Unfortunately the customer cannot disable T.38. I'd like to be able to reject the reinvite with a send_reply(488, Not acceptable here) within the loose_route() section. Is this legit, or am I going to break things, like getting the two endpoints' CSeqs out of sync? You are not going to break CSeq at all. The proxy is able to reject in-dialog requests depending on local policy. When the UA receives 488 it does know that, in case of a new in-dialog request, it must use a greater CSeq, which of course will be valid in the other UA (it must be just higher than previous one, no matter how much higher). But in your case, the problem is that when your UA receives the 488 it will probably send a BYE (it's the usual policy when a re-INVITE is rejected). But you can try it. You will not break SIP protocol at all. -- Iñaki Baz Castillo i...@aliax.net ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How much A records are retained in IP comparison
Igor, I'm pretty sure that won't work at all. You would need to use the transformation ip.resolve. I don't know if it returns multiple IPs but if it does you would want to assign it to an avp that can handle multiple. An example to try: $var(fqdn) = some.server.com; # Not sure if you can do a transformation directly on a string. Never tried. $avp(s:ips) = $(var(fqdn){ip.resolve}); xlog(INFO, $(avp(s:ips)[0])::$(avp(s:ips)[1])::$(avp(s:ips)[2])\n); if ( avp_check($avp(s:ips), eq/$si/) ) { } Let me know what you find. Dave On Wed, Mar 2, 2011 at 9:20 AM, Igor Solovyov i...@choochee.com wrote: Hi, If I use if ($si==some.server.com) { ... } and some.server.com has several A records, are all of them used in upper comparison? How does TTL influence on saved IPs? Regards, Igor. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] running opensips under another user
Anton, When you are trying to start it are you starting it using the -u opensips and -g opensips command line options to have it run as opensips user and group? That way in the startup script you can easily remove the dead pid as root (checking first to be sure opensips is not actually running). Dave On Thu, Feb 24, 2011 at 11:55 PM, Anton Zagorskiy a.zagors...@oyster-telecom.ru wrote: Hi, Dave. The problem was I’v started openSIPS under not opensips user. With ‘sudo –u opensips /usr/local/sbin/opensips …’ openSIPS starts well. But now it seems that pid file isn’t erased when openSIPS failed to start. *From:* users-boun...@lists.opensips.org [mailto: users-boun...@lists.opensips.org] *On Behalf Of *Dave Singer *Sent:* Friday, February 25, 2011 4:14 AM *To:* OpenSIPS users mailling list *Subject:* Re: [OpenSIPS-Users] running opensips under another user Anton, Have you checked the selinux logs? Search the list about selinux. A couple months back I posted what I ran into and how to solve it fairly simply. Dave. On Thu, Feb 24, 2011 at 6:23 AM, Duane Larson duane.lar...@gmail.com wrote: And you're positive that the /var/run/opensips directory is owned by the opensips:opensips user and group? All I ever do is sudo mkdir /var/run/opensips/ sudo chown opensips:opensips /var/run/opensips Never had that issue. cd /var/run ls -la drwxr-xr-x 2 opensipsopensips4096 Feb 24 08:23 opensips On Thu, Feb 24, 2011 at 3:07 AM, Anton Zagorskiy a.zagors...@oyster-telecom.ru wrote: Hi. I've made a user opensips with group opensips and with shell nologin. Also, I've created /var/run/opensips with opensips::opensips and access mode 775 Next, running openSIPS with -u opensips -g opensips -P /var/run/opensips/opensips.pid And opensips failed to start with: ERROR:core:daemonize: unable to create pid file /var/run/opensips/opensips.pid: Permission denied A command sudo -u opensips touch /var/run/opensips/opensips1.pid works well. What I'm doing wrong? WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- -- *--*--*--*--*--* Duane *--*--*--*--*--* -- ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] {ip.resolve} script transformation trouble
Igor, Very close. Notice the ( between $ and var and ) after var name: $var(fs_addr) = $(var(fs_addr_s){ip.resolve}{ip.ntop}); see syntax near top of http://www.opensips.org/Resources/DocsCoreVar16 Dave On Thu, Feb 24, 2011 at 10:36 AM, Igor Solovyov i...@choochee.com wrote: Hi All, I try to execute in the script $var(fs_addr_s) = opensips.org; # just for test $var(fs_addr) = $var(fs_addr_s{ip.resolve}{ip.ntop}); xlog(L_ERR, fs_addr = $var(fs_addr)); but in log I can see only 0 instead of resolved ip address. What I do wrongly? Thanks, Igor. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] {ip.resolve} script transformation trouble
Igor, Only documentation I see it in is for development versionhttp://www.opensips.org/Resources/DocsCoreTran#toc47 implying trunk what will be 1.6.5. However a little while back I was looking at the source code of 1.6.4 for transformations and noticed some IP transformation stuff. I can't tell you ip.resolve is there but it is a place to start. Dave On Thu, Feb 24, 2011 at 1:39 PM, Igor Solovyov i...@choochee.com wrote: Thanks Dave for prompt help. Now I get Feb 24 23:32:32 os1 opensips: ERROR:core:parse_transformation: unknown transformation: [ip] in [{ip.resolve}] Feb 24 23:32:32 os1 opensips: ERROR:core:parse_transformation: error parsing [{ip.resolve}] Feb 24 23:32:32 os1 opensips: ERROR:core:pv_parse_spec: ERROR:bad tr in pvar name var Feb 24 23:32:32 os1 opensips: ERROR:core:pv_parse_spec: invalid parsing in [$(var(fs_addr_s){ip.resolve})] at (4) Feb 24 23:32:32 os1 opensips: CRITICAL:core:yyerror: parse error in config file, line 144, column 49-78: unknown script variable which leads me to though that my OpenSIPS version 1.6.3 doesn't support ip transformation. Am I correct? And so, from which version ip is supported? Or may be is there another method to get resolved ip by string? Igor. On Thu, Feb 24, 2011 at 11:06 PM, Dave Singer dave.sin...@wideideas.comwrote: Igor, Very close. Notice the ( between $ and var and ) after var name: $var(fs_addr) = $(var(fs_addr_s){ip.resolve}{ip.ntop}); see syntax near top of http://www.opensips.org/Resources/DocsCoreVar16 Dave On Thu, Feb 24, 2011 at 10:36 AM, Igor Solovyov i...@choochee.comwrote: Hi All, I try to execute in the script $var(fs_addr_s) = opensips.org; # just for test $var(fs_addr) = $var(fs_addr_s{ip.resolve}{ip.ntop}); xlog(L_ERR, fs_addr = $var(fs_addr)); but in log I can see only 0 instead of resolved ip address. What I do wrongly? Thanks, Igor. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] running opensips under another user
Anton, Have you checked the selinux logs? Search the list about selinux. A couple months back I posted what I ran into and how to solve it fairly simply. Dave. On Thu, Feb 24, 2011 at 6:23 AM, Duane Larson duane.lar...@gmail.comwrote: And you're positive that the /var/run/opensips directory is owned by the opensips:opensips user and group? All I ever do is sudo mkdir /var/run/opensips/ sudo chown opensips:opensips /var/run/opensips Never had that issue. cd /var/run ls -la drwxr-xr-x 2 opensipsopensips4096 Feb 24 08:23 opensips On Thu, Feb 24, 2011 at 3:07 AM, Anton Zagorskiy a.zagors...@oyster-telecom.ru wrote: Hi. I've made a user opensips with group opensips and with shell nologin. Also, I've created /var/run/opensips with opensips::opensips and access mode 775 Next, running openSIPS with -u opensips -g opensips -P /var/run/opensips/opensips.pid And opensips failed to start with: ERROR:core:daemonize: unable to create pid file /var/run/opensips/opensips.pid: Permission denied A command sudo -u opensips touch /var/run/opensips/opensips1.pid works well. What I'm doing wrong? WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- -- *--*--*--*--*--* Duane *--*--*--*--*--* -- ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] pseudo-variable problem with increasing cps
Ronald, The only time I've seen it be null in failure route is if there was no reply received, you might add a check to see if it was a local timeout: if ( t_local_replied(all) ) { xlog(did not get any response); } else { xlog($(replyci): $C(rx)failure route: $(replyrs) $(replyrr)$C(xx)\n); } Dave On Wed, Feb 23, 2011 at 10:04 AM, Ronald Cepres rbcep...@gmail.com wrote: Hi all, I'm setting up opensips as a stateful proxy, and i have the following snippet of code on the failure route: failure_route[1] { xlog($(replyci): $C(rx)failure route: $(replyrs) $(replyrr)$C(xx)\n); # Failure route routine... } The values of the call-id, response code and reason are normally there. but on higher cps, i often get this: null: failure route: null null Does this mean that the transaction was already destroyed before opensips got the reply? I wonder if anyone comes across this problem. Any help would be appreciated. Thanks! Regards, Ronald ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Dialog module app callback hooks not saved to DB
I tested setting up acc module to use the cdr_flag with dialog module. Works nicely until opensips is restarted while there is an open call. After an opensips restart, calls that were started before the restart do not get an entry in the DB. Not even an old style BYE record. I verified that the dialog was matched using: xlog(L_NOTICE, CID-$ci, fU-$fU, orU-$oU: Loose Route $rm Request - si=$si - next via $rd:$rp\n); if ( $DLG_status == NULL ) { xlog(L_WARN, CID-$ci, fU-$fU, orU-$oU: WARNING: BYE without dialog. NO CDR, just old style rec for BYE in acc table.\n); in the loose routing logic that handles the bye. I get the first message but not the warning. I also ran into this problem previously with media_proxy_engage. It cleans itself up because of no RTP after a bit though and so is not as big of a deal. Am I missing something or is this a bug I need to report? Dave ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Osipsconsole fail to add gateways
Toyima, Try: yum whatprovides '*/md5' '*/md5sum' '*/db_dump' the db_dump should be apparent from that. I'm using Centos and it shows several packages that provide a md5 command but none put it in the path. You could try installing one and linking it into the path to see if that helps. eg.: ln -s /var/lib/imap/md5 /usr/local/bin/ However I'm guessing two things. 1. md5 is not critical as it kept going and stopped after another error. 2. it is not actually wanting md5 but md5sum (provided by package coreutils), the commonly installed program, and the reference needs to be fixed in Osipsconsole. It looks like md5 is a library that some applications include like mail apps and script languages. It also might be that on different platforms, what is named md5sum on ours is named md5 on others like maybe bsd or sun unix for example. I don't know what you are trying to use the console for but for the limited things I need to do with command line stuff I just use the opensipsctl like .../opensipsctl fifo ps. For db stuff I use opensips control pannel web project or just direct sql commands. Dave On Mon, Feb 21, 2011 at 1:17 AM, Toyima Dias toyim...@gmail.com wrote: Hi Dave, This is what i did: root@OpenSIPS home# yum search md5 Loaded plugins: rhnplugin, security Matched: md5 = cyrus-sasl-md5.i386 : CRAM-MD5 and DIGEST-MD5 support for Cyrus SASL. perl-Digest-HMAC.noarch : Digest-HMAC Perl module Then: root@OpenSIPS home# yum install perl-Digest-HMAC.noarch And still not working...i'm working on Red Hat; have found the same problem on google (http://lists.opensips.org/pipermail/users/2010-November/015448.html) to another person and seems that he never solve the situation. Any help will be appreciated. 2011/2/18 Dave Singer dave.sin...@wideideas.com Toyima, It is looking for those executable files. It looks like it first tries db_dump then because that fails tries db4.4_dump. So you need to install the packages that supply md5 and either db_dump or db4.4_dump. Dave On Fri, Feb 18, 2011 at 3:20 AM, Toyima Dias toyim...@gmail.com wrote: Hi Dave, 2011/2/17 Dave Singer dave.sin...@wideideas.com Toyima, Have you configured it to connect to your database? the file opensipsctlrc is already configured to connect to my database where i'm storing domains, locations, subscribers, etc etc...the DB_PATH parameter commented and i don't now how to configure this parameter :S Have you installed packages that provide the commands it was complaining about missing? From what I have seen, db is almost always installed and it may just require it to be there even if it is not used. The messages it is complaining are the following: which: no md5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.4_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) Do i have to install md5, db_dump and db4.4_dump? Dave On Thu, Feb 17, 2011 at 1:50 AM, Toyima Dias toyim...@gmail.com wrote: Hello Dave, 2011/2/17 Dave Singer dave.sin...@wideideas.com Toyima, On Wed, Feb 16, 2011 at 5:55 AM, Toyima Dias toyim...@gmail.com wrote: 2011/2/16 Dave Singer dave.sin...@wideideas.com Toyima, This is the right list. You just have to take into account that no one is getting paid to answer your questions in the list. And sometimes that means waiting a couple days. Best tactic I've seen to keep putting it in front of people is to respond to your own thread with a little update of what you've tried and the results. Ok. Looks like it is looking for some tools: md5 and db ( I think berkley db ) tools. Do you have it configured to connect to your DB opensips base path etc/opensips/osipsconsolerc? Do you mean the configuration of /etc/opensips/opensipsctlrc? if so, i've commented the following line: Yes # database path used by dbtext or db_berkeley #DB_PATH=/usr/local/etc/opensips/dbtext Should i change something? Did your results change at all after commenting it? It was commented by default...i've uncommented and the same result my friend The db connection info in that file should be the same as in your opensips.cfg script, just different format for specifying it. Dave. I'd say configure it if not already, try again and see what it still wants. Then install packages that seem like what it is complaining about
Re: [OpenSIPS-Users] non-transactional 4XX messages
Jason, That is very strange behavior. If there is no matching transaction I think there is no way to catch the message as reply and failure routes are triggered by tm module. I'm not sure since I haven't setup a stateless config. I'm curious too if there is something that can be done here. Dave On Mon, Feb 21, 2011 at 7:08 PM, Tyler Merritt ty...@fonality.com wrote: You know what I do? I add append_hf(GW: BLAH) and change BLAH for each step in the if blocks. Then you can grab a tcpdump and see your custom header. This has helped me ENORMOUSLY during testing to track packet flow. I prefer looking at the packets themselves and the custom headers rather than searching through the logs. It's a bit time consuming to add all the append_hf lines in nearly every if () block, but man, after a while I started seeing the code :) On Tue, Feb 22, 2011 at 11:54 AM, Jason Yeh ja...@streamoso.com wrote: Tyler, Yes, I have already thought the same thing. However that 403 SIP Message didn't land there in the main routing block, yet through pcap traces I could see the SIP Message being routed to the end-user client. I had this basic log of every new messages routed to the main route, for example: route { # Simple Log xlog(L_INFO, M=$rm RURI=$ru F=$fu USR=$tU T=$tu IP=$si ID=$ci\n); I don't see 403 message landed there. I tried to add logic of something like this on main route: # Detect if SIP/2.0 403 Message if ( status == 403 ) { xlog(got SIP 403); } Unfortunately, realized that the status reference of current message would only work for the onreply route I'm sure there is reason for it, most likely developers might can answer that. -Jason On Mon, Feb 21, 2011 at 9:10 PM, Tyler Merritt ty...@fonality.com wrote: I would do this by matching the method of the packet in the main routing block, and then using textops to search for the 403 in a subsequent if () {} block, and then just drop; or exit; My methods are usually not the most elegant solution - I'll wait for Dave or one of the Devs to chime in with a better method :) On Tue, Feb 22, 2011 at 10:09 AM, Jason Yeh ja...@streamoso.com wrote: Hello everyone, This certain SIP UAS keeps on sending SIP/2.0 403 messages to my OpenSIPS machine out of blue, this failure/warning messages has nothing to do with this certain client on the call. I wanted to figure out how to drop (not proxy) that annoying non-transactional 4XX SIP Messages being routed through this proxy server, however I couldn't figure out where to get this message landed to my routing script. Because the fact that this requests wasn't initially sent by proxy, it will not land to the failure_route routing block. In summary, how can I configure OpenSIPS routing logic to handle the non-transactional 4XX request sent by someone else out of blue? Thanks, Jason ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Regards, Jason Yeh Co-Founder CEO Streamoso, LLC. This e-mail, including any attachments may contain information that is protected by law as PRIVILEGED AND CONFIDENTIAL and is intended solely for the use of the recipient or the employee or agent responsible for delivering the message to the recipient. Please note that if you are not the intended recipient, you are hereby notified that any dissemination, copying, distribution, retention, re-transmission, printing or any other use of this e-mail or the information contained herein is strictly prohibited. If you have received this e-mail communication in error, please immediately send an e-mail reply to notify the sender and immediately and permanently delete this e-mail from your computer system. Thank you. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Osipsconsole fail to add gateways
Toyima, It is looking for those executable files. It looks like it first tries db_dump then because that fails tries db4.4_dump. So you need to install the packages that supply md5 and either db_dump or db4.4_dump. Dave On Fri, Feb 18, 2011 at 3:20 AM, Toyima Dias toyim...@gmail.com wrote: Hi Dave, 2011/2/17 Dave Singer dave.sin...@wideideas.com Toyima, Have you configured it to connect to your database? the file opensipsctlrc is already configured to connect to my database where i'm storing domains, locations, subscribers, etc etc...the DB_PATH parameter commented and i don't now how to configure this parameter :S Have you installed packages that provide the commands it was complaining about missing? From what I have seen, db is almost always installed and it may just require it to be there even if it is not used. The messages it is complaining are the following: which: no md5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.4_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) Do i have to install md5, db_dump and db4.4_dump? Dave On Thu, Feb 17, 2011 at 1:50 AM, Toyima Dias toyim...@gmail.com wrote: Hello Dave, 2011/2/17 Dave Singer dave.sin...@wideideas.com Toyima, On Wed, Feb 16, 2011 at 5:55 AM, Toyima Dias toyim...@gmail.com wrote: 2011/2/16 Dave Singer dave.sin...@wideideas.com Toyima, This is the right list. You just have to take into account that no one is getting paid to answer your questions in the list. And sometimes that means waiting a couple days. Best tactic I've seen to keep putting it in front of people is to respond to your own thread with a little update of what you've tried and the results. Ok. Looks like it is looking for some tools: md5 and db ( I think berkley db ) tools. Do you have it configured to connect to your DB opensips base path etc/opensips/osipsconsolerc? Do you mean the configuration of /etc/opensips/opensipsctlrc? if so, i've commented the following line: Yes # database path used by dbtext or db_berkeley #DB_PATH=/usr/local/etc/opensips/dbtext Should i change something? Did your results change at all after commenting it? It was commented by default...i've uncommented and the same result my friend The db connection info in that file should be the same as in your opensips.cfg script, just different format for specifying it. Dave. I'd say configure it if not already, try again and see what it still wants. Then install packages that seem like what it is complaining about not finding. centos example search: yum whatprovides */db_dump Dave On Tue, Feb 15, 2011 at 5:47 AM, Toyima Dias toyim...@gmail.com wrote: Is there any help or mailing list with the use of osipsconsole? may be i'm not asking to the right mailing list :S 2011/2/15 Toyima Dias toyim...@gmail.com Hello, I'm having problems with my opensipsconsole, first, every time i run osipsconsole on the my shell i receive some weird messages, take a look: OpenSIPS:~#osipsconsole which: no md5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.4_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.5_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.6_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.4_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.5_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.6_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin
Re: [OpenSIPS-Users] Osipsconsole fail to add gateways
Toyima, This is the right list. You just have to take into account that no one is getting paid to answer your questions in the list. And sometimes that means waiting a couple days. Best tactic I've seen to keep putting it in front of people is to respond to your own thread with a little update of what you've tried and the results. Looks like it is looking for some tools: md5 and db ( I think berkley db ) tools. Do you have it configured to connect to your DB opensips base path etc/opensips/osipsconsolerc? I'd say configure it if not already, try again and see what it still wants. Then install packages that seem like what it is complaining about not finding. centos example search: yum whatprovides */db_dump Dave On Tue, Feb 15, 2011 at 5:47 AM, Toyima Dias toyim...@gmail.com wrote: Is there any help or mailing list with the use of osipsconsole? may be i'm not asking to the right mailing list :S 2011/2/15 Toyima Dias toyim...@gmail.com Hello, I'm having problems with my opensipsconsole, first, every time i run osipsconsole on the my shell i receive some weird messages, take a look: OpenSIPS:~#osipsconsole which: no md5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.4_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.5_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.6_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.4_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.5_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.6_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) Control engine FIFO loaded OpenSIPS$: As you can see, osipsconsole is opened, but those messages are kind of wear, it shows the $PATH of root, why is this happening? And also, the biggest problem is that i can't add gateways, check the following: OpenSIPS$:address add 0 192.168.1.192 255.255.255.255 5060 UDP Used database is mysql Warn fallback to local workdir ./mysql Retrieving data from table failedYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE ip='192.168.1.192'' at line 1 Introducing the address rule 0 192.168.1.192 255.255.255.255 5060 UDP to the database failed You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( grp, ip, mask, port, proto , context_info ) VALUES ( 0, '192.168.1.192', '255.' at line 1 Execute 'address reload' to synchronize cache and database What should i check to sovle this situation? Best Regards! ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Interproxy Authentication
Juri, If you are looking to get opensips1 itself to respond to a proxy_challange of opensips2 your looking at a headache. Any way you go you'll have to change the way things work to make a special case for opensips1 on opensips2. My suggestion would be to, where you are about to do the proxy_authorize, check if is from opensips1 and if it is skip the proxy_authorize. Example: if ( ! ( $si == IP of opensips1 || proxy_authorize(, subscriber) ) ) { proxy_challenge(, 0); exit; } The source IP, $si, will be checked first and if it is a match, it will short cut and proxy_authorize will not be called. But if both tests fail a proxy_challenge is sent back. If opensips1 is not at a static IP then you would probably want to have opensips1 register, using uac module, with opensips2. On opensips2 you would then do a db lookup to see if the source IP is the same as what opensips registered from. That lookup could be cached so you don't have to do a db call for every call. If this is your case, search recent threads for cache_fetch for some ideas of a similar use. Dave On Wed, Feb 16, 2011 at 1:36 AM, Juri Nysschen j...@greydotelecom.com wrote: Hi All, I want this scenario: UA - Opensips1 - Opensip2 - PSTN Opensips2 has a set of subscribers and verifies authentication against a mysql db, keeps cdrs etc. Opensips1 has a different set of subscribers with db authentication and cdrs. The UA makes a call and is routed from Opensips1 to Opensips2 and then onto the PSTN gateway. My question is how do I impersonate the call made by UA as coming from a valid subscriber known to Opensips2? Currently I use asterisk to perform this role, but would ideally like to remove it from the chain: UA - Opensips1 - Asterisk - Opensips2 - PSTN Regards Juri Nysschen ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Osipsconsole fail to add gateways
Toyima, On Wed, Feb 16, 2011 at 5:55 AM, Toyima Dias toyim...@gmail.com wrote: 2011/2/16 Dave Singer dave.sin...@wideideas.com Toyima, This is the right list. You just have to take into account that no one is getting paid to answer your questions in the list. And sometimes that means waiting a couple days. Best tactic I've seen to keep putting it in front of people is to respond to your own thread with a little update of what you've tried and the results. Ok. Looks like it is looking for some tools: md5 and db ( I think berkley db ) tools. Do you have it configured to connect to your DB opensips base path etc/opensips/osipsconsolerc? Do you mean the configuration of /etc/opensips/opensipsctlrc? if so, i've commented the following line: Yes # database path used by dbtext or db_berkeley #DB_PATH=/usr/local/etc/opensips/dbtext Should i change something? Did your results change at all after commenting it? The db connection info in that file should be the same as in your opensips.cfg script, just different format for specifying it. Dave. I'd say configure it if not already, try again and see what it still wants. Then install packages that seem like what it is complaining about not finding. centos example search: yum whatprovides */db_dump Dave On Tue, Feb 15, 2011 at 5:47 AM, Toyima Dias toyim...@gmail.com wrote: Is there any help or mailing list with the use of osipsconsole? may be i'm not asking to the right mailing list :S 2011/2/15 Toyima Dias toyim...@gmail.com Hello, I'm having problems with my opensipsconsole, first, every time i run osipsconsole on the my shell i receive some weird messages, take a look: OpenSIPS:~#osipsconsole which: no md5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.4_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.5_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.6_dump in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.4_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.5_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) which: no db4.6_load in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/sbin:/sbin/:/usr/bin) Control engine FIFO loaded OpenSIPS$: As you can see, osipsconsole is opened, but those messages are kind of wear, it shows the $PATH of root, why is this happening? And also, the biggest problem is that i can't add gateways, check the following: OpenSIPS$:address add 0 192.168.1.192 255.255.255.255 5060 UDP Used database is mysql Warn fallback to local workdir ./mysql Retrieving data from table failedYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE ip='192.168.1.192'' at line 1 Introducing the address rule 0 192.168.1.192 255.255.255.255 5060 UDP to the database failed You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( grp, ip, mask, port, proto , context_info ) VALUES ( 0, '192.168.1.192', '255.' at line 1 Execute 'address reload' to synchronize cache and database What should i check to sovle this situation? Best Regards! ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] FW: CANCELs with no transaction
Juri, You should be able to get to it with $(hdr(via){param.value,branch}) But forcing it on the outbound cancel would probably be quite a trick since opensips wants to add It's via header automatically and that top via is what the next hop is counting on for matching the call. I think your best bet is to use the MI t_uac_cancel command as described last time. With it you don't have to same anything from the INVITE. You just use the callid and cseq from the CANCEL to pass to the MI command t_uac_cancel. Be aware you may have linux and selinux permissions conflicts for executing opensipsctl from inside opensips. I posted in a thread a thing about dealing with selinux in the last couple months that makes it quite easy if selinux is a problem and to see if it is the problem. Your command would be something like: exec(/usr/local/opensips/sbin/opensipsctl fifo t_uac_cancel $ci $cs); Don't forget to make sure the source canceling the call gets the response they are looking for so they don't keep sending you cancels and you keep doing the exec over and over. Dave On Tue, Feb 15, 2011 at 5:52 AM, Juri Nysschen j...@greydotelecom.com wrote: Hi Dave I have used wireshark to review the cancel message on a call timeout (which works) and when received from the UA. The difference is in the branch= value as you predicted. How can I save the branch value on the INVITE and then change it on the CANCEL? I've tried all sorts of combinations for $branch but the vales are always NULL Regards Juri Nysschen -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Dave Singer Sent: Monday, February 14, 2011 10:16 PM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] FW: CANCELs with no transaction Juri, This was gnawing at me so I searched and found the official answer of what a CANCEL should look like. Go to http://www.ietf.org/rfc/rfc3261.txt and search for 9 Canceling a Request From what I read it basically says that the CANCEL should be nearly identical to the INVITE it is canceling (without some headers that aren't useful in a cancel like Supported) It seems that the branch= , a Magic Cookie, on the top most via line is a turbo lookup to finding the transaction. That matches the original INVITE and all is well. If it is not there then it has to compare all the pertinent headers between invite and cancel. So if you can't get them to send the proper stuff, you could modify the previous hack to store the branch=... that opensips put in the via header it added (probably can't see it when sending the invite but it is in the 1xx response to your invite. Actually I just found one better I think. Use the exec module to execute MI command t_uac_cancel (http://www.opensips.org/html/docs/modules/1.6.x/tm.html#id294623) All it needs are callid and cseq num, which I hope at least they are the same as the INVITE, which you can use the CANCEL's parsed vars for the params. I you will probably need to send back a negative response to the bad CANCEL like 400 Bad Message (look up appropriate code/message). And I think the t_uac_cancel will also push into failure_route a 487 response, which if you don't choose anything else specifically, will be sent back to the originator. You will want to verify it with packet captures and see how it affects your cdrs. Let me know the outcome. Dave On Mon, Feb 14, 2011 at 11:05 AM, Dave Singer dave.sin...@wideideas.com wrote: I was half expecting that kind of result. I don't know what exactly opensips uses to match transactions. I believe Call-id and CSeq headers being the same but I'm quite sure there is more like maybe from tag? I don't know. Can anyone else chime in on what opensips is checking to match a transaction. Dave. On Sun, Feb 13, 2011 at 11:36 PM, Juri Nysschen j...@greydotelecom.com wrote: Hi Dave, Thanks this method is very successful in delivering the CANCEL downstream, over multiple hops, unfortunately the PSTN also doesn't see the transaction id and therefore the call keeps ringing. The key is finding the reason why the transaction id disappears or at least be able to put it back when delivering the CANCEL downstream. Regards Juri Nysschen -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Dave Singer Sent: Monday, February 14, 2011 9:03 AM To: ty...@fonality.com; OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] FW: CANCELs with no transaction Juri, You say it only happens after a do_routing(). To be clear, you mean that you used do_routing on the invite and not that you already tried do_routing for the cancel earlier in the script. (I'm not sure it would make any difference) The hack to store the destination in a variable is one you would want to strongly avoid. But sometimes hacks are unavoidable and a stop gap until you
Re: [OpenSIPS-Users] Basic doubt of sip routing
Toyima, The client does NOT have to use NAPTR or SRV. It can use regular A or CNAM records as well or even just an IP. (unless it is a half baked client) SRV and NAPTR are special DNS records that can be used tell the client what services are available and where and how to connect to them. If your starting out, don't worry about them. When you start to get into failover and load balancing, then give them a look over. If other service is providing them for opensips to use, nothing special to do for opensips, it does that all automatically. The most common use of opensips it to take a call request to a phone number and decide where the next place to send that call request. A super simplified two steps: 1 lookup if the called number belongs to one of your customers. If so send it to them. 2 If no above, then lookup if the source of the call is one of your customers. If so send the call through a carrier that can get it to the owner of the number. (basically PSTN -- regular telephone networks) There are many ways that opensips can accomplish those tasks. As Adrian said about choosing where to send it can be done, there are multiple ways to check where the call came from and if want to send the call on, like authentication via DB or radius, static source IP in script, a module like dynamic_routing, or even a custom sql query. It all depends on your needs. If your just getting started, there are some good recommendations in some fairly recent email threads for where to start using what resources. Dave On Fri, Feb 11, 2011 at 5:16 AM, Toyima Dias toyim...@gmail.com wrote: COOL Adrian...many thanks for your kindly answers...by the way, i've checked on the rfc that the client must use NAPTR and SRV to resolve domains! 2011/2/11 Adrian Georgescu a...@ag-projects.com If your SIP device support dialing only phone numbers, you need a translation mechanism, this you can implement in the SIP proxy. You can use standard ENUM (http://www.faqs.org/rfc/rfc3764.txt), local database lookups, configuration logic to translate the number into a fully qualified SIP address or many other methods, there are plenty of OpenSIPS modules that do such phone number translation. Adrian On Feb 11, 2011, at 2:04 PM, Toyima Dias wrote: create...got it...that means that if i have a phone registered in proxy A, and i want to call userB, A has no idea where B resides, at all...how does A know the domain of B? he must put in the RURI of the invite userB@domain_of_b, right? how does A knows the domain of B? does A must press in the phone: usearB(a number)@DOMAIN_OF_B? sorry for many questions, keep reading the rfc... 2011/2/11 Adrian Georgescu a...@ag-projects.com SIP routing works exactly like email. How did you know to email this list? Adrian On Feb 11, 2011, at 1:42 PM, Toyima Dias wrote: Thanks Adrian... So...how does ALice now that bob is in the biloxi.com domain? per the rfc 3263 section 4 (client usage) the ua must use DNS to determine where to send a call...but i have a softphone righ now, and i'm trying to make a call like this: 234...@proxy2.com (inserted by me), not just puting the numbermaybe i'm saying something crazy, but i'm confuse! 2011/2/11 Adrian Georgescu a...@ag-projects.com The SIP proxy lookups up the domain part, what appears after the @ sign before any parameters separated by ; if is an IP address like in your example you do not perform a DNS lookup you just send the packet there. In the request URI you must put the address of the remote end, not your own address. In your example user A calls user 264512380973 on the same Proxy and not a remote one. See the illustrated examples from: http://www.tech-invite.com/Ti-sip-ex3261.html Adrian On Feb 11, 2011, at 1:17 PM, Toyima Dias wrote: Adrian, i'm checking the rfc...but even i have a question...when UA sends an INVITE to it's proxy to a phone for example (obviously not registered on the proxy), the proxy will check the RURI of this invite and it will se the following: user A sends the invite to its proxy : INVITE sip:264512380973@172.30.140.57;transport=UDP SIP/2.0 (172.30.140.57 is the IP of proxy A) Where does the DNS takes part? the domain is it's ip address...i'm quite confuse, any help would b e appreciated Thanks 2011/2/11 Toyima Dias toyim...@gmail.com Thanks Adrian...reading the RFC3263! Thanks! 2011/2/11 Adrian Georgescu a...@ag-projects.com The proxy is using DNS to lookup the destination server. Google for RFC 3263 Adrian On Feb 11, 2011, at 10:19 AM, Toyima Dias wrote: Hello community, I have a doubt, how does a SIP Proxy (OpenSIPS) would handle a call for a domain that he doesn't now? i mean...user A is registered in proxy AA, if A wants to call to another user in another domain (not registered in the Proxy AA) how does this proxy should handle the call? how does he now where to send this call? Any clarification would be appreciated :)
Re: [OpenSIPS-Users] Weird behaviour
Juri, Thanks for the compliment! Great addition yourself! I hadn't looked at the premissions module before and it looks to be a good resource for potentially many tasks. Using it as you show would be much faster than trying to do db lookup and cache_store method! Only one thing, you are only showing to do it for OPTIONS, what about NOTIFY? Dave, On Sun, Feb 13, 2011 at 11:40 PM, Juri Nysschen j...@greydotelecom.com wrote: Hi All Filtering OPTIONs is brilliant, I've taken it one step further by also filtering against the opensips address table. So if the ip is listed in the table OR had registered beforehand there will be a reply on the OPTIONs message: if (is_method(OPTIONS)){ xlog(L_INFO,OPTIONS [$fd/$fu/$rd/$ru/$si/]\n); if (check_source_address(1)) || (cache_fetch(local,ip_allowed_$si,$avp(i:60))){ xlog(L_INFO,OPTIONS OK [$fd/$fu/$rd/$ru/$si/]\n); sl_send_reply(200, Got it); exit; }; drop; }; On a successful register: cache_store(local,ip_allowed_$si,$si,1200); Regards Juri Nysschen -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Adrian Vasile Sent: Saturday, February 12, 2011 9:26 AM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Weird behaviour That's why I dropped the ideea of having numbered usernames. On Feb 11, 2011, at 10:45 PM, Dave Singer wrote: Adrian, Probably want to only respond to registers that are to valid user accounts, drop the rest, as they start scanning with like 100, 101, ., 5000, etc Dave On Fri, Feb 11, 2011 at 6:25 AM, Adrian Vasile y...@opennet.ro wrote: Hi Dave, Yeah, you're right.. Basically allow only REGISTER requests from anywhere and the rest check the source ip. Great ideea. I will implement it as soon as possible. Thanks, Adrian Vasile y...@opennet.ro On Feb 10, 2011, at 10:41 PM, Dave Singer wrote: Adrian, I was just thinking about the implementing no response for INVITE a little more... You would want to handle the response checking similar to the register. If not found in the cache where you check the location table if there is a registered user at the source ip. That way it can handle opensips reboots and other situations where the cache is lost or unavailable. Like a memcached server fails. Advantage to using external memcached vs local cache would be that cache would not be cleared on opensips restart. Dave On Thu, Feb 10, 2011 at 11:16 AM, Dave Singer dave.sin...@wideideas.com wrote: I've found that generally they start out with the sip NOTIFY or OPTIONS message. So recently I set in the script to drop them from sources I'm not expecting them from. Might not work so well for some situation like ATA's sending pings for nat keep alives. But for the nat to keep open, generally it doesn't need a response, just as long as they keep sending the packets. Some devices I've seen actually send essentially an empty packet to the sip port, just enough to keep the nat alive but opensips just discards it because it is empty. The one I do send a reply to is my network monitoring server. Kind of helpful to know when things stop responding. :-) If an ATA model need to actually get a reply you could on registration check the model listed in the sip agent header and use localcache or memcached to store the source IP as ok to respond to. See http://www.opensips.org/Resources/DocsCoreFcn16#toc98 cache_store and cache_fetch at registration something like save(location); cache_store(local, ping_ok_$si, ok, 86000); and at ping if ( $rm =~ OPTIONS|NOTIFY ) { if( $si == monitor server || $cache_fetch(local, pingok_$si, $avp(i:5)) { sl_send_reply(200, Ok); } drop; } Might not need pike if they never start the brute force scan because they didn't get the initial reply. I just came up with this the other day so it is an unproved theory. The other day I left a packet capture running over night on the testing server and in the morning I saw all the failed register attempts. I looked back to the first packet from the registering source and found the first one was an OPTIONS packet and thus my theory. Could apply it to INVITE and other messages. For registrations if there wasn't a hit in the cache you would want to do a db lookup to see if the from user is one of yours. But generally that would only be for a first time registration since registrations usually happen every 30 min. (This is just brainstorming) ;-) Let me know if you implement some of it and what results you find. Dave On Thu, Feb 10, 2011 at 10:28 AM, Adrian Vasile y...@opennet.ro wrote: I know of these issues. And all client are either behind NAT either separate voice vlans. As for securing the proxy. What methods either than Pike combined
Re: [OpenSIPS-Users] FW: CANCELs with no transaction
I was half expecting that kind of result. I don't know what exactly opensips uses to match transactions. I believe Call-id and CSeq headers being the same but I'm quite sure there is more like maybe from tag? I don't know. Can anyone else chime in on what opensips is checking to match a transaction. Dave. On Sun, Feb 13, 2011 at 11:36 PM, Juri Nysschen j...@greydotelecom.com wrote: Hi Dave, Thanks this method is very successful in delivering the CANCEL downstream, over multiple hops, unfortunately the PSTN also doesn't see the transaction id and therefore the call keeps ringing. The key is finding the reason why the transaction id disappears or at least be able to put it back when delivering the CANCEL downstream. Regards Juri Nysschen -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Dave Singer Sent: Monday, February 14, 2011 9:03 AM To: ty...@fonality.com; OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] FW: CANCELs with no transaction Juri, You say it only happens after a do_routing(). To be clear, you mean that you used do_routing on the invite and not that you already tried do_routing for the cancel earlier in the script. (I'm not sure it would make any difference) The hack to store the destination in a variable is one you would want to strongly avoid. But sometimes hacks are unavoidable and a stop gap until you can really resolve the problem. I believe $avp's are retained per transaction and if the t_check_trans() fails then the $avp created in the reply would also not be available. $var also would not work most of the time since it is persistent per process. You would need to use core functions cache_store and cache_fetch using either local_cache or memcached backend depending if you need persistant between opensips reboot. Example: route{ . if (is_method(CANCEL) ) { route(5); # drop media proxy if (t_check_trans()){ # this always fails after a do_routing() xlog(L_INFO,CANCEL Transaction[$fd/$fu/$rd/$ru/$si/]\n); t_relay(); exit; } else { if ( cache_fetch(local, tran_dest_$ci, $avp(s:next_hop)) ) { $rd = $avp(s:next_hop); t_relay(); } exit; } } on_reply[main] { cache_store(local, tran_dest_$ci, $si, 500); } Dave On Sun, Feb 13, 2011 at 5:15 AM, Tyler Merritt ty...@fonality.com wrote: Why not use an $avp and grab the Call ID header on the inbound packet and then create some routing logic that checks the $avp against the return packet Call ID header to validate it's the same thing? $avps can be made available onreply with a modparam though forgive me if it's a bit late at night and I don't have the link handy. An avp can store more than a single value but they index in reverse order as written if I recall correctly. On Sat, Feb 12, 2011 at 5:05 AM, Russell Bierschbach rbierschb...@telepointglobal.com wrote: I have a similar problem, but not solution, my probably is actually occurring because the originating UA is ignoring a contact header that is sent back during a 183 progress message. OpenSIPS uses information from that contact header to figure out where to relay the incoming message (BYE in my case, CANCEL in yours). It seems like it would be possible for OpenSIPS to use a call-id or tag to determine where to relay the message though. Russell Bierschbach em: rbierschb...@telepointglobal.com, im: rbierschb...@hotmail.com From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Juri Nysschen Sent: Friday, February 11, 2011 7:44 AM To: users@lists.opensips.org Subject: [OpenSIPS-Users] FW: CANCELs with no transaction Hi All, Need help with a nagging issue: UA-Opensips 1-Opensips 2-PSTN UA sends an invite on Opensips 1, and is routed via do_routing() to Opensips 2, Opensips 2 uses do_routing to get to the PSTN, call starts ringing. UA cancels call before answer, but now t_check_trans fails and the CANCEL is not passed onto the PSTN, with the result that the call rings forever and can only be terminated by the remote answering and dropping the call or through a timeout. The scripts on Opensips 1 Opensips 2 is virtuall identical: How do I get the CANCEL to the PSTN ? route{ . if (is_method(CANCEL) ) { route(5); # drop media proxy if (t_check_trans()){ # this always fails after a do_routing() xlog(L_INFO,CANCEL Transaction[$fd/$fu/$rd/$ru/$si/]\n); t_relay(); exit; }; exit; } } route[4] { xlog(L_INFO,Route4 [$fd/$fu/$rd/$ru/$si/]\n); $avp(i:102)=1; # Default dr-group route(10); # Do
Re: [OpenSIPS-Users] FW: CANCELs with no transaction
Juri, You say it only happens after a do_routing(). To be clear, you mean that you used do_routing on the invite and not that you already tried do_routing for the cancel earlier in the script. (I'm not sure it would make any difference) The hack to store the destination in a variable is one you would want to strongly avoid. But sometimes hacks are unavoidable and a stop gap until you can really resolve the problem. I believe $avp's are retained per transaction and if the t_check_trans() fails then the $avp created in the reply would also not be available. $var also would not work most of the time since it is persistent per process. You would need to use core functions cache_store and cache_fetch using either local_cache or memcached backend depending if you need persistant between opensips reboot. Example: route{ . if (is_method(CANCEL) ) { route(5); # drop media proxy if (t_check_trans()){ # this always fails after a do_routing() xlog(L_INFO,CANCEL Transaction[$fd/$fu/$rd/$ru/$si/]\n); t_relay(); exit; } else { if ( cache_fetch(local, tran_dest_$ci, $avp(s:next_hop)) ) { $rd = $avp(s:next_hop); t_relay(); } exit; } } on_reply[main] { cache_store(local, tran_dest_$ci, $si, 500); } Dave On Sun, Feb 13, 2011 at 5:15 AM, Tyler Merritt ty...@fonality.com wrote: Why not use an $avp and grab the Call ID header on the inbound packet and then create some routing logic that checks the $avp against the return packet Call ID header to validate it's the same thing? $avps can be made available onreply with a modparam though forgive me if it's a bit late at night and I don't have the link handy. An avp can store more than a single value but they index in reverse order as written if I recall correctly. On Sat, Feb 12, 2011 at 5:05 AM, Russell Bierschbach rbierschb...@telepointglobal.com wrote: I have a similar problem, but not solution, my probably is actually occurring because the originating UA is ignoring a contact header that is sent back during a 183 progress message. OpenSIPS uses information from that contact header to figure out where to relay the incoming message (BYE in my case, CANCEL in yours). It seems like it would be possible for OpenSIPS to use a call-id or tag to determine where to relay the message though. Russell Bierschbach em: rbierschb...@telepointglobal.com, im: rbierschb...@hotmail.com From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Juri Nysschen Sent: Friday, February 11, 2011 7:44 AM To: users@lists.opensips.org Subject: [OpenSIPS-Users] FW: CANCELs with no transaction Hi All, Need help with a nagging issue: UA-Opensips 1-Opensips 2-PSTN UA sends an invite on Opensips 1, and is routed via do_routing() to Opensips 2, Opensips 2 uses do_routing to get to the PSTN, call starts ringing. UA cancels call before answer, but now t_check_trans fails and the CANCEL is not passed onto the PSTN, with the result that the call rings forever and can only be terminated by the remote answering and dropping the call or through a timeout. The scripts on Opensips 1 Opensips 2 is virtuall identical: How do I get the CANCEL to the PSTN ? route{ . if (is_method(CANCEL) ) { route(5); # drop media proxy if (t_check_trans()){ # this always fails after a do_routing() xlog(L_INFO,CANCEL Transaction[$fd/$fu/$rd/$ru/$si/]\n); t_relay(); exit; }; exit; } } route[4] { xlog(L_INFO,Route4 [$fd/$fu/$rd/$ru/$si/]\n); $avp(i:102)=1; # Default dr-group route(10); # Do custom stuff t_on_failure(4); if (do_routing($avp(i:102))){ xlog(L_INFO,Route4 Route to Dyna Group: $avp(i:102)[$fd/$fu/$rd/$ru/$si/]\n); t_newtran(); route(1); exit; }; xlog(L_INFO,Route4 No Route to Host[$fd/$fu/$rd/$ru/$si/]\n); sl_reply_error(); exit; } Regards Juri Nysschen ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Weird behaviour
Adrian, Probably want to only respond to registers that are to valid user accounts, drop the rest, as they start scanning with like 100, 101, ., 5000, etc Dave On Fri, Feb 11, 2011 at 6:25 AM, Adrian Vasile y...@opennet.ro wrote: Hi Dave, Yeah, you're right.. Basically allow only REGISTER requests from anywhere and the rest check the source ip. Great ideea. I will implement it as soon as possible. Thanks, Adrian Vasile y...@opennet.ro On Feb 10, 2011, at 10:41 PM, Dave Singer wrote: Adrian, I was just thinking about the implementing no response for INVITE a little more... You would want to handle the response checking similar to the register. If not found in the cache where you check the location table if there is a registered user at the source ip. That way it can handle opensips reboots and other situations where the cache is lost or unavailable. Like a memcached server fails. Advantage to using external memcached vs local cache would be that cache would not be cleared on opensips restart. Dave On Thu, Feb 10, 2011 at 11:16 AM, Dave Singer dave.sin...@wideideas.com wrote: I've found that generally they start out with the sip NOTIFY or OPTIONS message. So recently I set in the script to drop them from sources I'm not expecting them from. Might not work so well for some situation like ATA's sending pings for nat keep alives. But for the nat to keep open, generally it doesn't need a response, just as long as they keep sending the packets. Some devices I've seen actually send essentially an empty packet to the sip port, just enough to keep the nat alive but opensips just discards it because it is empty. The one I do send a reply to is my network monitoring server. Kind of helpful to know when things stop responding. :-) If an ATA model need to actually get a reply you could on registration check the model listed in the sip agent header and use localcache or memcached to store the source IP as ok to respond to. See http://www.opensips.org/Resources/DocsCoreFcn16#toc98 cache_store and cache_fetch at registration something like save(location); cache_store(local, ping_ok_$si, ok, 86000); and at ping if ( $rm =~ OPTIONS|NOTIFY ) { if( $si == monitor server || $cache_fetch(local, pingok_$si, $avp(i:5)) { sl_send_reply(200, Ok); } drop; } Might not need pike if they never start the brute force scan because they didn't get the initial reply. I just came up with this the other day so it is an unproved theory. The other day I left a packet capture running over night on the testing server and in the morning I saw all the failed register attempts. I looked back to the first packet from the registering source and found the first one was an OPTIONS packet and thus my theory. Could apply it to INVITE and other messages. For registrations if there wasn't a hit in the cache you would want to do a db lookup to see if the from user is one of yours. But generally that would only be for a first time registration since registrations usually happen every 30 min. (This is just brainstorming) ;-) Let me know if you implement some of it and what results you find. Dave On Thu, Feb 10, 2011 at 10:28 AM, Adrian Vasile y...@opennet.ro wrote: I know of these issues. And all client are either behind NAT either separate voice vlans. As for securing the proxy. What methods either than Pike combined with fail2ban would you advise? And I finally found the culprit. Auth INVITE: When enabled, authorization is required for initial incoming INVITE requests from the SIP proxy. On Feb 10, 2011, at 6:57 PM, Dave Singer wrote: Adrian, There are lots of people out there with servers doing sip scans to see if an ip will respond to a sip ping (NOTIFY or OPTIONS message). Then they will either try to send register and/or invites for all sorts of numbers trying to get a hit. Of course the invites are not actual calls so if the sip scanner gets an ATA, the customer answers the phone and there is no one there. Depending on the scanner it may keep trying through it's whole list of common sip source accounts. Then it can get interesting. The scanner would then mark the IP as a success and the hacker can then start trying to send calls through it. Though likely they would try a call to something like a Home Depot number and when the customer answers they just say sorry wrong number and mark the IP off their list. Customer is left alone till the next scanner comes sniffing. So ATA's many times have settings for not answering calls from places that shouldn't be sending them calls. The options are usually something like calls ok: from register server, from proxy server, call to registered user, auth call or similar. See what you can find in the docs for that model. Dave On Thu, Feb 10, 2011 at 5:07 AM, Adrian Vasile y...@opennet.ro wrote: Hi, I attached the trace. why does the cisco spa ask
Re: [OpenSIPS-Users] Weird behaviour
Adrian, There are lots of people out there with servers doing sip scans to see if an ip will respond to a sip ping (NOTIFY or OPTIONS message). Then they will either try to send register and/or invites for all sorts of numbers trying to get a hit. Of course the invites are not actual calls so if the sip scanner gets an ATA, the customer answers the phone and there is no one there. Depending on the scanner it may keep trying through it's whole list of common sip source accounts. Then it can get interesting. The scanner would then mark the IP as a success and the hacker can then start trying to send calls through it. Though likely they would try a call to something like a Home Depot number and when the customer answers they just say sorry wrong number and mark the IP off their list. Customer is left alone till the next scanner comes sniffing. So ATA's many times have settings for not answering calls from places that shouldn't be sending them calls. The options are usually something like calls ok: from register server, from proxy server, call to registered user, auth call or similar. See what you can find in the docs for that model. Dave On Thu, Feb 10, 2011 at 5:07 AM, Adrian Vasile y...@opennet.ro wrote: Hi, I attached the trace. why does the cisco spa ask for authorization? Thanks, Adrian Vasile y...@opennet.ro On Feb 10, 2011, at 12:42 PM, Laszlo wrote: Hi Adrian, 2011/2/10 Adrian Vasile y...@opennet.ro Hello all, Maybe it has happened to you too.. I've got a couple of cisco spa504g everything is fine with them, registering, calling out, but there seems to be a problem with the calling in feature.. When I try to call the spa's all they return is 403 Forbidden. Any ideas how I could remedy the situation? Try to capture one call with ngrep, and post here the output. Use ngrep like this: ngrep 'xxx' port 5060 -Wbyline -q -dany -t mytrace.txt (where xxx is the number/extension what you going to trace) Thanks, Adrian Vasile y...@opennet.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Weird behaviour
I've found that generally they start out with the sip NOTIFY or OPTIONS message. So recently I set in the script to drop them from sources I'm not expecting them from. Might not work so well for some situation like ATA's sending pings for nat keep alives. But for the nat to keep open, generally it doesn't need a response, just as long as they keep sending the packets. Some devices I've seen actually send essentially an empty packet to the sip port, just enough to keep the nat alive but opensips just discards it because it is empty. The one I do send a reply to is my network monitoring server. Kind of helpful to know when things stop responding. :-) If an ATA model need to actually get a reply you could on registration check the model listed in the sip agent header and use localcache or memcached to store the source IP as ok to respond to. See http://www.opensips.org/Resources/DocsCoreFcn16#toc98 cache_store and cache_fetch at registration something like save(location); cache_store(local, ping_ok_$si, ok, 86000); and at ping if ( $rm =~ OPTIONS|NOTIFY ) { if( $si == monitor server || $cache_fetch(local, pingok_$si, $avp(i:5)) { sl_send_reply(200, Ok); } drop; } Might not need pike if they never start the brute force scan because they didn't get the initial reply. I just came up with this the other day so it is an unproved theory. The other day I left a packet capture running over night on the testing server and in the morning I saw all the failed register attempts. I looked back to the first packet from the registering source and found the first one was an OPTIONS packet and thus my theory. Could apply it to INVITE and other messages. For registrations if there wasn't a hit in the cache you would want to do a db lookup to see if the from user is one of yours. But generally that would only be for a first time registration since registrations usually happen every 30 min. (This is just brainstorming) ;-) Let me know if you implement some of it and what results you find. Dave On Thu, Feb 10, 2011 at 10:28 AM, Adrian Vasile y...@opennet.ro wrote: I know of these issues. And all client are either behind NAT either separate voice vlans. As for securing the proxy. What methods either than Pike combined with fail2ban would you advise? And I finally found the culprit. Auth INVITE: When enabled, authorization is required for initial incoming INVITE requests from the SIP proxy. On Feb 10, 2011, at 6:57 PM, Dave Singer wrote: Adrian, There are lots of people out there with servers doing sip scans to see if an ip will respond to a sip ping (NOTIFY or OPTIONS message). Then they will either try to send register and/or invites for all sorts of numbers trying to get a hit. Of course the invites are not actual calls so if the sip scanner gets an ATA, the customer answers the phone and there is no one there. Depending on the scanner it may keep trying through it's whole list of common sip source accounts. Then it can get interesting. The scanner would then mark the IP as a success and the hacker can then start trying to send calls through it. Though likely they would try a call to something like a Home Depot number and when the customer answers they just say sorry wrong number and mark the IP off their list. Customer is left alone till the next scanner comes sniffing. So ATA's many times have settings for not answering calls from places that shouldn't be sending them calls. The options are usually something like calls ok: from register server, from proxy server, call to registered user, auth call or similar. See what you can find in the docs for that model. Dave On Thu, Feb 10, 2011 at 5:07 AM, Adrian Vasile y...@opennet.ro wrote: Hi, I attached the trace. why does the cisco spa ask for authorization? Thanks, Adrian Vasile y...@opennet.ro On Feb 10, 2011, at 12:42 PM, Laszlo wrote: Hi Adrian, 2011/2/10 Adrian Vasile y...@opennet.ro Hello all, Maybe it has happened to you too.. I've got a couple of cisco spa504g everything is fine with them, registering, calling out, but there seems to be a problem with the calling in feature.. When I try to call the spa's all they return is 403 Forbidden. Any ideas how I could remedy the situation? Try to capture one call with ngrep, and post here the output. Use ngrep like this: ngrep 'xxx' port 5060 -Wbyline -q -dany -t mytrace.txt (where xxx is the number/extension what you going to trace) Thanks, Adrian Vasile y...@opennet.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http
Re: [OpenSIPS-Users] Weird behaviour
Adrian, I was just thinking about the implementing no response for INVITE a little more... You would want to handle the response checking similar to the register. If not found in the cache where you check the location table if there is a registered user at the source ip. That way it can handle opensips reboots and other situations where the cache is lost or unavailable. Like a memcached server fails. Advantage to using external memcached vs local cache would be that cache would not be cleared on opensips restart. Dave On Thu, Feb 10, 2011 at 11:16 AM, Dave Singer dave.sin...@wideideas.com wrote: I've found that generally they start out with the sip NOTIFY or OPTIONS message. So recently I set in the script to drop them from sources I'm not expecting them from. Might not work so well for some situation like ATA's sending pings for nat keep alives. But for the nat to keep open, generally it doesn't need a response, just as long as they keep sending the packets. Some devices I've seen actually send essentially an empty packet to the sip port, just enough to keep the nat alive but opensips just discards it because it is empty. The one I do send a reply to is my network monitoring server. Kind of helpful to know when things stop responding. :-) If an ATA model need to actually get a reply you could on registration check the model listed in the sip agent header and use localcache or memcached to store the source IP as ok to respond to. See http://www.opensips.org/Resources/DocsCoreFcn16#toc98 cache_store and cache_fetch at registration something like save(location); cache_store(local, ping_ok_$si, ok, 86000); and at ping if ( $rm =~ OPTIONS|NOTIFY ) { if( $si == monitor server || $cache_fetch(local, pingok_$si, $avp(i:5)) { sl_send_reply(200, Ok); } drop; } Might not need pike if they never start the brute force scan because they didn't get the initial reply. I just came up with this the other day so it is an unproved theory. The other day I left a packet capture running over night on the testing server and in the morning I saw all the failed register attempts. I looked back to the first packet from the registering source and found the first one was an OPTIONS packet and thus my theory. Could apply it to INVITE and other messages. For registrations if there wasn't a hit in the cache you would want to do a db lookup to see if the from user is one of yours. But generally that would only be for a first time registration since registrations usually happen every 30 min. (This is just brainstorming) ;-) Let me know if you implement some of it and what results you find. Dave On Thu, Feb 10, 2011 at 10:28 AM, Adrian Vasile y...@opennet.ro wrote: I know of these issues. And all client are either behind NAT either separate voice vlans. As for securing the proxy. What methods either than Pike combined with fail2ban would you advise? And I finally found the culprit. Auth INVITE: When enabled, authorization is required for initial incoming INVITE requests from the SIP proxy. On Feb 10, 2011, at 6:57 PM, Dave Singer wrote: Adrian, There are lots of people out there with servers doing sip scans to see if an ip will respond to a sip ping (NOTIFY or OPTIONS message). Then they will either try to send register and/or invites for all sorts of numbers trying to get a hit. Of course the invites are not actual calls so if the sip scanner gets an ATA, the customer answers the phone and there is no one there. Depending on the scanner it may keep trying through it's whole list of common sip source accounts. Then it can get interesting. The scanner would then mark the IP as a success and the hacker can then start trying to send calls through it. Though likely they would try a call to something like a Home Depot number and when the customer answers they just say sorry wrong number and mark the IP off their list. Customer is left alone till the next scanner comes sniffing. So ATA's many times have settings for not answering calls from places that shouldn't be sending them calls. The options are usually something like calls ok: from register server, from proxy server, call to registered user, auth call or similar. See what you can find in the docs for that model. Dave On Thu, Feb 10, 2011 at 5:07 AM, Adrian Vasile y...@opennet.ro wrote: Hi, I attached the trace. why does the cisco spa ask for authorization? Thanks, Adrian Vasile y...@opennet.ro On Feb 10, 2011, at 12:42 PM, Laszlo wrote: Hi Adrian, 2011/2/10 Adrian Vasile y...@opennet.ro Hello all, Maybe it has happened to you too.. I've got a couple of cisco spa504g everything is fine with them, registering, calling out, but there seems to be a problem with the calling in feature.. When I try to call the spa's all they return is 403 Forbidden. Any ideas how I could remedy the situation? Try to capture one call with ngrep, and post here
Re: [OpenSIPS-Users] Control Panel Dialog config for multiple servers
Cinthia, I'm fairly new to OCP myself, just got it running about a month ago. Since no one with more experience responded, I'll help if I can. Sounds like you have it all setup and working as designed. Looking at my system that I have connected to two servers, it looks like the dialog module section of OCP just is not yet developed to use the server selection drop down like the MI section. I'm not using dialog on the servers that I'm connecting it to so I can see what the report looks like. Have you using the dialog MI commands like dlg_list in the MI page? Is the output acceptable for your purposes? You could use the MI page as an example and modify the php scripts in OCP to implement the server drop down functionality. I would be willing to do it for some compensation and submit it to the project on completion. I modifying OCP a fair bit so I could use ssh with a key file to connect to a remote host and run the fifo commands through the opensipsctl script because it took less time to get that to work than getting xml_rpc to compile and work in opensips. It is in a state of it is working great for me. :-) I'm planning on submitting my enhancements to the project after making it work more generically (using boxes.global.inc.php fully rather than hard coding some of my settings) and its worked for a while with me poking and prodding it. Hope this helps, Dave On Tue, Feb 8, 2011 at 6:35 PM, Daniel Goepp d...@goepp.net wrote: I have not seen a response to this question yet, and it is of particular interest to me. I don't suppose anyone has any comments on getting OCP to query multiple servers. Thoughts? Much appreciated. -dg On Fri, Jan 28, 2011 at 4:46 PM, Cinthia Leung cinthia...@gmail.com wrote: Hello, I have several OpenSIPS servers running and I'd like to have OCP installed on a separate server to keep track of all of them. At this time I'm stuck at configuring the dialog tool. It looks like it can send MI commands to multiple servers to get a list of active dialogs, is that right? Yes. If yes, I can use some help here. I am unable to grab dialog status from all servers, only one at a time. You are able now to get the dialog status from each server one at a time or you believe it should. Your question I think I have boxes.global.inc.php configured right, since I'm able to see all my servers in the drop down list of the System - MI Commands tool page I don't know if I have config/tools/system/dialog/local.inc.php set correctly. I have these lines in the file $box[0]['mi']['conn']=server1_ip:8080; $box[1]['mi']['conn']=server2_ip:8080; ... Please help. Thanks. Cinthia ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] every user is registered
mato848, The default/sample config has a section for registration. you need to basically use that. just copy it to your script. Look for www_authorize. Registrations are stored with the usrloc module and auth is done by auth and auth_db modules so they need to be configured as well like the sample config. Look at the docs for how you want to deal with multiple registrations: Allow them and what is an update or a different device (some devices don't properly identify themselves according to SIP standards so opensips may think it is a different device from a previous registration and you end up with two registrations for the same device and then opensips sends out two invites to the device) Call all simultaneously or one after another. Dave On Wed, Feb 9, 2011 at 10:40 AM, mato...@gmail.com mato...@gmail.com wrote: Hi, First, sorry for my english :) I have a problem with the user registration. I added some users to the database and tried to register with Twinkle and it worked. But when i tried to register other users (that were not in the database), they were registered too, they could make calls, IMs ... . Also each random user can use the server. Can anybody help me with that ? ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] b2b top-hiding and SDP origin line
Jeff, I checked nathelper code in opensips 1.6.4 and looks like adding the oldip header to the SDP is not there anymore. So you shouldn't need to modify the source like I had to previously to accomplish complete topology hiding. Also it doesn't really matter if you use rtp_proxy or media proxy combined with fix_nated_sdp(8,IP). Which ever fits better for you. Ovidiu, According to change logs looks like you fixed that. Thanks Dave On Tue, Feb 8, 2011 at 6:20 PM, Jeff Pyle jp...@fidelityvoice.com wrote: Now you now, and knowing is half the battle. -- G.I. Joe On 2/8/11 5:36 PM, Ovidiu Sas o...@voipembedded.com wrote: yup On Tue, Feb 8, 2011 at 5:15 PM, Jeff Pyle jp...@fidelityvoice.com wrote: Got it. Am I to believe, then, that only the initial initialized UAC INVITE hits the local route? Everything after that for a dialog is visible in the b2b ones only, and therefore untouchable? - Jeff ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to stop script execution?
Anton, My bet is that since the first one was dropped, a transaction was never created and thus the transaction cleanup doesn't happen either. If you want it to it do the automatic cleanup it might work to create a transaction prior to the reply, then use t_reply and finally drop. Dave On Tue, Feb 8, 2011 at 3:46 AM, Anton Zagorskiy a.zagors...@oyster-telecom.ru wrote: Log inspections shows that while I processing first INVITE an original UAc sends INVITE again, but OpenSIPS doesn't recognize it as already received and start processing it again (makes a new transaction). Why that can happens? Hi. I have 2 nested routes: route - route[invite] - route[check] In the route[check] I need to stop the execution of the script. I wrote: route[check] { sl_send_reply(401, Forbidden); drop; } But this isn't working. OpenSIPS replies 401: Forbidden but continues the execution of the script. Is this normal? WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Notify Message
Kyle, use t_replicate(sip:second server); Look at the tm module docs for a more complete picture. Then modify the message. One branch will go out with the message the way it was before the t_replicate and one will have the changes after the t_replicate. If you need more replicated destinations, use append_branch same as t_replicate with the final dest using the t_replicate cmd. For this you might also need to move the message modifications to a branch route because somethings can only be changed once like uac_replace_from. Dave On Tue, Feb 8, 2011 at 9:45 AM, Kyle Haefner kyle.haef...@colostate.edu wrote: Hi Users! I have a *simple* scenario that I just can't seem to accomplish...famous last words right? Ok here goes... I receive a NOTIFY message that I want to forward to two destinations, one destination I want to forward the message and modify the body, the other destination I just want to forward the message. Here is what I have so far it works for the modified message: if (method==NOTIFY){ xlog(\n\nSIP NOTIFY *\n\n if(subst_body('/(Message-Account:.*)(sip:)([125][0-9][0-9][0-9][0-9])(@.*)$/\1\297049\3\4/')){ sl_send_reply(200, OK); t_relay(tcp:192.168.0.3); }; ); exit; } My initial attempt, doesn't work 192.168.0.3 always gives me a 500 error: if (method==NOTIFY){ xlog(\n\nFORWARD ORIGINAL SIP NOTIFY *\n\n sl_send_reply(200, OK); t_relay(tcp:192.168.0.2); xlog(\n\nFORWARD MODIFIED SIP NOTIFY *\n\n if(subst_body('/(Message-Account:.*)(sip:)([125][0-9][0-9][0-9][0-9])(@.*)$/\1\297049\3\4/')){ sl_send_reply(200, OK); t_relay(tcp:192.168.0.3); }; ); exit; } It seems that I should use append_branch for this, but then how do I modify the body of only one of the branches, and what is the best way to call t_relay? I'd appreciate it if someone could point me in the right direction! Regards, Kyle ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Change in SDP/RTP routing with Opensips 1.4 and 1.6
So weird. Did you specify the -f path to custom config on the opensips cmd line? That is the only thing left that I can think of as the problem, it is using a default config that is somewhere else. try updatedb locate opensips.cfg Most likely the default location is /usr/etc/opensips/opensips.cfg or /etc/opensips/opensips.cfg, depending on compile time options. Failing that I would scrub out opensips installed pieces and recompile/reinstall with a different --prefix= Dave On Tue, Feb 8, 2011 at 11:51 AM, Chris Stone axi...@gmail.com wrote: Dave, On Tue, Feb 8, 2011 at 12:02 AM, Dave Singer dave.sin...@wideideas.com wrote: Don't know what tools you are familiar with so here are some suggestions for what they're worth. Appreciate the input! Am familiar with all - but included output below - always happy to have another set of eyes on things ;-) what is listening on port 5060? netstat -lnp | grep 5060 tcp 0 0 67.212.153.178:5060 0.0.0.0:* LISTEN 25098/opensips tcp 0 0 127.0.0.1:5060 0.0.0.0:* LISTEN 25098/opensips udp 0 0 67.212.153.178:5060 0.0.0.0:* 25098/opensips udp 0 0 127.0.0.1:5060 0.0.0.0:* 25098/opensips and as seen below, that's the only opensips pid on the system... is opensips actually running? what was the command line used? ps aux --forest | grep opensips root 25098 0.0 0.0 72884 992 ? S 11:40 0:00 /usr/sbin/opensips root 25100 0.0 0.0 72884 468 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25101 0.0 0.0 72884 468 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25102 0.0 0.0 72884 468 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25103 0.0 0.0 72884 468 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25104 0.0 0.0 72884 468 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25105 0.0 0.0 72884 472 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25106 0.0 0.0 72884 472 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25107 0.0 0.0 72884 472 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25108 0.0 0.0 72884 472 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25109 0.0 0.0 72884 472 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25110 0.0 0.0 72884 592 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25111 0.0 0.0 72884 600 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25112 0.0 0.0 72884 708 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25113 0.0 0.0 72884 708 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25114 0.0 0.0 72884 708 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25115 0.0 0.0 72884 708 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25116 0.0 0.0 72884 708 ? S 11:40 0:00 \_ /usr/sbin/opensips root 25117 0.0 0.0 72884 704 ? S 11:40 0:00 \_ /usr/sbin/opensips Does sip still pass when opensips is not running? Nope - inbound calls hang and then get a fast busy. Start opensips and they ring through. if mi_fifo loaded, what is the output of opensips install path/sbin/opensipsctl fifo ps does it show that it is listening on the interfaces/ports that are handeling the packets you are capturing? Wasn't loaded. Added it and retested call and yes, it shows listening on the correct interfaces and ports - all interfaces and tcp/udp port 5060: Process:: ID=0 PID=25256 Type=attendant Process:: ID=1 PID=25257 Type=SIP receiver udp:127.0.0.1:5060 Process:: ID=2 PID=25259 Type=SIP receiver udp:127.0.0.1:5060 Process:: ID=3 PID=25260 Type=SIP receiver udp:127.0.0.1:5060 Process:: ID=4 PID=25261 Type=SIP receiver udp:127.0.0.1:5060 Process:: ID=5 PID=25262 Type=SIP receiver udp:127.0.0.1:5060 Process:: ID=6 PID=25263 Type=SIP receiver udp:67.212.153.178:5060 Process:: ID=7 PID=25264 Type=SIP receiver udp:67.212.153.178:5060 Process:: ID=8 PID=25265 Type=SIP receiver udp:67.212.153.178:5060 Process:: ID=9 PID=25266 Type=SIP receiver udp:67.212.153.178:5060 Process:: ID=10 PID=25267 Type=SIP receiver udp:67.212.153.178:5060 Process:: ID=11 PID=25268 Type=time_keeper Process:: ID=12 PID=25269 Type=timer Process:: ID=13 PID=25270 Type=MI FIFO Process:: ID=14 PID=25271 Type=TCP receiver Process:: ID=15 PID=25272 Type=TCP receiver Process:: ID=16 PID=25273 Type=TCP receiver Process:: ID=17 PID=25274 Type=TCP receiver Process:: ID=18 PID=25275 Type=TCP receiver Process:: ID=19 PID=25276 Type=TCP main If something else is listening on port 5060 opensips should be failing to start with the provided config. Right, not failing to start though - no port conflict try running single mode with the following config
Re: [OpenSIPS-Users] How to test if a message is from myself
Thanks Stefano, Though, X-src-ip would be a header added by a trusted back 2 back server (which I would fist verify before trusting the header). So it wouldn't ever be the same as $si. Thanks Bogdan, I thought of a workaround. :-) (a little messy though) if ( $avp(s:dr_gw_attrs) =~ origin_ips= ) { $var(origin_ips) = $(avp(s:dr_gw_attrs){param.value,origin_ips}); $var(i) = 0; $var(found) = 0; while ( $(var(origin_ips){s.select,$var(i),:}) != null ! $var(found) ) { $var(potential_fs_ip) = $(var(origin_ips){s.select,$var(i),|}); $var(tmp_rd) = $rd; $rd = $var(potential_fs_ip); if ( uri == myself ) { $fs = $var(potential_fs_ip) + :5060; $var(found) = 1; } else $var(i) = $var(i) + 1; } if ( $var(i) ) { $rd = $var(tmp_rd); if ( ! $var(found) ) return(-1); } } On Thu, Feb 3, 2011 at 4:32 AM, Stefano Pisani stefano.pis...@omnianet.it wrote: Hi Dave you could try if ($si == $hdr(X-src-ip)){...} Il 03/02/2011 12:59, Bogdan-Andrei Iancu ha scritto: Hi Dave, Unfortunately does not work with variables. Regards, Bogdan Dave Singer wrote: Wow I missed that one. Thanks. Does that work for PVs so I can test other IPs like one from another header, say X-src-ip:192.168.0.5. Last I tried I couldn't get it to work. Not sure if that was 1.6.2 or 1.6.3. I'm using 1.6.4 now. :) Thanks Again Dave On Wed, Feb 2, 2011 at 4:37 AM, Bogdan-Andrei Iancu bog...@opensips.org wrote: Hi Dave, do : if (src_ip==myself) {} Regards, Bogdan Dave Singer wrote: Is there any way to check if the source IP/port is one that opensips is listening on or one ? something like if (sip:$si:$sp == myself) { ...bla; bla;} Thanks Dave ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Event - expo, conf, social, bootcamp 2 - 4 February 2011, ITExpo, Miami, USA OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] trying to rewriteuri to the value of a variable
Last week I ran into a similar thing with force_socket(). I was trying to setup to force it out the second IP on the server and have it generic for two load balanced servers. I did if ( $Ri == server 1's IP ) { force_socket(server 1's second IP:5060); } else { force_socket(server 2's IP:5060); } Interesting that config file check didn't catch the error but when I started it up for real it displayed an error and stopped running. It is a good thing I had my 2nd level config check implemented on there where I run it listening on a local interface and dummy port. It failed that test so it didn't actually restart opensips. (FYI: I poseted my init.d script a while back) It took me a while to realize $fs was there and made things sooo much better. We need to document for the functions like rewriteuri where there are alternative variables like $ru, $du, $fs that that the variables are available and the difference between the two. Maybe even depricate the less feature-full functions unless there is an advantage like performance. Dave On Sun, Feb 6, 2011 at 7:01 PM, Duane Larson duane.lar...@gmail.com wrote: I don't know that its mentioned in the documentation, but I ran across the same issue and remembered finding something about it by searching nabble's opensips part. Its one of those things you chalk up to experience. Sent from Droid On Feb 6, 2011 8:54 PM, Nigel Daniels nigel.dani...@connectandsell.com wrote: that seems to be working, thanks alot ! clearly I need to re-read the docs On Sun, Feb 6, 2011 at 6:48 PM, Dave Singer dave.sin...@wideideas.comwrote: Isn't $var(my_uri) = 5...@example.com; $ru = sip: + $var(my_ruri); the same as rewriteuri(sip:5...@example.com); just that using $ru you can use it just like assigning to other vars like you are doing. On Sun, Feb 6, 2011 at 6:36 PM, Duane Larson duane.lar...@gmail.com wrote: Avpops Sent from Droid On Feb 6, 2011 8:34 PM, Nigel Daniels nigel.dani...@connectandsell.com wrote: the problem is that rewriteuri() does not support variables is there any alternative to rewriteuri() for changing the uri On Sun, Feb 6, 2011 at 6:26 PM, Tyler Merritt ty...@fonality.com wrote: I do this as well: $var(origFromNumber) = $(re{uri.user}); $var(finalFromURI) = sip:81 + $(var(origFromNumber){s.substr,1,0}) + @ + $fd; This works fine for me. Takes what is essentially a DID and formats it to a SIP PEER string as per the carrier. You say that var(z) prints correctly in the logs, but according to the parser it's not a legit URI. It may just be that your upstream routes don't recognize this format. We use the usr_loc and db_aliases in order to match the URI up with a destination - have you ensured that there is a valid destination for this SIP URI? ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Nigel Daniels Network Systems Administrator ConnectAndSell inc. (650)-533-2542 +16505332542 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Nigel Daniels Network Systems Administrator ConnectAndSell inc. (650)-533-2542 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Change in SDP/RTP routing with Opensips 1.4 and 1.6
On Mon, Feb 7, 2011 at 7:05 PM, Ovidiu Sas o...@voipembedded.com wrote: On Mon, Feb 7, 2011 at 9:14 PM, Chris Stone axi...@gmail.com wrote: Sorry all for the last message - too quick on the Send button. On Mon, Feb 7, 2011 at 6:48 PM, Henk Hesselink opensips-us...@voipro.nl wrote: Hi Chris, That config should't touch the Contact header, and yet that's also been modified: In: Contact:sip:+13038382386@208.94.157.10 ... Out: Contact:sip:+13038382386@67.212.153.178 ... Are you sure nothing else is touching the message? Yes, absolutely. The packets were captured on the Opensips server - in from upstream provider and then the next packet relaying the invite to backend Asterisk server. The upstream provider is, of course, on a remote network. The Asterisk server is on the same LAN - only a switch separating the 2 servers. The only application on the server that touched the packets would be Opensips. So I'm not nuts - something very weird is going on here eh? Yes. For sure you are using a different config. Are you running multiple servers on that box? Or are you having some virtual machines there? ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users Don't know what tools you are familiar with so here are some suggestions for what they're worth. what is listening on port 5060? netstat -lnp | grep 5060 is opensips actually running? what was the command line used? ps aux --forest | grep opensips Does sip still pass when opensips is not running? if mi_fifo loaded, what is the output of opensips install path/sbin/opensipsctl fifo ps does it show that it is listening on the interfaces/ports that are handeling the packets you are capturing? If something else is listening on port 5060 opensips should be failing to start with the provided config. try running single mode with the following config: #--- debug=9 # debug level (cmd line: -dd) fork=no log_stderror=yes # (cmd line: -E) children=1 check_via=no # (cmd. line: -v) dns=off # (cmd. line: -r) rev_dns=off # (cmd. line: -R) port=5060 # for more info: opensips -h # -- module loading -- mpath=/usr/lib64/opensips/modules #loadmodule xlog.so # un comment if using opensips before 1.6.4 # - setting module-specific parameters --- route{ xlog(\n\n\ntesttest \n\n\n); forward(67.212.153.179); exit; } and run it with: /usr/sbin/opensips -f config file path/opensips.cfg 21 | tee test.log (path to opensips executable based on your mpath in the config. you should get a boat load of debug go past your screen when it starts and for any message that goes through opensips. To stop it just do CTRL+C The debug went in to test.log as well as to the screen so you can look in it and search for the testtest to see if it handled the message. Or details of why it failed to start. Happy hunting. Dave ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to modify the 100 Trying packet
I'm just trying to be helpful where I can, appreciative of the help I've received and the great free software. My biggest worry is misleading someone now or later in a list search. :-) Just came across in another thread about the server header that you can set it. Not sure of all the ramifications, I haven't tried it myself. Check out http://www.opensips.org/Resources/DocsCoreFcn16#toc66 You may want to try setting it to and see what happens. Though that will affect any place it would use the Server header. Though I think it is only a FYI header that is not required. Seems like a very pick carrier. :-/ Oh the hoops they sometimes put you through. Dave On Mon, Feb 7, 2011 at 8:14 PM, Tyler Merritt ty...@fonality.com wrote: Dave, Thanks for your reply. I see you reply a lot and I appreciate you taking the time to help us. I read the page you linked - and I've stumbled across that before, but it's not what I want to do sadly :( The carrier basically wants me to strip the Server header from the 100 message. That's it - if this message went through the routing logic, I could just remove_hf(Server); but alas... I've told them this is a no-go for now. Seems that we would have to modify the OpenSIPs core to make it happen. Not worth the time or effort for this reason. On Tue, Feb 8, 2011 at 3:10 AM, Dave Singer dave.sin...@wideideas.com wrote: The 100 Trying is sent out to the originating server/user automatically when you send the invite off to the next destination with t_relay and exit in the main routing script. The 100 Trying you receive in the on_reply is just to let you know that the next hop is not dead and it is working on it. Your server only uses it for it's timeout for the call to that server. See the optional flags in the t_relay docs: http://www.opensips.org/html/docs/modules/1.4.x/tm.html#id271564 That should get you going. FYI if (is_method(TRYING)) would always be false since the method is INVITE and the status message would be Trying or Giving a try or something else. Never count on the status message, just the code. Different servers send back different messages. Unless you are factoring that in. I think you actually might be looking for fix_nated_contact. Check that out. Depends on what you are trying to accomplish. Dave On Mon, Feb 7, 2011 at 3:48 AM, Tyler Merritt ty...@fonality.com wrote: This started working - but the problem is that it's matching both sides of the conversation. I'm searching for a concrete method to say only if you're going to send this packet to the upstream provider but the closest I found was is_destination which has to be called from loose_route, and unfortunately it looks like we don't have any HF setup for this particular situation, so loose_route always returns 0 and exits (confirmed in the logs). The provider won't let me add stuff - maybe I can just add stuff one-way then rip it off on the return? if (is_method(INVITE) status==200 $(ct.fields(uri){s.substr,4,12}) !~ '^8150*') { xlog(L_INFO, Modifying the outbound Contact header to Carrier... $(ct.fields(uri){s.substr,5,12})); subst('/^Contact:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/Contact: sip:$avp(oriUri)@192.168.0.2/ig'); } Any tips? On Mon, Feb 7, 2011 at 11:19 AM, Tyler Merritt ty...@fonality.com wrote: I have used if (status==100) and if (is_method(TRYING)) and placed these in a variety of places, at the top of route[0], in route[1], in onreply_route (where it actually works), but nowhere can I get the OUTGOING 100 TRYING packet to change... I can't figure this out - there isn't very good documentation surrounding this particular packet, and if I were to guess, I would say that the method is hard-coded somewhere in the routing module. Any pointers on where this packet might be modified before sending it to the upstream provider would be welcome. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] trying to rewriteuri to the value of a variable
Isn't $var(my_uri) = 5...@example.com; $ru = sip: + $var(my_ruri); the same as rewriteuri(sip:5...@example.com); just that using $ru you can use it just like assigning to other vars like you are doing. On Sun, Feb 6, 2011 at 6:36 PM, Duane Larson duane.lar...@gmail.com wrote: Avpops Sent from Droid On Feb 6, 2011 8:34 PM, Nigel Daniels nigel.dani...@connectandsell.com wrote: the problem is that rewriteuri() does not support variables is there any alternative to rewriteuri() for changing the uri On Sun, Feb 6, 2011 at 6:26 PM, Tyler Merritt ty...@fonality.com wrote: I do this as well: $var(origFromNumber) = $(re{uri.user}); $var(finalFromURI) = sip:81 + $(var(origFromNumber){s.substr,1,0}) + @ + $fd; This works fine for me. Takes what is essentially a DID and formats it to a SIP PEER string as per the carrier. You say that var(z) prints correctly in the logs, but according to the parser it's not a legit URI. It may just be that your upstream routes don't recognize this format. We use the usr_loc and db_aliases in order to match the URI up with a destination - have you ensured that there is a valid destination for this SIP URI? ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Nigel Daniels Network Systems Administrator ConnectAndSell inc. (650)-533-2542 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] OpenSIPS 1.6 on Ubuntu
Tyler, Just went through the OpenSIPS default script webminar = http://www.opensips.org/html/docs/video/webinar005/ And while the audio at the beginning is bad (and very end), it is only just a little bit and it is because it was coming through a bad connection to the seminar where the webinar was recorded. If there truely is a problem with some of them try downloading them instead of using the browser streaming. Also list which one(s) you have trouble with. Dave On Thu, Feb 3, 2011 at 4:01 PM, Tyler Merritt ty...@fonality.com wrote: Dave, The audio on some of the webinars that I have watched has been almost unintelligible :( I like webinars - I present many of them in my work for our customers, but I couldn't really hear well. I can't attend the live webinars as I'm in Tokyo - they happen at like 3 am. Anyway to clean up the audio? Bogdan - can I send you a mic better mic :) Tyler Merritt. Sales Engineer. Contact: tmerr...@fonality.com | 310.861.4300 x 8850 | fonality.com | SE Blog ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to test if a message is from myself
Wow I missed that one. Thanks. Does that work for PVs so I can test other IPs like one from another header, say X-src-ip:192.168.0.5. Last I tried I couldn't get it to work. Not sure if that was 1.6.2 or 1.6.3. I'm using 1.6.4 now. :) Thanks Again Dave On Wed, Feb 2, 2011 at 4:37 AM, Bogdan-Andrei Iancu bog...@opensips.org wrote: Hi Dave, do : if (src_ip==myself) {} Regards, Bogdan Dave Singer wrote: Is there any way to check if the source IP/port is one that opensips is listening on or one ? something like if (sip:$si:$sp == myself) { ...bla; bla;} Thanks Dave ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Event - expo, conf, social, bootcamp 2 - 4 February 2011, ITExpo, Miami, USA OpenSIPS solutions and know-how ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] OpenSIPS 1.6 on Ubuntu
The best place to start is http://www.opensips.org/ In the left column of the web page there is a section titled Resources with links to many very helpful resources. Your using the mailing list so you probably already have seen them to get here. So. Where are you getting stuck? We need specifics in order to help out. Also when you have a question you should start your own thread and not use an existing thread unless it is completely relevant to what your asking/stating. FYI: The webinars are VERY important for getting an understanding of how the whole thing works. With SIP the big picture is very important! With out them you'll learn a lot of things the hard way like I did before they were available. Another good way to learn is to follow the mailing list discussions. Welcome to the club, ;-) Dave P.S. The software, documentation, mailing list, IRC, etc are all free resources. The people helping you out are not getting paid to do it. So an attitude of appreciation with patience will get you the best millage. If you need more support there are those willing to do contract support. See http://www.opensips.org/Resources/Business On Wed, Feb 2, 2011 at 7:16 PM, Pradeep Patil pradeep.pati...@gmail.com wrote: Anyone can help please in installing Opensip on Ubuntu. On Wed, Feb 2, 2011 at 1:15 AM, Duane Larson duane.lar...@gmail.com wrote: The first thing you should do is http://www.packtpub.com/article/installation-of-opensips-1.6 You can watch the webinars here http://www.opensips.org/Resources/Webinars You should join the mailing list http://www.opensips.org/Resources/MailingLists To search old mailing list posts I use http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html Sounds like what you need to do is to actually create a user/subscriber so that opensips can register the x-lite client. For that you need to use the opensipsctl command or the osipsconsole. On Tue, Feb 1, 2011 at 12:21 PM, Robin Malhotra rocky...@gmail.com wrote: Guys I a newbie to OpenSIPS I have installed opensips and mysql on ubuntu following some instructions. I have also installed x-lite. Now how to register a user in opensips and to use it with the client ? I am stuck, please let me know Regards Ricky ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- -- *--*--*--*--*--* Duane *--*--*--*--*--* -- ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- thanking you, Pradeep Patil Cell No: 9676206432 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Installing OpenSIPS on Red Hat
Toyima, I posted in the list last week on the thread multiple use_media_proxy() calls my notes on getting media proxy installed on centos 5.5. To compile opensips just do the yum installs mentioned in that thread, get the opensips source, unpack, compile and install according to docs on install from source. what I do after the yum installs and updates: cd /usr/local/src/ wget http://opensips.org/pub/opensips/latest/src/opensips-1.6.4-tls_src.tar.gz; tar -xzf opensips-1.6.?-tls_src.tar.gz cd opensips-1.6.?-tls # note: the -jnumber is the number of threads the compile can use. I usually use one less than number of cores. TLS=1 make -j3 prefix=/opt/opensips doc-prefix=/usr/local man-prefix=/usr/local include_modules=db_mysql db_postgres install A few months ago I also posted an init.d script for centos that does double checking for problems (runs opensips with -c and runs it full on localhost:2021 or some port) because -c only does syntax checking and I got tired of restarting and it would fail when starting back up. It also is set to use monit if it is installed and configured. Dave On Mon, Jan 31, 2011 at 11:23 AM, Brett Nemeroff br...@nemeroff.com wrote: On Mon, Jan 31, 2011 at 10:28 AM, Toyima Dias toyim...@gmail.com wrote: Hello, I've seen many information on how to install OpenSIPS in DEBIAN, but in my case i need to install it on Red Hat, i've found some information but not very well supported, i would like to have a very clean and stable installation for a very large and stable production server, is there any recommendations please? Regards Toyima, If you are trying to install mediaproxy, then yes, Debian is the way to go. With it's dependencies you'll be fighting to make it work for a while. However, if you are just trying to get Opensips to run on Redhat.. Can't you just compile from source? It's really not so advanced. Maybe I'm missing something? -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] How to test if a message is from myself
Is there any way to check if the source IP/port is one that opensips is listening on or one ? something like if (sip:$si:$sp == myself) { ...bla; bla;} Thanks Dave ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] OpenSIPS handling B2B features
Toyima, Asterisk is a pain for making conference work because of its dependence on the dahdi kernel driver for timing. I like the FreeSwitch implementation. FreeSwitch has a very active irc at irc.freenode.net. Dave On Thu, Jan 27, 2011 at 12:21 AM, Toyima Dias toyim...@gmail.com wrote: Anca, What conference system would you recommend for me? Asterisk? SEMS? may be some licensed software could be ok for me...i would like to heard some recommendations Regards 2011/1/26 Anca Vamanu a...@opensips.org Hi Toyima, On 01/25/2011 06:38 PM, Toyima Dias wrote: Thanks Anca, To make transfers possibles, i would use REFER messages, and for this i would need to use B2BUA module of opensips, rigth? VoIP phones can handle REFER messages, the problem is with the gateways, and this is why sometimes it is required to handle the REFER at the server and instead of forwarding it, replace it with connecting the party in a call to the new party from the server. What about conferences? For conferences is the same procedure (REFER messages), but always handling a media b2bua, rigth? For conferences it is not enough to handle the signaling, you also need a conference bridge to distribute the media to more parties. Regards, -- Anca Vamanu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
Thanks for that clarification! So just to be sure I'm clear on this. $Ts rounds down ( truncates ) the current second. So using $avp(s:start_time) = $Ts.$Tsm; would give something like 12343253.543233 and always be accurate? Further (standard ACC [without dialog]) you could just put $Tsm in the db_extras as an extra column and then use the tool you are using to created cdrs from the acc table to take the column with the $Tsm value into account when calculating duration, ringtime, etc. To get these numbers with the new CDR feature, you would have to store a dialog variable like $dlg_val(start) = $Ts.$Tsm at start and $dlg_val(answered) = $Ts.$Tsm at answer and at the end of the call add them db_extras along with $Ts.$Tsm for the end of the call. You would then want to go off of those numbers rather than what the acc module automatically put in the db. The disadvantage would be having duplicate columns for start/answer/end times but you would still have the benefit of not having to have an external process building cdrs from acc table matching up BYEs to INVITES, etc. Calculating the durations in opensips would be tricky since it does not work with non integers. But you could do that easily with a sql trigger on the record insert. Does this sound right? Thanks Dave On Thu, Jan 20, 2011 at 4:54 AM, Anca Vamanu a...@opensips.org wrote: On 01/19/2011 09:31 PM, a.zagors...@oyster-telecom.ru wrote: It was my conversation, and I told about 1) $Tsm is MICROseconds (6 digits) 2) It is microseconds of a current second. Yes, that's true. I fixed it in documentation also. -- Anca Vamanu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CDR Accounting
Be careful when using $Tsm. I read a thread the other day that was just talking about it and that it returns milliseconds since midnight, not epoch. So if that is true you will need to somehow handle calls that cross midnight for duration at least and start/answer/end of call if including the precision in those timestamps. I'd be interested to see what you find. What I've seen with sub second accounting is for rounding purposes where for example billing in 6 second increments and it is always rounded up. So a call 6.001 seconds would be charged for 12 seconds. Dave On Wed, Jan 19, 2011 at 6:35 AM, Brett Nemeroff br...@nemeroff.com wrote: On Wed, Jan 19, 2011 at 8:32 AM, Andrew Philp andrew.ph...@just-tek.comwrote: We are looking to use this for billing directly and for most of our customers are billed on a hundredth of a second. Does this make sense? Sure it does, but I've never heard of sub second billing. The ACC module is probably not going to help you for this need presently. I believe $Tsm returns milliseconds. You may be able to manually account for the calls with that. -Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Some strange things with starting opensips
Adjust STARTOPTIONS to include -p /var/run/opensips.pid ( replace with the path to where you want the pid file ) There are other options you may want to adjust for starting opensips. Note that some options are overridden if set in the config file like listen address. Here is the list of options you can see when you run opensips with the help option -h path to opensips base install/sbin/opensips -h version: opensips 1.6.4-tls (x86_64/linux) Usage: opensips -l address [-l address ...] [options] Options: -f file Configuration file (default /opt/opensips/etc/opensips/opensips.cfg) -c Check configuration file for errors -C Similar to '-c' but in addition checks the flags of exported functions from included route blocks -l address Listen on the specified address/interface (multiple -l mean listening on more addresses). The address format is [proto:]addr[:port], where proto=udp|tcp and addr= host|ip_address|interface_name. E.g: -l locahost, -l udp:127.0.0.1:5080, -l eth0:5062 The default behavior is to listen on all the interfaces. -n processes Number of child processes to fork per interface (default: 8) -r Use dns to check if is necessary to add a received= field to a via -R Same as `-r` but use reverse dns; (to use both use `-rR`) -v Turn on via: host checking when forwarding replies -d Debugging mode (multiple -d increase the level) -D Do not fork into daemon mode -E Log to stderr -T Disable tcp -N processes Number of tcp child processes (default: equal to `-n`) -W methodpoll method -V Version number -h This help message -b nrMaximum receive buffer size which will not be exceeded by auto-probing procedure even if OS allows -m nrSize of shared memory allocated in Megabytes -w dir Change the working directory to dir (default /) -t dir Chroot to dir -u uid Change uid -g gid Change gid -P file Create a pid file -G file Create a pgid file Dave On Fri, Jan 14, 2011 at 7:20 AM, Chris Liu cachri...@yahoo.ca wrote: Hi Anca, Thank you very much , i add this line to /etc/opensips/opensipsctlrc STARTOPTIONS= -f /etc/opensips/opensips.cfg opensipsctl start use this configure file now. Thanks Do you know why I start with /etc/init.d/opensips start , there is no opensips.pid in /var/run ? Regards, Chris -- *From:* Anca Vamanu a...@opensips.org *To:* users@lists.opensips.org *Sent:* Fri, January 14, 2011 9:37:59 AM *Subject:* Re: [OpenSIPS-Users] Some strange things with starting opensips Hi Chris, You need to set the path to the configuration file. You should edit file opensipsctlrc ( localed in etc/opensips/ ) and set STARTOPTIONS= -f /etc/opensips/opensips.cfg ( replace with the path to your configuration file). Regards, -- Anca Vamanu www.voice-system.ro On 01/14/2011 06:26 AM, Chris Liu wrote: Hi everyone, We can use opensipsctl start and service opensips start to startup opensips, can anybody show me the different of these two ways? On my CentOS system, when I use service opensips start tostartup the system, no opensips.pid in /var/run and I can find /tmp/opensips_fifo but it will disapear in about 10 mins. If I use opensipsctl start to start the system, /tmp/opensips_fifo and opensips.pid are fine. But interest thing is seems service opensips start doesn't use the configure file. I changed the name of configure file and try service opensips start, It works with no error! Anybody know which configure file be use by it? [root@OpenSIP1/etc/opensips]# mv opensips.cfg opensips.cfg_ [root@OpenSIP1/etc/opensips]# opensipsctl stop INFO: Stopping OpenSIPS : INFO: stopped [root@OpenSIP1/etc/opensips]# opensipsctl start INFO: Starting OpenSIPS : INFO: started (pid: 15088) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] solution to opensips control pannel MI connection using fifo on CentOS 5 - selinux audit2allow
Banged my head for a while with why I couldn't get fifo working for the Control Panel I was getting sorry -- cannot open write fifo. Hope this can help other and maybe even make it into the docs. Found two problems. 1. Apache process couldn't use /tmp/opensips_fifo because the permissions were prw-rw 1 root root I fixed that temporarily by chmod o+rw /tmp/opensips Unfortunately restarting opensips voids that fix unless you do chmod after each start after the fifo is created So I changed the user opensips runs as using the -u apache -g apache options. This solved my problem and made my system more safe from hackers through sip messages. 2. SELinux (hate the good thing) was also blocking apache using it. I did some googling and found some mention of disabling selinux. Tried that and things worked. So I tried that and whala! IT WORKED!!! Now I was bummed cause I don't want to completely disable SELinux, pain though it is. So I finally broke down and looked into the docs on for SELinux and found audit2allow. YEA All you have to do to get SELinux to permantly allow something that should happen is pipe the audit lines that show the problem from /var/log/audit/audit.log (or /var/log/messages) Since an app my stop trying things SELinux may block after an initial rejection you want to set SELinux to permissive with setenforce Permissive Perform the actions like us the MI from opensips-cp stopped by selinux before then you can use the logs to allow those specific actions. I used less to find the specific lines then copied them into a file with just those lines. Here is an example with a file that only has the audit logs I want to allow: cat selinux_blocked_my_app | audit2allow -M opensipscp semodule -i opensipscp.pp That is it!! I wanted to transport it to other servers and make it easy to do on an install so I dug a little more and came up with this I can just cut and paste: cat opensipscp.te EOF module opensipscp 1.0; require { type httpd_t; type tmp_t; class fifo_file { write getattr setattr read create unlink }; } #= httpd_t == allow httpd_t tmp_t:fifo_file { write getattr setattr read create unlink }; EOF checkmodule -M -m -o opensipscp.mod opensipscp.te semodule_package -o opensipscp.pp -m opensipscp.mod semodule -i opensipscp.pp /bin/rm opensipscp.pp opensipscp.te opensipscp.mod Be sure in config/boxes.global.inc.php you have (or what you have for the fifo file) $boxes[$box_id]['mi']['conn']=/tmp/opensips_fifo; ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] [NEW] Media timeout detection and call termination
It seems VAD would also be a potential problem with NAT and state full packet inspection on firewalls. It would see a better practice for the UA to send keep alive RTP packets. That would solve both dead call detection and potential NAT issues. That would be nice RFC change. In my situation I have never seen VAD in use. I would like to have the option to set what determines a call is dead, 1 leg no RTP, both legs no RTP, or don't kill a call no matter if there is no rtp. Looking forward to the solution you are talking about. Dave On Fri, Dec 17, 2010 at 9:48 AM, Razvan Crainea razvancrai...@opensips.orgwrote: Hi Saul, Unfortunately this solution doesn't deal with the UA using VAD in case there are no RTP packages sent when voice is suppressed. Anyway, we are working on a solution that will solve this problem. Regards, On 12/17/2010 05:02 PM, Saúl Ibarra Corretgé wrote: As OpenSIPS is a proxy and at signaling level there is no continues traffic to help in detecting the ghost calls, such detection must be done at media level. Hi, If this detection is done based only in the lack of RTP, then you could say that a UA that uses VAD (it doesn't transmit RTP when there is silence) timed out, but what really happened is that it was silent for a long time. How is the timeout condition detected? Did this new addition deal with this situation? Thanks and regards, -- Razvan Crainea www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Handle end of a transaction/dialog
I'm not shure exactly when the automatick removal from groups is, you would have to expiriment. There are only a few end of call situations to cover. Bye after a call was accepted (200 OK to INVITE). That comes in main routing block but would usually be forwarded in the loose_route section. Add an if (is_method(BYE)) and put logic there. Cancel. That also comes in main routing block and is usually handled just below the has_totag() stuff. Find is_method(CANCEL). You would add it to the if (t_check_trans()) Failures. Handled in the failure route block you activated for the call with t_on_failure(?) In each section, just use the unset_dlg_profile function for the group it would be in. Be careful with the BYE as it can come from either side of the call and depending on what your grouping formula is based on you might need to make a special case depending which end the BYE came from. I haven't looked at BYE packets much. You may want to use store_dlg_value(name,val)http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294530 to sore the group to pull it out at BYE with fetch_dlg_value(name,pvar)http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294595 . On Fri, Nov 19, 2010 at 3:16 PM, a.zagors...@oyster-telecom.ru wrote: So, you explained how to store and grouping counters. Thanks. But how to catch the moment when the opensips transaction is going down? I need to react immediately. I can catch a BYE request when a established sip session is ending. What about other cases? On Fri, 19 Nov 2010 09:27:38 -0800 Dave Singer dave.sin...@wideideas.com wrote: You can use a combination of the following dialog profiles (grouping calls) functions for this: get_profile_size(profile,[value],size) http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294302 Check if a prifile is at limit. set_dlg_profile(profile,[value]) http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294092 If not at limit, increment the count for the profile (NOTE the value option is not actually supported yet) unset_dlg_profile(profile,[value]) http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294162 If need to remove from a profile like carrier failover is_in_profile(profile,[value]) http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294231 Not sure this would be needed but... When a call ends it will automatically be removed from any profiles it was part of. On Fri, Nov 19, 2010 at 1:29 AM, Anton Zagorskiy a.zagors...@oyster-telecom.ru wrote: Nobody uses limitation on amount of established sessions? I don't believe! =) WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru -Original Message- From: users-boun...@lists.opensips.org [mailto:users- boun...@lists.opensips.org] On Behalf Of Anton Zagorskiy Sent: Thursday, November 18, 2010 4:58 PM To: 'OpenSIPS users mailling list' Subject: [OpenSIPS-Users] Handle end of a transaction/dialog Hello. I need to control how much SIP dialogs (established or pending) has each domain. If that value is equal to certain constant then I should drop any new INVITE from that domain. There is no problem with catching initial requests, but with terminating. How can I control that an openSIPS transaction is in the terminating stage? WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Handle end of a transaction/dialog
You can use a combination of the following dialog profiles (grouping calls) functions for this: get_profile_size(profile,[value],size)http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294302 Check if a prifile is at limit. set_dlg_profile(profile,[value])http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294092 If not at limit, increment the count for the profile (NOTE the value option is not actually supported yet) unset_dlg_profile(profile,[value])http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294162 If need to remove from a profile like carrier failover is_in_profile(profile,[value])http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id294231 Not sure this would be needed but... When a call ends it will automatically be removed from any profiles it was part of. On Fri, Nov 19, 2010 at 1:29 AM, Anton Zagorskiy a.zagors...@oyster-telecom.ru wrote: Nobody uses limitation on amount of established sessions? I don't believe! =) WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru -Original Message- From: users-boun...@lists.opensips.org [mailto:users- boun...@lists.opensips.org] On Behalf Of Anton Zagorskiy Sent: Thursday, November 18, 2010 4:58 PM To: 'OpenSIPS users mailling list' Subject: [OpenSIPS-Users] Handle end of a transaction/dialog Hello. I need to control how much SIP dialogs (established or pending) has each domain. If that value is equal to certain constant then I should drop any new INVITE from that domain. There is no problem with catching initial requests, but with terminating. How can I control that an openSIPS transaction is in the terminating stage? WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] New to OpenSIPS
Learning opensips is not like learning a programming language like C, ruby, puthon, etc. It is very important to get an understanding of how sip flows and opensips works (get the big picture) then get into the details of how to manipulate things. Checkout the past webinars on the Webinars pagehttp://www.opensips.org/Resources/Webinars First two I'd look at are: SIP introduction http://www.opensips.org/Resources/Webinars#toc9 OpenSIPS default script http://www.opensips.org/Resources/Webinars#toc8 You may want to get and start playing with the live DVDhttp://www.voice-system.ro/shortcuts::opensips_livedvdavailable that you can use in a virtual server or a spare computer without installing. Further, look at the tutorialshttp://www.opensips.org/Resources/DocsTutorialsfor specific goals. OpenSIPS Admin Coursehttp://www.voice-sistem.ro/downloads/2007.08.29-Admin-Course/ The Cookbooks http://www.opensips.org/Resources/DocsCookbooks page is basically the links to reference manual type documentation of functions, features, variables etc. But it helps to have an understanding of how opensips works from the suggested webinars. Opensips IRC on freenode is quite active as well as the mailing list. Be sure to ask questions there. But remember that like other opensource software you are not paying for support so don't have an attitude of expecting fast answers. Also consider http://www.opensips.org/Training/EBootcamp. I sure wish these resources were available when I first started with openser (opensips) a few years ago. I have recently gone through some of these and still found them helpful. For performance check the Performance testshttp://www.opensips.org/Resources/PerformanceTests page and search the Mailing listshttp://www.opensips.org/Resources/MailingLists and Forums http://www.opensips.org/Resources/Forums for results users have found. Good luck Dave (cando) On Wed, Nov 17, 2010 at 11:54 AM, Austin Smith aus...@digitalcompass.bizwrote: Greetings! I am new to opensips and am looking for a good place to start learning the application. I am curious if there is any recommended hardware or solid benchmarking statistics available somewhere. Next I will need to learn on the configuration aspects of the software. I am not looking for “cookbook” material, but rather language references and structure guidelines. Can anyone advise where these items may be available? Many thanks- Austin Smith,* **A+, NET+, SMBE, MCSA* *Director of Information Techology* *Digital Compass* (404) 410-2708 direct (404) 410-2701 fax 6 Concourse Parkway, #1500 Atlanta, GA 30328 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Timer Based Failover Question
I ran into the same problem with one of our carriers. The way I did it, with advice from bogdan, was to set the fr_inv_timer_avp to 6 sec (so long because of some calls to cell phone systems have long delays) when sending to the particular carrier then in a reply route special to that carrier, reset it to the normal 300 if the response was a 18x. Here are the pertinent parts: modparam(tm, fr_inv_timer, 300) # Timer on Final response: Minimum is 2 sec, Default is 120 sec. modparam(tm, restart_fr_on_each_reply, 1) # Reset fr_int_timer on each reply. Needed if you want to adjust the fr_inv_timer_avp with avp depending on reply. modparam(tm, fr_inv_timer_avp, $avp(i:2)) # Used if overide of fr_inv_timer param is needed. modparam(tm, onreply_avp_mode, 1) # set to 1 if you want to access and or save avps from or for other parts of the transaction, like changing the fr_inv_timer_avp. route[carrier_c] { if (is_method(INVITE)) { t_on_failure(2); t_on_reply(2); $avp(i:2) = 6; } } onreply_route[2] { /* once we get ring progress let it ring for upto 300 sec */ fix_nated_contact(); if ( $rs =~ 18. ) { $avp(i:2) = 300; #xlog(got ringing, reset final timer to $avp(i:2) sec.\n); } } On Tue, Nov 16, 2010 at 2:49 AM, Denis Putyato denis7...@mail.ru wrote: And what about http://www.opensips.org/html/docs/modules/1.6.x/tm.html#id250384 *From:* users-boun...@lists.opensips.org [mailto: users-boun...@lists.opensips.org] *On Behalf Of *Bruce Borrett *Sent:* Tuesday, November 16, 2010 1:40 PM *To:* Users@lists.opensips.org *Subject:* [OpenSIPS-Users] Timer Based Failover Question Hi All I am having a problem where a SIP provider are sometimes sending us a 100, but then nothing afterwards. I would like to fail these calls over using a timer, but fr_timer wont work since we are receiving a 100, and fr_inv_timer requires a very lengthy duration which also will not work as I would like for the call to failover within 5 seconds maximum. Does anyone have any other suggestion for me please? Regards, Bruce Borrett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] opensips coredump on stop/restart
On my production servers, both 1.6.2 and 1.6.3 versions of opensips, almost every time I restart opensips it creates a core dump. Since I'm giving it 2GB shared mem, it takes a little while to write the core to disk and start running again. So a couple questions. 1. Am I giving it more memory than it needs? Judging by how much the core dump compressed probably way to much. I'm running about 30 calls per sec with up to 1000 active calls. Calls are using mediaproxy with engage and thus also dialog. I did run into memory shortage problems before I explicitly upped it to 2GB with -m 2000 on the cmd line for starting opensips. 2. Can someone look at the core dump(s) or let me know what/how to look at them? The 2GB core dumps compressed very small and are accessible via http: opensips-1.6.2-notls.core.gz 6MBhttp://viper.wideideas.net/opensips-1.6.2-notls.core.gz opensips-1.6.3-tls_1.core.gz 2MBhttp://viper.wideideas.net/opensips-1.6.3-tls_1.core.gz opensips-1.6.3-tls_2.core.gz 2MBhttp://viper.wideideas.net/opensips-1.6.3-tls_2.core.gz Thanks for any help or suggestions. Dave ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Mediaproxy broken
I attached a graph of traffic on the interface that media-relay uses from the 18th through 20th. Before that we didn't realize it wasn't working and after we stopped it. FYI the interface has a 10Gb internet connection, so graph numbers are not pushing internet limits. The mediaproxy log compressed from 272MB to 11MB and is at this linkhttp://viper.wideideas.net/mediaproxy.log.gz . Thanks for any help. Dave On Wed, Oct 20, 2010 at 11:43 PM, Saúl Ibarra Corretgé s...@ag-projects.com wrote: Hi, On 10/20/2010 11:14 PM, Dave Singer wrote: I have one server where mediaproxy is having serious problems. In the logs I have a lot of: media-dispatcher[6067]: error: failed to end dialog: 500 Operation failed This error is returned by OpenSIPS when MediaProxy calls the dlg_end_dlg over the MI interface. Do you see anything in the OpenSIPS log? and a lot of of the following but much less than the above: media-dispatcher[6067]: error: Got `remove' command from OpenSIPS for unknown session with call-id `83335711-572b-122e-57ab-0024e869f3a5' Are you using the engage_media_proxy function alone? Are you using end_media_session by any chance? After some preiod of time, from a few minutes to a day or so, media-relay appears to start holding open ports that have long gone dead. After a while it runs out of ports for new calls and opensips sends the call on without using mediaproxy. Traffic graphs support this conclusion. They also show that it was working fine for more than a month then stopped working. Can you please provide some more information/logs on this? I'm using opensips 1.6.2-notls (x86_64/linux) mediaproxy is enacted with engage_media_proxy() with dialog write to db on shutdown. mediaproxy 2.4.2 (just replaced with 2.4.3 but still getting the errors mentioned above in the logs. Haven't seen it run out of ports yet but it has only been a few minutes) Fedora release 11, kernel 2.6.30.10-105.2.23.fc11.x86_64 pertinent opensips.cfg stuff modparam(dialog, dlg_flag, 13) # db_mode: 0 - NO_DB, 1 - REALTIME, 2 - DELAYED, 3 - ON SHUTDOWN modparam(dialog, db_mode, 3) modparam(mediaproxy, mediaproxy_socket, /var/run/mediaproxy-dispatcher.sock) modparam(mediaproxy, mediaproxy_timeout, 500) modparam(mediaproxy, signaling_ip_avp, $avp(s:nat_ip)) modparam(mediaproxy, media_relay_avp, $avp(s:media_relay)) modparam(mi_datagram, socket_name, /tmp/opensips.sock) modparam(mi_datagram, children_count, 4) if (is_method(INVITE)) { engage_media_proxy(); fix_nated_sdp(8,my hosts ip); # topology hide the sdp o header. } pertinent /etc/mediaproxy/config.ini stuff: [Dispatcher] socket_path = /var/run/mediaproxy-dispatcher.sock [OpenSIPS] socket_path = /tmp/opensips.sock This looks fine. Regards, -- Saúl Ibarra Corretgé AG Projects ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users attachment: mediaproxy_traffic_graph_oct_18-20.png___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Mediaproxy broken
I have one server where mediaproxy is having serious problems. In the logs I have a lot of: media-dispatcher[6067]: error: failed to end dialog: 500 Operation failed and a lot of of the following but much less than the above: media-dispatcher[6067]: error: Got `remove' command from OpenSIPS for unknown session with call-id `83335711-572b-122e-57ab-0024e869f3a5' After some preiod of time, from a few minutes to a day or so, media-relay appears to start holding open ports that have long gone dead. After a while it runs out of ports for new calls and opensips sends the call on without using mediaproxy. Traffic graphs support this conclusion. They also show that it was working fine for more than a month then stopped working. I'm using opensips 1.6.2-notls (x86_64/linux) mediaproxy is enacted with engage_media_proxy() with dialog write to db on shutdown. mediaproxy 2.4.2 (just replaced with 2.4.3 but still getting the errors mentioned above in the logs. Haven't seen it run out of ports yet but it has only been a few minutes) Fedora release 11, kernel 2.6.30.10-105.2.23.fc11.x86_64 pertinent opensips.cfg stuff modparam(dialog, dlg_flag, 13) # db_mode: 0 - NO_DB, 1 - REALTIME, 2 - DELAYED, 3 - ON SHUTDOWN modparam(dialog, db_mode, 3) modparam(mediaproxy, mediaproxy_socket, /var/run/mediaproxy-dispatcher.sock) modparam(mediaproxy, mediaproxy_timeout, 500) modparam(mediaproxy, signaling_ip_avp, $avp(s:nat_ip)) modparam(mediaproxy, media_relay_avp, $avp(s:media_relay)) modparam(mi_datagram, socket_name, /tmp/opensips.sock) modparam(mi_datagram, children_count, 4) if (is_method(INVITE)) { engage_media_proxy(); fix_nated_sdp(8,my hosts ip); # topology hide the sdp o header. } pertinent /etc/mediaproxy/config.ini stuff: [Dispatcher] socket_path = /var/run/mediaproxy-dispatcher.sock [OpenSIPS] socket_path = /tmp/opensips.sock Thanks for any thoughts. Dave ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] any reason why Opensips would replace 503 with 500 ?
Julien, I have been catching it in failure_route and sending it on up with this: if (t_check_status(^503$)) { t_reply(503, Service Unavailable); exit; } I think you could use t_reply(503, $(replyrr)); (note the use of reply to indicate the reply context see usage examples near the top of this link: http://www.opensips.org/Resources/DocsCoreVar16 ) to have it use the original reason text instead of always sending Service Unavailable no matter what reason came with the 503. I haven't tried it yet myself. I'm doing this because I'm just using it as a proxy to mangle headers and not decide where to go next. So I really do just want to pass the response back to the server doing the routing logic. It would seem passing the 503 would be the normal behavior in this case. Plus like the situation of Julien which I also have, where the upstream routers are not properly handling the diff between a 500 and 503. So I agree that it would be nice if there were a param and/or var that could be set for the desired behavior like the invite timeout settings for tm. Bogdan, Is disable_503_translation ( from the subject of the link you posted ) an actual parameter (un)documented? On Thu, Oct 7, 2010 at 2:44 PM, thrillerbee thriller...@gmail.com wrote: Bogdan, Is this or could this be configurable? It, unfortunately, breaks a lot of existing applications. Thanks. On Thu, Oct 7, 2010 at 1:15 PM, Bogdan-Andrei Iancu bog...@voice-system.ro wrote: Hi Julien, see: http://lists.opensips.org/pipermail/users/2010-September/014505.html Regards, Bogdan Julien Chavanton wrote: Hi, is there any reason why Opensips would replace 503 with 500 ? The UA initiating the call expect 503 to reroute somewhere else INVITE : 10.0.20.14(UA) - 10.2.0.1(Proxy) - 10.0.4.202(UA) RESPONSE : U 10.0.4.202:5060 - 10.2.0.1:5060 SIP/2.0 503 Service Unavailable. U 10.2.0.1:5060 - 10.0.20.14:53584 SIP/2.0 500 Service Unavailable. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] get error with opensip-cp on centos 5
Setting setenforce 0 is only active for the current running session of the server. The problem will be back after the reboot. While that is fine to temporarily do that to see if SELinux is the thing blocking, it is generally very bad to use that to solve the problem and you definitely wouldn't want to have it like that on a production environment. I have been getting more and more frustrated with SELinux silently blocking things. I really need to take some time and understand how to properly make use of it and work with it. Command restorecon can be a life saver. Look up how to use it. A good quote from another formu. It is about an apache cgi script but the SELinux stuff is very relevant: It is a security risk that someone could alter the script and do something you didn't intend as root. I would suggest *at*most* setting SELINUX=permissive in /etc/selinux/config. Then you'll still have a log of all the things that shouldn't have happened, if you ever need to look. A better option would be extract the AVC denials from the log file and run them through audit2allow to create a policy you could incorporate into the running SELinux policy. Do that as often as you need to address all the denials that are stopping your script from working. The best option is, as others posters have suggested, figure out why your application architecture is screwed up so much that it only works if it runs as root, then fix it. SELinux basically fulfills two security functions. It stops bad people from doing bad things, and it stops foolish people from doing stupid things. Sometimes it needs tuning, but if you just shut it off, it can't do anything for you. On Tue, Sep 14, 2010 at 3:44 AM, ha do haloha...@yahoo.com wrote: if someone else got the same problem with me, to solve the issue please follow the link http://lists.opensips.org/pipermail/users/2010-June/013139.html Thank you Ha` - Original Message From: ha do haloha...@yahoo.com To: OpenSIPS users@lists.opensips.org Sent: Tue, September 14, 2010 11:12:47 AM Subject: [OpenSIPS-Users] get error with opensip-cp on centos 5 Hi all i try to use the opensips-cp 4: i login the the web page http://192.168.1.100/cp successfull the menu Admin + User are working properly but the system menu does not work i get the error on the webpage: sorry -- cannot open write fifo and this is the error in debug message : Sep 14 00:10:42 localhost kernel: type=1400 audit(1284437442.630:49): avc: denied { getattr } for pid=2093 comm=httpd path=/tmp/opensips_fifo dev=dm-0 ino=884744 scontext=root:system_r:httpd_t:s0 tcontext=root:object_r:tmp_t:s0 tclass=fifo_file i did set fifo_mode, 0666 in opensips.cfg please help,what should i do to resolve problem Thank you Ha` ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Out of mem all of the sudden
I ran into out of memory and adjusted the shared memory opensips uses with the -m option. It tells opensips how much shared memory to use in MB. eg: .../sbin/opensips -m 500 -l eth0 gives it 500MB of shared memory and listen on eth0 I believe by default it uses 100MB if -m is not specified. Dave On Wed, Sep 15, 2010 at 8:20 AM, k1028 mrprotoc...@gmail.com wrote: I am using opensips 1.6.3 with very only few modules loaded. The OpenSIPS is up for over a months with up any issue until now. I also tried to increase the PKG to 4mb and SHM to 256 mb still crash. loadmodule db_mysql.so loadmodule sl.so loadmodule tm.so loadmodule rr.so loadmodule maxfwd.so loadmodule textops.so loadmodule mi_fifo.so loadmodule uri.so loadmodule dispatcher.so loadmodule mediaproxy.so loadmodule nathelper.so loadmodule dialog.so loadmodule mi_datagram.so loadmodule signaling.so loadmodule localcache.so loadmodule sst.so loadmodule avpops.so loadmodule load_balancer.so -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Out-of-mem-all-of-the-sudden-tp5534338p5534792.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Monit error under OpenSIPS 1.6.3 and Opensips-cp 4
You may not have monit running as a service. Check the current status of monit: monit status It will tell you if it is running. If it is not start it with: /etc/init.d/monit start I primarily use centos and fedora but I think that will work with debian systems too. I think that the default config does not have the daemon set to listen for communication. It needs this for commands like monit status and monit monitor opensips and monit unmonitor opensips something like this: set httpd port 2812 and use address localhost # only accept connection from localhost allow localhost Also you don't want to use the same call to the init.d script that is used to start it up regularly otherwise you get a loop going or at least double notify of (un)monitor actions. What I do for the opensips portion of the monit config is have it call /etc/init.d/opensips monit_start. Then in /etc/init.d/opensips I have it catch that arg and not tell monit to monitor but call the regular start function. When it gets the regular start arg it calls the regular start function and then tells monit to start monitoring it. Also when the init.d script gets a restart command I don't update monit It checks the pid file itself and realizes that the pid has changed and sends a message to that affect rather then two messages, one that it us unmonitoring and one that it is monitoring. I've attached the /etc/init.d/opensips that I'm currently using. Don't forget to make sure that the monit daemon will start on next reboot. The attached init.d/opensips script uses some of redhats conventions for displaying success/failure and adjust the working directory according to your install. But I think overall it should be fairly portable to other distros. Note. Many of the options I pass to opensips are usually set in the script. For the passed options to work they can not be set in opensips.cfg. You may also notice that for a restart it validates the config before allowing a restart. It does two levels of checks, the opensips -C to verify the syntax of the config and actually starts a minimal opensips because sometimes there are things that will make it not work even when the syntax checks out. The test run listens on lo:2056 so beware incase of conflicts. YMMV Hope that helps. Dave On Wed, Sep 8, 2010 at 1:41 AM, Deon Vermeulen vermeulen.d...@gmail.comwrote: Hi Everyone I've successfully installed Opensips-cp 4 and got the Statistics monitoring to work, but I'm unable to get Monit to work. I've been all over google and tested recommendations, but with no luck. This is the procedure I followed to install Monit: * * *Step 1*: Install Monit: apt-get install monit * * *Step 2*: Once installed, you'll find the main configuration file. vi /etc/monit/monitrc set daemon 120 set logfile syslog facility log_daemon set alert r...@localhost set httpd port 2812 and use address yourdomain.com allow localhost # allow localhost to connect to the server and allow youripaddress# allow 192.168.1.2 to connect to the server, ###(What IP should this be? The IP of the this Box or where I am connecting from?) # You can give only one per entry allow admin:monit# user name and password for authentication. ###(I guess the Username and Password will be admin:admin if my login to Opensips-cp ios admin:admin) check process opensips with pidfile /var/run/opensips.pid ###(For Some Reason this does not work. Had to comment all). #Below is actions taken by monit when service got stuck. start program = /etc/init.d/opensips start stop program = /etc/init.d/opensips stop # Admin will notify by mail if below of the condition satisfied. if cpu is greater than 70% for 2 cycles then alert if cpu 90% for 5 cycles then restart * * *Step 3*: After modifying the configuration file, you should check for the syntax to make sure that everything is correct. To do this, run: # monit -t (When I run this I get syntax OK) * * *Step 4:* Edit the /etc/default/monit file and change the parameters as follows: # You must set this variable to for 1 monit to start startup=1 # To change the intervals which monit should run uncomment # and change this variable. # CHECK_INTERVALS=180 * * * * *Configuring OpenSIPS Control Panel* * * *Step 1*: Configure the database access parameters. Edit the db.inc.phpfile, which is valid for all modules. You may change the database parameters for a single module inside the module configuration section. For example: cd /var/www/opensips-cp/config vi db.inc.php //database host $config-db_host = localhost; //database port - leave empty for default $config-db_port = ; //database connection user $config-db_user = root; //database connection password $config-db_pass = opensips; //database name $config-db_name = opensips; if ($config-db_port != )$config-db_host=$config-db_host: $config-db_port; * * *Step 2*: Configure the FIFO access in the
Re: [OpenSIPS-Users] opensips long shutdown time
Thanks for the reply. I would also lean to the DB as the problem but I have also experienced it with about the same frequency when not using any database modules and low or now calls. So if you could point me to the patch you refereed to I would appreciate it. I'll then run it through a scripted process of restarting to try to reproduce and catch the problem (as time permits). Thanks again for all your work with development and support!! Dave (cando) On Fri, Aug 27, 2010 at 2:02 AM, Bogdan-Andrei Iancu bog...@voice-system.ro wrote: Hi Dave, At sthutdown, opensips modules are mainly doing memory cleanup (dialog, transactions, caches, etc) or data flush to DB (dialogs, usrloc, etc). As memory cleanup is predictable as time and not resource consuming, I would say it is something related to DB flush - some DB ops that take random number of (mili) seconds, depending on the DB server load. A simple patch to report the shutdown duration of each module can be made if you consider it helpful - but I suspect the DB ops. Regards, Bogdan Dave Singer wrote: Sometimes when I'm do a restart on opensips (using init.d script, with some customization to handle this problem) opensips takes quite a bit of time, like 30 - 50 seconds to stop. Other times it is very quick. I'm using 1.6.2 and 1.6.3. The servers are fairly busy, less then 200 calls per sec, with around 1000 sustained open calls. I am using dialog module and db mode is 3 (on shutdown) with postgresql 8.4. However since sometimes it is very quick with the same call volume it doesn't feel like this is the problem. Further I have had it be slow to stop when testing a config that is not using dialog at all and there are no active calls or any sip activity when I try to stop it. My hunch is slightly toward it is waiting on a transaction but not so sure. The pertinent part of my init.d script customizations are for after sending opensips the kill pid signal to every 0.1 seconds check if it has stopped yet then start it back up. Needless to say, having it take 50 seconds to restart, and not responding to sip traffic does not make customers happy when your dealing with thousands of call. :( Any thoughts or things to try would be appreciated. Thanks cando ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 20 - 24 September 2010, Frankfurt, Germany www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips long shutdown time
If this goes through to everyone on the list just ignore the paragraph below and look at the meat of the problem below it in the forward. This is/was my first post so I'm not sure exactly sure how things work. It has been a few days and I haven't seen it come out among the other emails from the list and I've seen no reply or find it on the list site. So I don't know if it is waiting for approval after my subscription, my subscriptions approval, someone to actually see it and have a thought on it I don't know. I'm patient but just want to make sure I'm not waiting on myself and not realizing it. :P Thanks On Fri, Aug 20, 2010 at 11:06 AM, cando wrote: Sometimes when I'm do a restart on opensips (using init.d script, with some customization to handle this problem) opensips takes quite a bit of time, like 30 - 50 seconds to stop. Other times it is very quick. I'm using 1.6.2 and 1.6.3. The servers are fairly busy, less then 200 calls per sec, with around 1000 sustained open calls. I am using dialog module and db mode is 3 (on shutdown) with postgresql 8.4. However since sometimes it is very quick with the same call volume it doesn't feel like this is the problem. Further I have had it be slow to stop when testing a config that is not using dialog at all and there are no active calls or any sip activity when I try to stop it. My hunch is slightly toward it is waiting on a transaction but not so sure. The pertinent part of my init.d script customizations are for after sending opensips the kill pid signal to every 0.1 seconds check if it has stopped yet then start it back up. Needless to say, having it take 50 seconds to restart, and not responding to sip traffic does not make customers happy when your dealing with thousands of calls. :( Any thoughts or things to try would be appreciated. Thanks cando ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] avp_db_load() fetch multiple attribute at one time
http://www.opensips.org/html/docs/modules/1.6.x/avpops.html#id228513 second example. I believe the main problem is the : (colon) I'm also not sure about your var $ruri. This should work: avp_db_load($ru/username, s); On Mon, Aug 23, 2010 at 2:55 AM, Sujeev suppo...@meewadaya.com wrote: Hello List, Please let me know how to load multiple attribute at one time. let say. my usr_preferences table has 3 attribute for single user (e.g fwdoffline,fwdbusy,callfwd). Now I load these 3 attributes at 3 times. I want to reduce DB queries :) I did this. --8 avp_db_load($ruri/username, $avp(s:)); xlog(TEST: OFF LINE FORWARD TO: $avp(s:fwdoffline)\n); xlog(TEST: BUSY FORWARD TO to: $avp(s:fwdbusy)\n); xlog(TEST: CALL FORWARD TO : $avp(s:callfwd)\n); --8 and the result was TEST : OFF LINE FORWARD TO: null TEST : BUSY FORWARD TO to: null TEST : CALL FORWARD TO : null P.S I followed this http://www.mail-archive.com/us...@openser.org/msg00589.html Thank you, Sujeev ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] opensips long shutdown time
Sometimes when I'm do a restart on opensips (using init.d script, with some customization to handle this problem) opensips takes quite a bit of time, like 30 - 50 seconds to stop. Other times it is very quick. I'm using 1.6.2 and 1.6.3. The servers are fairly busy, less then 200 calls per sec, with around 1000 sustained open calls. I am using dialog module and db mode is 3 (on shutdown) with postgresql 8.4. However since sometimes it is very quick with the same call volume it doesn't feel like this is the problem. Further I have had it be slow to stop when testing a config that is not using dialog at all and there are no active calls or any sip activity when I try to stop it. My hunch is slightly toward it is waiting on a transaction but not so sure. The pertinent part of my init.d script customizations are for after sending opensips the kill pid signal to every 0.1 seconds check if it has stopped yet then start it back up. Needless to say, having it take 50 seconds to restart, and not responding to sip traffic does not make customers happy when your dealing with thousands of call. :( Any thoughts or things to try would be appreciated. Thanks cando ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users