Re: [OpenSIPS-Users] About STUN server configuration
Hi Yagishita, The error is not related to STUN - I see you configured 127.0.0.1:5060 as a TCP listening interface, but it seams other application is already using it. Regards, Bogdan Koichi Yagishita wrote: Hi Bogdan, Thank you for your response. The following is output of /var/log/messages and ifconfig. [/var/log/messages] Jan 16 09:21:41 jrc opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.1.1 Jan 16 09:21:41 jrc opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.100.1 Jan 16 09:21:41 jrc opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.1.1 Jan 16 09:21:41 jrc opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.100.1 Jan 16 09:21:41 jrc opensips: INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected) Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: NOTICE:core:main: version: opensips 1.6.0-tls (i386/linux) Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:core:main: using 32 Mb shared memory Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:core:main: using 1 Mb private memory per process Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: NOTICE:signaling:mod_init: initializing module ... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:sl:mod_init: Initializing StateLess engine Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:tm:mod_init: TM - initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:maxfwd:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:usrloc:ul_init_locks: locks array size 512 Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:registrar:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:textops:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:xlog:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:acc:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:auth:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:auth_db:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb Jan 16 09:21:41 jrc last message repeated 2 times Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: ERROR:core:tcp_init: bind(a, 0x81ca8b4, 16) on 127.0.0.1:5060 : Address already in use [ifconfig] eth0 Link encap:Ethernet HWaddr 00:25:64:EB:13:33 inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0 inet6 addr: fe80::225:64ff:feeb:1333/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:400 errors:0 dropped:0 overruns:0 frame:0 TX packets:134 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:59253 (57.8 KiB) TX bytes:32835 (32.0 KiB) Memory:fe6e-fe70 eth0:1Link encap:Ethernet HWaddr 00:25:64:EB:13:33 inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Memory:fe6e-fe70 loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1660 errors:0 dropped:0 overruns:0 frame:0 TX packets:1660 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2581132 (2.4 MiB) TX bytes:2581132 (2.4 MiB) Regards, Yagishita ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] TLS errors
Hi Nir, the last command does create (if not present) or adds to (if already present) the current CA to the CA list file. Also, have you properly set the TLS related parameters in the config file? Regards, Bogdan nir elkayam wrote: hi, i follow the script on : http://www.opensips.org/html/docs/tutorials/tls-1.4.x.html mainly, generated root certificate with: opensipsctl tls rootCA and then generate user (i.e. sip server) certificate with: opensipsctl tls userCERT user about the file ca_list, the wiki say: To add more CAs to your list, just do: * cat add_cacert.pem calist.pem but not sure about that, doesn't the last command should have updated the ca list? i see that the file isn't empty.. nir On Fri, Jan 15, 2010 at 6:35 PM, Bogdan-Andrei Iancu bog...@voice-system.ro mailto:bog...@voice-system.ro wrote: Hi Nir, I see you manage to start opensips with TLS - what was your error? for _tls_read - that is very funny: SSL_read return err 5 (SSL_ERROR_SYSCALL) which means to look at error stack/return value/errno for the real error (the error was geerated somewhere deep in the SSL underlayers), but the errno is Success and stack is empty :P. Looks like a ghost error... for tls_accept - the error is in the stack, and after googling a bit - obviously the CA that signed your clients is not known to the server. Take a look at http://www.modssl.org/docs/2.8/ssl_howto.html#ToC6 http://www.modssl.org/docs/2.8/ssl_reference.html#ToC14 Regards, Bogdan nir elkayam wrote: hi, i am using opensips/TLS, i get the following error Jan 14 22:53:54 [19740] ERROR:core:_tls_read: SYSCALL error - (0) Success Jan 14 22:53:54 [19740] ERROR:core:_tls_read: something wrong in SSL: 5 Jan 14 22:53:54 [19740] ERROR:core:tcp_read_req: failed to read Jan 14 22:54:46 [19740] ERROR:core:tls_accept: some error in SSL (ret=0, err=1, errno=0/Success): Jan 14 22:54:46 [19740] ERROR:core:tls_print_errstack: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca any hinst about these? actually the client works but error in encryption process is not good, i think thanks ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro http://www.voice-system.ro ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- ניר אלקיים טל: 050-3930056 nir.elka...@gmail.com mailto:nir.elka...@gmail.com ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Need help with siptrace - trace_dialog and traced_avp_user.
Hi Alan, Normally (using only sip_trace fct), the tracing can be activated by flags (no username in sip_trace table) or by avp_traced_user (with name in sip_trace table) - of course, using them both will generate multiple records for the same SIP message. But looking at the trace_dialog() function, I see it forces all the time the flag (for the sequential requests), even if it was or not originally set. So, you will get the non-username records all the time. But in any case, you should get a complete set (with and/or without username) for the records. Regards, Bogdan Alan Frisch wrote: Been pulling out what's left of my hair on this one... I'm trying to get the siptrace module to record calls only using the trace_dialog() command at the initial invite. When I put the command in the invite route, everything works as it should. Now I am trying to get OpenSIPs to use the avp_traced_user parameter, so that it inserts the username where it can (even if not authenticated yet). But combination I try, using flags/not using flags, sip_trace() or dialog_trace() ends up with incomplete or duplicate entries with the username/no username in the sip_trace table. Is there a simple way of getting trace_dialog like output (initial invite to final BYEs, including ACKS), but have the traced_user field user set (even if the from user hasn't been authenticated yet)? Many thanks. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] my problems getting dialplan to work
Hi Wesley, if you set debug = 4, you will get a all the debug messages from the module. It will give you some hints if at least is matching any rule. But what I found strange is that tat the replt_exp field is empty - that is the part to be returned . Regards, Bogdan Wesley Volcov wrote: Hello Bogdan, I made the exemple you wrote above. My script: $var(x) = sip:06; dp_translate(1, $var(x)/$var(tmp)); xlog(-$var(tmp)\n); My database: mysql select * from dialplan; ++--++--++---++---+---+ | id | dpid | pr | match_op | match_exp | match_len | subst_exp | repl_exp | attrs | ++--++--++---++---+---+ | 1 |1 | 0 |1 | (sip:06.+) | 0 | (sip:06.+) | wes...@voicetechnology.com.br | 0 | ++--++--++---++---+---+ 1 row in set (0.00 sec) My log file: Jan 15 15:30:11 localhost opensips[22981]: -0 I have no log of dialplan module. Is there some configuration to active this module debug ? Regards, Wesley. -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] SIP Status 486 goes to onreply instead of failure route
Hi Mike, All replied do get first in onreply_route (provisional, success or failure). After that, only the negative replies trigger the failure route. See : http://www.opensips.org/Resources/DocsCoreRoutes16 Regards, Bogdan Mike O'Connor wrote: Hi All Is there any way that I could have broken or changed something which would cause a sip busy (486) to go to onreply route instead of failure route ? Thanks Mike ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] SEAS not Loading
Hi Nathaniel, What version of opensips are you trying and what OS you are running on ? Regards, Bogdan Nathaniel L Keeling wrote: Hello, I am trying to load the seas module and I am getting this error: ERROR:core:sr_load_module: could not open module /data/opensips/lib64/opensips/modules/seas.so: ld.so.1: opensips: fatal: relocation error: file /data/opensips/lib64/opensips/modules/seas.so: symbol dprintf: referenced symbol not found Is this error due to not able to find a library? Any help would be appreciated. Thanks Nathaniel ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] TLS errors
hi, attached the lines from the cfg file: r...@:/usr/local/etc/opensips# cat opensips.cfg | grep tls disable_tls = no listen = tls:X.X.X.X:30100 tls_port_no = 30100 tls_verify_server = 0 tls_verify_client = 0 tls_require_client_certificate = 0 tls_method = TLSv1 tls_certificate = /usr/local/etc/opensips/tls/user/user-cert.pem tls_private_key = /usr/local/etc/opensips/tls/user/user-privkey.pem tls_ca_list = /usr/local/etc/opensips/tls/user/user-calist.pem thanks for the help, nir On Mon, Jan 18, 2010 at 3:41 PM, Bogdan-Andrei Iancu bog...@voice-system.ro wrote: Hi Nir, the last command does create (if not present) or adds to (if already present) the current CA to the CA list file. Also, have you properly set the TLS related parameters in the config file? Regards, Bogdan nir elkayam wrote: hi, i follow the script on : http://www.opensips.org/html/docs/tutorials/tls-1.4.x.html mainly, generated root certificate with: opensipsctl tls rootCA and then generate user (i.e. sip server) certificate with: opensipsctl tls userCERT user about the file ca_list, the wiki say: To add more CAs to your list, just do: * cat add_cacert.pem calist.pem but not sure about that, doesn't the last command should have updated the ca list? i see that the file isn't empty.. nir On Fri, Jan 15, 2010 at 6:35 PM, Bogdan-Andrei Iancu bog...@voice-system.ro mailto:bog...@voice-system.ro wrote: Hi Nir, I see you manage to start opensips with TLS - what was your error? for _tls_read - that is very funny: SSL_read return err 5 (SSL_ERROR_SYSCALL) which means to look at error stack/return value/errno for the real error (the error was geerated somewhere deep in the SSL underlayers), but the errno is Success and stack is empty :P. Looks like a ghost error... for tls_accept - the error is in the stack, and after googling a bit - obviously the CA that signed your clients is not known to the server. Take a look at http://www.modssl.org/docs/2.8/ssl_howto.html#ToC6 http://www.modssl.org/docs/2.8/ssl_reference.html#ToC14 Regards, Bogdan nir elkayam wrote: hi, i am using opensips/TLS, i get the following error Jan 14 22:53:54 [19740] ERROR:core:_tls_read: SYSCALL error - (0) Success Jan 14 22:53:54 [19740] ERROR:core:_tls_read: something wrong in SSL: 5 Jan 14 22:53:54 [19740] ERROR:core:tcp_read_req: failed to read Jan 14 22:54:46 [19740] ERROR:core:tls_accept: some error in SSL (ret=0, err=1, errno=0/Success): Jan 14 22:54:46 [19740] ERROR:core:tls_print_errstack: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca any hinst about these? actually the client works but error in encryption process is not good, i think thanks ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro http://www.voice-system.ro ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- ניר אלקיים טל: 050-3930056 nir.elka...@gmail.com mailto:nir.elka...@gmail.com ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- ניר אלקיים טל: 050-3930056 nir.elka...@gmail.com ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] lookup b flag - one registration at a time
Hi Jeff, Jeff Pyle wrote: Iñaki, On Jan 9, 2010, at 5:00 PM, Iñaki Baz Castillo wrote: El Sábado, 9 de Enero de 2010, Jeff Pyle escribió: Hello, The docs say that when using the b flag with lookup() when multiple records are present, it will load only the one with the highest q. What if the q is the same for all? How does it decide which to use? I've not tested it with multiple users sharing same q. however it should fetch all the users with highest q, not just one of them. Perhaps I'm asking the wrong question. I'm looking to allow only one registration per user in the sense that if a second successful registration comes in it will replace tne existing one. My approach so far is to use a max_contacts=2 and the lookup() function with the b flag to retrieve only one. maybe without the b flag as the b flag will return you all the registered contacts. max_contacts=1 returns a 503 to the new replacement registration request, so that's out. Perhaps the hot ticket is to run an all-DB mode running a manual mysql query with avp_db_query after successful REGISTER authentication but before the save() so we can remove any existing registrations before the new one is saved. Thoughts? No way - the SIP contact matching is much to complicated to do it at DB level. As I found that kind of behaviour was more and more asked by people, I will add a new flag f to force at save() time the override of the existing contacts if the max_contacts() was exceeded. Regards, Bogdan - Jeff ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] INVITE with unknown udp port number
Hi Yagishita, If different than 5060 (default) the port is required in SIP. BTW, the call to UA2 is done via lookup(location) ? if so, check via the opensipsctl ul show UA2_AOR the contacts the UA2 has registered with opensips. Regards, Bogdan Koichi Yagishita wrote: Thank you very much Bogdan, The following is the sequence of this problem. My OpenSIPS1.5.0 has transmitted 2 INVITEs with unknown udp port number between OpenSIPS1.5.0 and SIP UA2 as shown below. I do not understand why the port numbers is included in the each INVITE. SIP UA1OpenSIPS1.5.0SIP UA2 |REGISTER (src port:36774) || |-|| |200 OK (dst port:36774) || |-| REGISTER (src port:34722)| | |---| | | 200 OK (dst port:34722) | | |---| |INVITE (src port:36774) || |-| INVITE | | | (dst port:13249, | | |Request-Line: 13249)| | |---| | | INVITE | | | (dst port:7232, | | |Request-Line: 7232) | | |---| | | Port unreachable | | | (dst port:13249) | | |---| | | Port unreachable | | | (dst port:7232) | | |---| Regards, Yagishita Hi Yagishita, what you mean by INVITE with unknown udp port number ? where is this port missing from ? is from the SIP message ? Could you post the INVITE request? Regards, Bogdan Koichi Yagishita wrote: Dear all, I am facing the following problem during INVITE transaction. Since my opensips-1.5.0 has forwarded INVITE with unknown udp port number to X-Lite as SIP UA, Port unreachable occurs at SIP UA and INVITE transaction fails. Could anyone teach me why the unknown udp port number is set and how this problem should be fixed? Regards, Yagishita ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Call Forward on Busy but not to feature server
Hi Mike, Could describe in more details the call flow you have there ? I do not understand your scenario here. Regards, Bogdan Mike O'Connor wrote: Hi All Anytime I forward a call to the same instance of opensips the CPE which was initially rung will re-ring, if I sent the call directly to a different CPE it works. So it seems to me that I'm going to have to setup an asterisk server which receives the forwarded call then sends the call back to opensips with the corrected details. Any one got a better idea ? Thanks Mike On 8/01/10 7:37 PM, Mike O'Connor wrote: 'Hi All The follow does not work, I've never seen an example of anyone trying to use avp's to do this. All the example I've seen do a 'sethostport' to a static address and then a t_relay. ## sethostport(192.168.2.100:5060); ## # do not set the missed call flag again ## t_relay(); In the code below $avp(s:callfwdbusy) is currently resolving to ' sip:500101@local domain' failure_route[ONFAILURE_ROUTE] { if (t_was_cancelled()) { exit; } if (t_check_status(486|408)) { if (is_avp_set($avp(s:callfwdbusy))) { if (is_avp_set($avp(s:callfwdbusy))) { $ru = $avp(s:callfwdbusy); -- Comments about this line below t_relay(); } } } } I've tried a number of command for the line with the comment. rewriteuri($avp(s:callfwdbusy); This seemed to be the best option but opensips required arround it, but once there it does not convert this string to a value. Again any help is appreciated. Cheers Mike ___ 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 -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Dialog Problem
Hi Ashwini, Enable full logging (debug=4) and see if the BYE requests to match the dialog (or post there the logging corresponding to BYE processing). Regards, Bogdan ASHWINI NAIDU wrote: Hi Bogdan, The calls are terminated by the users. when i check the dlg_list MI command i see the first 2 calls dialog still hanging over there. On Fri, Jan 8, 2010 at 2:36 PM, Bogdan-Andrei Iancu bog...@voice-system.ro mailto:bog...@voice-system.ro wrote: Hi Ashwini, So you have 3 concurrent calls between same 2 users ? You say the calls are disconnected - are they terminated by users or by opensips ? Have you check with the dlg_list MI command what is in opensips cache? Regards, Bogdan ASHWINI NAIDU wrote: Hi all, I have installed opensips 1.6 . When i make a call between 2 users (3 concurrent calls), when the calls is disconnect only the dialog of the latest call is deleted from the dialog table. other 2 calls dialog hang around in the DB. Another strange behavior seen is that the callid of BYE's of the first 2 calls are completely different from the invite they used to initiate the call -- Thanking You, Ashwini BR Naidu ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro http://www.voice-system.ro ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Thanking You, Ashwini BR Naidu ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] How to limit channel on bunch of called DIDs?
Hi, you do not need any loop - just set as key for profiling the DID number and add to that profile the calls related to that DID. Regards, Bogdan Johnson Pajayat wrote: Hi Bogdan, I was able to implement the channel limiting on one DID by using a variable instead of AVP and replacing all instances of $tU to $rU. Now, I want to limit the channels to a set of DIDs and I'm thinking of implementing a while loop and counter in order to achieve it. Is this an efficient way of doing the limiting on a set of DIDs? One problem I can think with the while loop and counter will be how to deduct those calls that were already hung up by the caller. Again, inputs will be greatly appreciated. Thank you very much. --conpaj-- On Fri, Jan 8, 2010 at 4:53 PM, Bogdan-Andrei Iancu bog...@voice-system.ro mailto:bog...@voice-system.ro wrote: Hi It is hard to review scripts to see where the problem is, but I will help you with some hints on troubleshooting. First of all you need to be sure you put in the profiles the calls you wants - put some xlog() around the place where you add the call in the profile (in the script). Be sure you create the dialog (use create_dialog() before adding it into profile). After that, you can check with MI function to see the profile content (http://www.opensips.org/html/docs/modules/devel/dialog.html#id272772) Regards, Bogdan Johnson Pajayat wrote: Hello Bogdan, I appreciate a lot your response regarding my inquiry. I've been reading that tutorial as well as the AVPops and dialog modules documentation for about a month now. I tried to adapt that route block for inbound calls and here's a portion of what I have on our OpenSIPS 1.5 config file: --- modparam(dialog, dlg_flag, 4) modparam(dialog, profiles_with_value, inbound) .. } else if (uri=~sip:1234567...@.*) { route(3); rewritehost(111.222.111.222); ... route[3] { ## have we done our checking on this call? if(!isflagset(31)) { # user has max channel limit set as preference if(is_avp_set($avp(s:channels)/n) avp_check($avp(s:channels), gt/i:0)) { # get the current calls for DID get_profile_size(inbound,$tU,$var(calls)); # check within limit if($avp(s:channels) $var(calls)) { xlog(L_INFO, Call control: DID '$tU' currently has '$var(calls)' of '$avp(s:channels)' active calls before this one\n); $var(setprofile) = 1; } else { xlog(L_INFO, Call control: DID '$tU' channel limit exceeded [$var(calls)/$avp(s:channels)] \n); send_reply(487, Request Terminated: Channel limit exceeded\n); exit; } } else { $var(setprofile) = 0; } call_control(); switch ($retcode) { case 2: # Call with no limit case 1: # Call with a limit under callcontrol management (either prepaid or postpaid) break; case -1: # Not enough credit (prepaid call) xlog(L_INFO, Call control: not enough credit for prepaid call\n); acc_rad_request(402); sl_send_reply(402, Not enough credit); exit; break; case -2: # Locked by call in progress (prepaid call) xlog(L_INFO, Call control: prepaid call locked by another call in progress\n); acc_rad_request(403); sl_send_reply(403, Call locked by another call in progress);
Re: [OpenSIPS-Users] lookup b flag - one registration at a time
The f flag sounds fantastic. Thanks. - Jeff On Jan 18, 2010, at 9:24 AM, Bogdan-Andrei Iancu wrote: Hi Jeff, Jeff Pyle wrote: Iñaki, On Jan 9, 2010, at 5:00 PM, Iñaki Baz Castillo wrote: El Sábado, 9 de Enero de 2010, Jeff Pyle escribió: Hello, The docs say that when using the b flag with lookup() when multiple records are present, it will load only the one with the highest q. What if the q is the same for all? How does it decide which to use? I've not tested it with multiple users sharing same q. however it should fetch all the users with highest q, not just one of them. Perhaps I'm asking the wrong question. I'm looking to allow only one registration per user in the sense that if a second successful registration comes in it will replace tne existing one. My approach so far is to use a max_contacts=2 and the lookup() function with the b flag to retrieve only one. maybe without the b flag as the b flag will return you all the registered contacts. max_contacts=1 returns a 503 to the new replacement registration request, so that's out. Perhaps the hot ticket is to run an all-DB mode running a manual mysql query with avp_db_query after successful REGISTER authentication but before the save() so we can remove any existing registrations before the new one is saved. Thoughts? No way - the SIP contact matching is much to complicated to do it at DB level. As I found that kind of behaviour was more and more asked by people, I will add a new flag f to force at save() time the override of the existing contacts if the max_contacts() was exceeded. Regards, Bogdan - Jeff ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users Regards, Jeff Pyle Director, Voice Engineering Fidelity Voice Data | 23250 Chagrin Blvd, Suite 250 | Beachwood, Ohio 44122 P: 216-245-4106 F: 216-595-0706 E: jp...@fidelityvoice.com Visit us at http://www.fidelityvoice.com 2008 2009 Inductee to the prestigious Weatherhead 100 attachment: image.jpg ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Need Help on integrating opensips with mysql on remote machine
yes, with same user-name and passwd i am able to login from opensips box to remote mysql server. On Mon, Jan 18, 2010 at 11:41 AM, ram-2-3 [via OpenSIPS (Open SIP Server)] ml-node+4412061-17454...@n2.nabble.comml-node%2b4412061-17454...@n2.nabble.com wrote: are you able to login to remote mysql server from opensips box ? On Sun, Jan 17, 2010 at 5:50 AM, Alok Kushwaha [hidden email]http://n2.nabble.com/user/SendEmail.jtp?type=nodenode=4412061i=0 wrote: Hi! ram thanks for reply. yes , i have set this option. like - mysql://user:db_passw...@remote_db_ip_address/opensips ram-2-3 wrote: have you set this option in the config *mysql*://user:db_passw...@remote_db_ip_address/opensips On Mon, Jan 11, 2010 at 12:15 PM, Alok Kushwaha [hidden email]http://n2.nabble.com/user/SendEmail.jtp?type=nodenode=4412061i=1 wrote: Hi! All, I am using opensips 1.5 and installed using source. my DB server (mysql) is running on a remote machine. I have enabled the remote access and granted the proper privileges. I started the opensips with service opensips start but it stopped in 2 minutes. and follwing error message is logged - (in /var/log/message) Jan 11 07:01:15 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.11 Jan 11 07:01:35 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.12 Jan 11 07:01:55 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.13 Jan 11 07:02:15 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.14 Jan 11 07:02:35 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.15 Jan 11 07:02:56 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.11 Jan 11 07:03:16 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.12 Jan 11 07:03:36 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.13 Jan 11 07:03:56 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.14 Jan 11 07:04:16 localhost opensips: WARNING:core:fix_socket_list: could not rev. resolve 200.200.100.15 Jan 11 07:04:16 localhost opensips: INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected) Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: NOTICE:core:main: version: opensips 1.5.0-notls (i386/linux) Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:core:main: using 32 Mb shared memory Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:core:main: using 1 Mb private memory per process Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: NOTICE:signaling:mod_init: initializing module ... Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:sl:mod_init: Initializing StateLess engine Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:tm:mod_init: TM - initializing... Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:maxfwd:mod_init: initializing... Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:usrloc:ul_init_locks: locks array size 512 Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:registrar:mod_init: initializing... Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:textops:mod_init: initializing... Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:xlog:mod_init: initializing... Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:acc:mod_init: initializing... Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:auth:mod_init: initializing... Jan 11 07:04:16 localhost /usr/local/sbin/opensips[4645]: INFO:auth_db:mod_init: initializing... Jan 11 07:04:36 localhost /usr/local/sbin/opensips[4645]: INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb Jan 11 07:06:36 localhost /usr/local/sbin/opensips[4645]:last message repeated 5 times Jan 11 07:06:36 localhost /usr/local/sbin/opensips[4663]: ERROR:db_mysql:db_mysql_new_connection: driver error(2003): Can't connect to MySQL server on '200.200.100.22' (4) Jan 11 07:06:36 localhost /usr/local/sbin/opensips[4663]: ERROR:core:db_do_init: could not add connection to the pool Jan 11 07:06:36 localhost /usr/local/sbin/opensips[4663]: ERROR:auth_db:child_init: unable to connect to the database Jan 11 07:06:36 localhost /usr/local/sbin/opensips[4663]: ERROR:core:init_mod_child: failed to initializing module auth_db, rank 17 Jan 11 07:06:36 localhost /usr/local/sbin/opensips[4663]: ERROR:core:main_loop: init_child failed for UDP listener Jan 11 07:06:36 localhost /usr/local/sbin/opensips[4665]: ERROR:db_mysql:db_mysql_new_connection: driver error(2003): Can't connect to MySQL server on
Re: [OpenSIPS-Users] my problems getting dialplan to work
Hello Bogdan! I think you could not see the repl_exp value because the line break, this value is my email address (I'm using nabble.com and hiden the email). About debud level, I'm already using debug = 4, but It's not working anyway. I tested with debug =9, but the log appears the same. When I start opensips I can see a strange log: Jan 15 16:01:07 localhost opensips[23064]: ERROR:dialplan:trex_charnode: TREX error letter expected Jan 15 16:01:07 localhost opensips[23064]: ERROR:dialplan:trex_compile: compilation error [letter expected]! Jan 15 16:01:07 localhost opensips[23064]: ERROR:dialplan:build_rule: failed to compile subst expression Jan 15 16:01:07 localhost opensips[23064]: WARNING:dialplan:dp_load_db: failed to build rule - skipping I've deleted all data in dialplan table, but it's still happening. Regards, Wesley Bogdan-Andrei Iancu wrote: Hi Wesley, if you set debug = 4, you will get a all the debug messages from the module. It will give you some hints if at least is matching any rule. But what I found strange is that tat the replt_exp field is empty - that is the part to be returned . Regards, Bogdan Wesley Volcov wrote: Hello Bogdan, I made the exemple you wrote above. My script: $var(x) = sip:06; dp_translate(1, $var(x)/$var(tmp)); xlog(-$var(tmp)\n); My database: mysql select * from dialplan; ++--++--++---++---+---+ | id | dpid | pr | match_op | match_exp | match_len | subst_exp | repl_exp | attrs | ++--++--++---++---+---+ | 1 |1 | 0 |1 | (sip:06.+) | 0 | (sip:06.+) | wes...@voicetechnology.com.br | 0 | ++--++--++---++---+---+ 1 row in set (0.00 sec) My log file: Jan 15 15:30:11 localhost opensips[22981]: -0 I have no log of dialplan module. Is there some configuration to active this module debug ? Regards, Wesley. -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- View this message in context: http://n2.nabble.com/my-problems-getting-dialplan-to-work-tp3081563p4414342.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
Re: [OpenSIPS-Users] Is RPID being cached?
Bogdan, Thanks for the info. I load the RPID with the modparam(auth_db, load_credentials, rpid) and put it into $avp(s:rpid). As long as OpenSIPS is in forked mode, it works fine. But when I was running it in non-forked mode is when I saw the retention behavior. Seems the RPID would stick when the column was NULLed, only a restart of OpenSIPS would get it back to no value. A.F. On Fri, Jan 15, 2010 at 11:22 AM, Bogdan-Andrei Iancu bog...@voice-system.ro wrote: Hi Alan, rpid is in subscriber table and should have nothing to do with usrloc (and db_mode). How do you load the rpid and where do you store it (what kind of variable) ? Regards, Bogdan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] my problems getting dialplan to work
Hi Wesley, if you deleted the whole table, it is impossible to get that error (with no rules to load). Check if you are loading form the right server/DB/table. Regards, Bogdan Wesley Volcov wrote: Hello Bogdan! I think you could not see the repl_exp value because the line break, this value is my email address (I'm using nabble.com and hiden the email). About debud level, I'm already using debug = 4, but It's not working anyway. I tested with debug =9, but the log appears the same. When I start opensips I can see a strange log: Jan 15 16:01:07 localhost opensips[23064]: ERROR:dialplan:trex_charnode: TREX error letter expected Jan 15 16:01:07 localhost opensips[23064]: ERROR:dialplan:trex_compile: compilation error [letter expected]! Jan 15 16:01:07 localhost opensips[23064]: ERROR:dialplan:build_rule: failed to compile subst expression Jan 15 16:01:07 localhost opensips[23064]: WARNING:dialplan:dp_load_db: failed to build rule - skipping I've deleted all data in dialplan table, but it's still happening. Regards, Wesley Bogdan-Andrei Iancu wrote: Hi Wesley, if you set debug = 4, you will get a all the debug messages from the module. It will give you some hints if at least is matching any rule. But what I found strange is that tat the replt_exp field is empty - that is the part to be returned . Regards, Bogdan Wesley Volcov wrote: Hello Bogdan, I made the exemple you wrote above. My script: $var(x) = sip:06; dp_translate(1, $var(x)/$var(tmp)); xlog(-$var(tmp)\n); My database: mysql select * from dialplan; ++--++--++---++---+---+ | id | dpid | pr | match_op | match_exp | match_len | subst_exp | repl_exp | attrs | ++--++--++---++---+---+ | 1 |1 | 0 |1 | (sip:06.+) | 0 | (sip:06.+) | wes...@voicetechnology.com.br | 0 | ++--++--++---++---+---+ 1 row in set (0.00 sec) My log file: Jan 15 15:30:11 localhost opensips[22981]: -0 I have no log of dialplan module. Is there some configuration to active this module debug ? Regards, Wesley. -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Minimum length of call
Hi List, When a user hangs up a call (call comes into proxy, connects to PSTN) and if the user that made the call hangups before a certain amount of time I want to delay sending the BYE to the upstream carrier, but ACK the BYE to the person they called and then have acc show the correct call timestamps of when the user really hanged up. Basically if a call is less then say 12 seconds id like to sleep() a few seconds until it's past 12 seconds then hang the call up. Inside the loose_route() and is_method(BYE) I put this: $avp(s:nowts)=$Ts; $avp(s:calllength)=$avp(s:calltime) - $Ts; if($avp(s:calllength) 6){ $avp(s:sleeptime)= 6 - $avp(s:calllength); xlog(L_NOTICE,Now TS: $Ts Call was $avp(s:calllength) seconds long, sleeping for $avp(s:sleeptime)); #sleep($avp(s:sleeptime)); } else { xlog(L_NOTICE,Now TS: $Ts Call was $avp(s:calllength) seconds long, not sleeping); } Inside the onreply_route I put this: if(t_check_status(200) is_method(INVITE)){ $avp(s:calltime)=$Ts; xlog(L_NOTICE,Call connected at $avp(s:calltime)); } To me I would think I would then have the timestamp at when the call started (that parts works), then in the loose_route() I could take the current timestamp and subtract the two, then if less the X seconds, sleep before it sends the BYE. I know their is more to it then that, but as a starting point the $avp(s:calltime) var is NULL when the call hits loose_route() is, I have verified this by the log. Any help / insight on this would be great, I would think the variables would be accessible anyway I try to check for values, but it appears that is not the case. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Minimum length of call
Ron, Are you trying to avoid short-call charges from your carrier? It's not easy. Even if this were possible, it wouldn't help if the far-end were to hang up first. Even if they don't hang up first, they're likely going to hang up during this 12-second window you're looking to create in Opensips. At best you'd buy yourself a second or so beyond actual disconnect time. This isn't a good idea at the SIP level either. If you were to delay a BYE, you're going to get retransmissions from your UAC because it's looking for a 200 OK. The only way I could think of doing it would be in a custom B2B scenario, but even then, it probably wouldn't work well. And in my opinion it's very complicated. - Jeff On Jan 18, 2010, at 3:55 PM, Ron McCarthy wrote: Hi List, When a user hangs up a call (call comes into proxy, connects to PSTN) and if the user that made the call hangups before a certain amount of time I want to delay sending the BYE to the upstream carrier, but ACK the BYE to the person they called and then have acc show the correct call timestamps of when the user really hanged up. Basically if a call is less then say 12 seconds id like to sleep() a few seconds until it's past 12 seconds then hang the call up. Inside the loose_route() and is_method(BYE) I put this: $avp(s:nowts)=$Ts; $avp(s:calllength)=$avp(s:calltime) - $Ts; if($avp(s:calllength) 6){ $avp(s:sleeptime)= 6 - $avp(s:calllength); xlog(L_NOTICE,Now TS: $Ts Call was $avp(s:calllength) seconds long, sleeping for $avp(s:sleeptime)); #sleep($avp(s:sleeptime)); } else { xlog(L_NOTICE,Now TS: $Ts Call was $avp(s:calllength) seconds long, not sleeping); } Inside the onreply_route I put this: if(t_check_status(200) is_method(INVITE)){ $avp(s:calltime)=$Ts; xlog(L_NOTICE,Call connected at $avp(s:calltime)); } To me I would think I would then have the timestamp at when the call started (that parts works), then in the loose_route() I could take the current timestamp and subtract the two, then if less the X seconds, sleep before it sends the BYE. I know their is more to it then that, but as a starting point the $avp(s:calltime) var is NULL when the call hits loose_route() is, I have verified this by the log. Any help / insight on this would be great, I would think the variables would be accessible anyway I try to check for values, but it appears that is not the case. ___ Users mailing list Users@lists.opensips.orgmailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users Regards, Jeff Pyle Director, Voice Engineering Fidelity Voice Data | 23250 Chagrin Blvd, Suite 250 | Beachwood, Ohio 44122 P: 216-245-4106 F: 216-595-0706 E: jp...@fidelityvoice.commailto:jp...@fidelityvoice.com Visit us at http://www.fidelityvoice.com 2008 2009 Inductee to the prestigious Weatherhead 100 [cid:3346398359_35099714] inline: image.jpg___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Minimum length of call
Jeff, Yes, that's the goal anyways :) I guess in my mind I thought if I could delay the BYE from going to the upstream BUT send the BYE to the customer / ACK the BYE they sent then the end user has no ideal what's going on and we just leave the channel open for 5 to 11 seconds and then send the BYE to the upstream. Seemed that easy anyways, but figured it would not be. If the far end hangs up that's fine, we get the BYE, ACK that BYE but do not send the BYE to the upstream, this in theory is correct right? Ill have to look into b2b more, that might be the answer, we shall see. Thanks for the input. On Mon, Jan 18, 2010 at 2:00 PM, Jeff Pyle jp...@fidelityvoice.com wrote: Ron, Are you trying to avoid short-call charges from your carrier? It's not easy. Even if this were possible, it wouldn't help if the far-end were to hang up first. Even if they don't hang up first, they're likely going to hang up during this 12-second window you're looking to create in Opensips. At best you'd buy yourself a second or so beyond actual disconnect time. This isn't a good idea at the SIP level either. If you were to delay a BYE, you're going to get retransmissions from your UAC because it's looking for a 200 OK. The only way I could think of doing it would be in a custom B2B scenario, but even then, it probably wouldn't work well. And in my opinion it's very complicated. - Jeff On Jan 18, 2010, at 3:55 PM, Ron McCarthy wrote: Hi List, When a user hangs up a call (call comes into proxy, connects to PSTN) and if the user that made the call hangups before a certain amount of time I want to delay sending the BYE to the upstream carrier, but ACK the BYE to the person they called and then have acc show the correct call timestamps of when the user really hanged up. Basically if a call is less then say 12 seconds id like to sleep() a few seconds until it's past 12 seconds then hang the call up. Inside the loose_route() and is_method(BYE) I put this: $avp(s:nowts)=$Ts; $avp(s:calllength)=$avp(s:calltime) - $Ts; if($avp(s:calllength) 6){ $avp(s:sleeptime)= 6 - $avp(s:calllength); xlog(L_NOTICE,Now TS: $Ts Call was $avp(s:calllength) seconds long, sleeping for $avp(s:sleeptime)); #sleep($avp(s:sleeptime)); } else { xlog(L_NOTICE,Now TS: $Ts Call was $avp(s:calllength) seconds long, not sleeping); } Inside the onreply_route I put this: if(t_check_status(200) is_method(INVITE)){ $avp(s:calltime)=$Ts; xlog(L_NOTICE,Call connected at $avp(s:calltime)); } To me I would think I would then have the timestamp at when the call started (that parts works), then in the loose_route() I could take the current timestamp and subtract the two, then if less the X seconds, sleep before it sends the BYE. I know their is more to it then that, but as a starting point the $avp(s:calltime) var is NULL when the call hits loose_route() is, I have verified this by the log. Any help / insight on this would be great, I would think the variables would be accessible anyway I try to check for values, but it appears that is not the case. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users Regards, *Jeff Pyle* *Director, Voice Engineering* *Fidelity Voice Data* | 23250 Chagrin Blvd, Suite 250 | Beachwood, Ohio 44122 P: 216-245-4106 F: 216-595-0706 E: jp...@fidelityvoice.com Visit us at http://www.fidelityvoice.com 2008 2009 Inductee to the prestigious Weatherhead 100 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users image.jpg___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Minimum length of call
Ron, No, I don't believe the theory is not correct. I'm going to think you have a customer that gets hung up on a lot, generating short-call surcharges from your carriers. You want to delay the BYE you send to the carrier... except that's not what triggers the call disconnect. The disconnect likely comes from the far-end via the carrier that's charging you. They're going to stop the clock when they send you BYE, not when you reply with a 200 OK. Delaying the BYE through your proxy isn't going to help your bottom line. It'll just make your network messy. - Jeff On Jan 18, 2010, at 4:18 PM, Ron McCarthy wrote: Jeff, Yes, that's the goal anyways :) I guess in my mind I thought if I could delay the BYE from going to the upstream BUT send the BYE to the customer / ACK the BYE they sent then the end user has no ideal what's going on and we just leave the channel open for 5 to 11 seconds and then send the BYE to the upstream. Seemed that easy anyways, but figured it would not be. If the far end hangs up that's fine, we get the BYE, ACK that BYE but do not send the BYE to the upstream, this in theory is correct right? Ill have to look into b2b more, that might be the answer, we shall see. Thanks for the input. On Mon, Jan 18, 2010 at 2:00 PM, Jeff Pyle jp...@fidelityvoice.commailto:jp...@fidelityvoice.com wrote: Ron, Are you trying to avoid short-call charges from your carrier? It's not easy. Even if this were possible, it wouldn't help if the far-end were to hang up first. Even if they don't hang up first, they're likely going to hang up during this 12-second window you're looking to create in Opensips. At best you'd buy yourself a second or so beyond actual disconnect time. This isn't a good idea at the SIP level either. If you were to delay a BYE, you're going to get retransmissions from your UAC because it's looking for a 200 OK. The only way I could think of doing it would be in a custom B2B scenario, but even then, it probably wouldn't work well. And in my opinion it's very complicated. - Jeff On Jan 18, 2010, at 3:55 PM, Ron McCarthy wrote: Hi List, When a user hangs up a call (call comes into proxy, connects to PSTN) and if the user that made the call hangups before a certain amount of time I want to delay sending the BYE to the upstream carrier, but ACK the BYE to the person they called and then have acc show the correct call timestamps of when the user really hanged up. Basically if a call is less then say 12 seconds id like to sleep() a few seconds until it's past 12 seconds then hang the call up. Inside the loose_route() and is_method(BYE) I put this: $avp(s:nowts)=$Ts; $avp(s:calllength)=$avp(s:calltime) - $Ts; if($avp(s:calllength) 6){ $avp(s:sleeptime)= 6 - $avp(s:calllength); xlog(L_NOTICE,Now TS: $Ts Call was $avp(s:calllength) seconds long, sleeping for $avp(s:sleeptime)); #sleep($avp(s:sleeptime)); } else { xlog(L_NOTICE,Now TS: $Ts Call was $avp(s:calllength) seconds long, not sleeping); } Inside the onreply_route I put this: if(t_check_status(200) is_method(INVITE)){ $avp(s:calltime)=$Ts; xlog(L_NOTICE,Call connected at $avp(s:calltime)); } To me I would think I would then have the timestamp at when the call started (that parts works), then in the loose_route() I could take the current timestamp and subtract the two, then if less the X seconds, sleep before it sends the BYE. I know their is more to it then that, but as a starting point the $avp(s:calltime) var is NULL when the call hits loose_route() is, I have verified this by the log. Any help / insight on this would be great, I would think the variables would be accessible anyway I try to check for values, but it appears that is not the case. ___ Users mailing list Users@lists.opensips.orgmailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users Regards, Jeff Pyle Director, Voice Engineering Fidelity Voice Data | 23250 Chagrin Blvd, Suite 250 | Beachwood, Ohio 44122 P: 216-245-4106 F: 216-595-0706 E: jp...@fidelityvoice.commailto:jp...@fidelityvoice.com Visit us at http://www.fidelityvoice.comhttp://www.fidelityvoice.com/ 2008 2009 Inductee to the prestigious Weatherhead 100 image.jpg ___ Users mailing list Users@lists.opensips.orgmailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.orgmailto: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] Mysql stored proc
I am in the process of putting all the OpenSIPS modules and AG Projects together to create a carrier-grade service and think this is something that can be used. I am far from implementing what you speak of above, but it would be very helpful. Nothing is better then saving money but not at the expense of quality. I know in the past you had posted a question about PDD. It would be nice maybe to have something added to the QoS module that could keep up with PDD and ASR maybe. thats my 2 cents. Maybe one day when I get my proof of concept off the ground I can come back to this. -- View this message in context: http://n2.nabble.com/Mysql-stored-proc-tp3060191p4417406.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
Re: [OpenSIPS-Users] About STUN server configuration
Hi Bogdan, Thank you very much for the response. This issue has been solved. Regards, Yagishita Hi Yagishita, The error is not related to STUN - I see you configured 127.0.0.1:5060 as a TCP listening interface, but it seams other application is already using it. Regards, Bogdan Koichi Yagishita wrote: Hi Bogdan, Thank you for your response. The following is output of /var/log/messages and ifconfig. [/var/log/messages] Jan 16 09:21:41 jrc opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.1.1 Jan 16 09:21:41 jrc opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.100.1 Jan 16 09:21:41 jrc opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.1.1 Jan 16 09:21:41 jrc opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.100.1 Jan 16 09:21:41 jrc opensips: INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected) Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: NOTICE:core:main: version: opensips 1.6.0-tls (i386/linux) Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:core:main: using 32 Mb shared memory Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:core:main: using 1 Mb private memory per process Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: NOTICE:signaling:mod_init: initializing module ... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:sl:mod_init: Initializing StateLess engine Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:tm:mod_init: TM - initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:maxfwd:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:usrloc:ul_init_locks: locks array size 512 Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:registrar:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:textops:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:xlog:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:acc:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:auth:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:auth_db:mod_init: initializing... Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb Jan 16 09:21:41 jrc last message repeated 2 times Jan 16 09:21:41 jrc /usr/local/sbin/opensips[4991]: ERROR:core:tcp_init: bind(a, 0x81ca8b4, 16) on 127.0.0.1:5060 : Address already in use [ifconfig] eth0 Link encap:Ethernet HWaddr 00:25:64:EB:13:33 inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0 inet6 addr: fe80::225:64ff:feeb:1333/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:400 errors:0 dropped:0 overruns:0 frame:0 TX packets:134 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:59253 (57.8 KiB) TX bytes:32835 (32.0 KiB) Memory:fe6e-fe70 eth0:1Link encap:Ethernet HWaddr 00:25:64:EB:13:33 inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Memory:fe6e-fe70 loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1660 errors:0 dropped:0 overruns:0 frame:0 TX packets:1660 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2581132 (2.4 MiB) TX bytes:2581132 (2.4 MiB) Regards, Yagishita ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] INVITE with unknown udp port number
Hi Bodan, Thank you very much for the response. This issue has been solved by upgrading OpenSIPS from 1.5.0 to 1.5.3. Regards, Yagishita Hi Yagishita, If different than 5060 (default) the port is required in SIP. BTW, the call to UA2 is done via lookup(location) ? if so, check via the opensipsctl ul show UA2_AOR the contacts the UA2 has registered with opensips. Regards, Bogdan Koichi Yagishita wrote: Thank you very much Bogdan, The following is the sequence of this problem. My OpenSIPS1.5.0 has transmitted 2 INVITEs with unknown udp port number between OpenSIPS1.5.0 and SIP UA2 as shown below. I do not understand why the port numbers is included in the each INVITE. SIP UA1OpenSIPS1.5.0SIP UA2 |REGISTER (src port:36774) || |-|| |200 OK (dst port:36774) || |-| REGISTER (src port:34722)| | |---| | | 200 OK (dst port:34722) | | |---| |INVITE (src port:36774) || |-| INVITE | | | (dst port:13249, | | |Request-Line: 13249)| | |---| | | INVITE | | | (dst port:7232, | | |Request-Line: 7232) | | |---| | | Port unreachable | | | (dst port:13249) | | |---| | | Port unreachable | | | (dst port:7232) | | |---| Regards, Yagishita Hi Yagishita, what you mean by INVITE with unknown udp port number ? where is this port missing from ? is from the SIP message ? Could you post the INVITE request? Regards, Bogdan Koichi Yagishita wrote: Dear all, I am facing the following problem during INVITE transaction. Since my opensips-1.5.0 has forwarded INVITE with unknown udp port number to X-Lite as SIP UA, Port unreachable occurs at SIP UA and INVITE transaction fails. Could anyone teach me why the unknown udp port number is set and how this problem should be fixed? Regards, Yagishita ___ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Next OpenSIPS Webinar Schedule?
That would be a nice topic... We are hoping and thankful to hear from you soon... - http://opensips.blogspot.com http://opensips.blogspot.com -- View this message in context: http://n2.nabble.com/Next-OpenSIPS-Webinar-Schedule-tp3950410p4418197.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
[OpenSIPS-Users] need help on mediaproxy ports
Hi all i debug on mediaproxy and see, mediaproxy create 4 ports but the real ports to relay media are only 2 ports: 118.69.239.140:50012 - 118.69.239.140:50014 is it normal, can i config mediaproxy create only 2 ports Thank you Ha` mediaproxy.mediacontrol.StreamListenerProtocol starting on 50012 mediaproxy.mediacontrol.StreamListenerProtocol starting on 50013 mediaproxy.mediacontrol.StreamListenerProtocol starting on 50014 mediaproxy.mediacontrol.StreamListenerProtocol starting on 50015 debug: Added new stream: (audio) 192.168.1.4:45746 (RTP: Unknown, RTCP: Unknown) - 118.69.239.140:50012 - 118.69.239.140:50014 - Unknown (RTP: Unknown, RTCP: Unknown) debug: created new session 7810dcdd0ceb7...@192.168.1.4: 8...@118.69.239.140 (93846fc44ae3fe24) -- 9...@118.69.239.140 debug: updating existing session 7810dcdd0ceb7...@192.168.1.4: 8...@118.69.239.140 (93846fc44ae3fe24) -- 9...@118.69.239.140 debug: Received updated SDP answer debug: Got initial answer from callee for stream: (audio) 192.168.1.4:45746 (RTP: Unknown, RTCP: Unknown) - 118.69.239.140:50012 - 118.69.239.140:50014 - 192.168.1.6:48000 (RTP: Unknown, RTCP: Unknown) debug: Got traffic information for stream: (audio) 192.168.1.4:45746 (RTP: 210.245.35.150:45746, RTCP: Unknown) - 118.69.239.140:50012 - 118.69.239.140:50014 - 192.168.1.6:48000 (RTP: Unknown, RTCP: Unknown) debug: Got traffic information for stream: (audio) 192.168.1.4:45746 (RTP: 210.245.35.150:45746, RTCP: Unknown) - 118.69.239.140:50012 - 118.69.239.140:50014 - 192.168.1.6:48000 (RTP: 210.245.35.150:48000, RTCP: Unknown) debug: removing session 7810dcdd0ceb7...@192.168.1.4: 8...@118.69.239.140 (93846fc44ae3fe24) -- 9...@118.69.239.140 (Port 50012 Closed) (Port 50013 Closed) (Port 50014 Closed) (Port 50015 Closed) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users