Re: [OpenSIPS-Users] Create and send a 180 reply messsage

2024-10-20 Thread mayamatakeshi
On Sun, Oct 20, 2024 at 11:38 PM M S  wrote:

> Hi list,
> I am having a problem that my upstream provider disconnects the call if my
> client does not send 180/183 before 200 OK.
> At the time of receiving 200 OK (in reply_route) I can check to see if
> previously a 180/183 was also sent or not.
> My solution is: as soon as I receive a 200 OK from the client, if 180/183
> was not received before, I create a 180 ringing message and send it to
> upstream, before passing on 200. Now I realized that none of the usual
> methods (send_reply, sl_send_reply, t_send_reply) work from reply_route,
> and I have no idea how to use dlg_send_sequential to send a "180 ringing".
> Any ideas would be appreciated.
>
>
dlg_send_sequential would not work as it is used to generate a request.

I think opensips should allow t_reply to work from within ONREPLY_ROUTE.
Currently it, doesn't:

opensips tm.c:
{"t_reply", (cmd_function)w_pv_t_reply, {
{CMD_PARAM_INT, fixup_reply_code, 0},
{CMD_PARAM_STR, 0, 0}, {0,0,0}},
REQUEST_ROUTE | FAILURE_ROUTE},

But kamailio which, as opensips, inherited the tm foundation from openser
allows it:
{"t_reply", w_t_reply, 2, fixup_t_reply, 0,
REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE},

So you could try patching opensips t_reply by adding the ONREPLY_ROUTE flag
till this is allowed in opensips (I'm not sure if it will work as extra
changes in code might be needed).

Alternatively, you could call a function in a perl/lua/python module to
change the "200 OK" with "180 Ringing", remove the top Via Header (beware
that the Via headers might be coalesced into a single one), remove the body
and use a raw socket to send the packet:
(ref: https://opensips.org/html/docs/modules/3.5.x/perl.html#func_perl_exec)

Obs: I assume the language module inherits the limitations from the route
it is being executed on, so I would not expect:
  $m->sl_send_reply("180", "Trying");
to work, but you could try to see what happens.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Delay relay of 200 OK

2024-08-19 Thread mayamatakeshi
Hi,
I never it but you might want to look at:

https://www.opensips.org/Documentation/Script-Async-3-5

On Tue, Aug 20, 2024 at 4:45 AM Daniel Zanutti 
wrote:

> Hi
>
> We need to delay the delivery of the 200 OK, and send it a few seconds
> later, after an event is generated internally. If the call is marked as
> suspicious, we will hangup the call and send 503 to the origin and BYE to
> destination.
>
> Is it possible to do it? Can someone send some ideas?
>
> ___
> 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] What happened to auth_db ha1b?

2023-09-04 Thread mayamatakeshi
On Mon, Sep 4, 2023 at 9:40 PM mayamatakeshi 
wrote:

> Hi,
> I'm comparing these docs:
>
> https://www.opensips.org/html/docs/modules/3.1.x/auth_db.html
> https://www.opensips.org/html/docs/modules/3.2.x/auth_db.html
>
> The first one mentions ha1b but the second one doesn't mention it.
> But the migration doc for 3.1 to 3.2 doesn't mention neither ha1b nor
> auth_db:
> https://www.opensips.org/Documentation/Migration-3-1-0-to-3-2-0
>
> After update in production to 3.2, I realized a few SIP clients use
> username with domain in the Authorization header and so the ha1b should be
> used but how do I specify that?
>
>
Ah. OK. I have found the explanation here:
https://opensips.org/pipermail/users/2021-August/045046.html
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] What happened to auth_db ha1b?

2023-09-04 Thread mayamatakeshi
Hi,
I'm comparing these docs:

https://www.opensips.org/html/docs/modules/3.1.x/auth_db.html
https://www.opensips.org/html/docs/modules/3.2.x/auth_db.html

The first one mentions ha1b but the second one doesn't mention it.
But the migration doc for 3.1 to 3.2 doesn't mention neither ha1b nor
auth_db:
https://www.opensips.org/Documentation/Migration-3-1-0-to-3-2-0

After update in production to 3.2, I realized a few SIP clients use
username with domain in the Authorization header and so the ha1b should be
used but how do I specify that?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] compilation fails

2023-07-03 Thread mayamatakeshi
Are you on a bash shell when you execute these commands?
If not, I would try to switch to it.

On Tue, Jul 4, 2023 at 2:58 AM Saint Michael  wrote:

> my script is
> cd /usr/src/opensips-3.1/
> git reset --hard HEAD
> git pull
> make clean;make proper;make all
> make modules
> make install
> and is generating errors
> make[1]: Entering directory '/usr/src/opensips-3.1/modules/lua'
> /bin/sh: 0: Illegal option --
> /bin/sh: 0: Illegal option --
> /bin/sh: 0: Illegal option --
> make[1]: --libs: Command not found
> /bin/sh: 0: Illegal option --
> make[1]: --libs: Command not found
> /bin/sh: 0: Illegal option --
> make[1]: --libs: Command not found
> make[1]: Leaving directory '/usr/src/opensips-3.1/modules/lua'
>
> On Mon, Jul 3, 2023 at 8:43 PM Saint Michael  wrote:
>
>> My compilation is failing by first time, version 3.1
>> is there a list of pre-requisites for compiling opensips on Ubuntu 20.04?
>>
>> make[1]: Entering directory '/usr/src/opensips-3.1/modules/lua'
>> /bin/sh: 0: Illegal option --
>> /bin/sh: 0: Illegal option --
>> /bin/sh: 0: Illegal option --
>> make[1]: --libs: Command not found
>> /bin/sh: 0: Illegal option --
>> make[1]: --libs: Command not found
>> /bin/sh: 0: Illegal option --
>> make[1]: --libs: Command not found
>> make[1]: Entering directory '/usr/src/opensips-3.1/modules/python'
>> /bin/sh: 1: python: not found
>> /bin/sh: 1: python: not found
>> /bin/sh: 1: python: not found
>>
> ___
> 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] Remove a field from the header PAI Diversion and History info - Opensips2.4 and 3.3

2023-06-20 Thread mayamatakeshi
On Wed, Jun 21, 2023 at 6:26 AM mayamatakeshi 
wrote:

> I have not tested it but I think you could use
> {re.subst,expression}
> <https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#resubst_expression>
>

Sorry, actually, that link was for kamailio.
For opensips it is:
{re.subst,reg_exp}
<https://www.opensips.org/Documentation/Script-Tran-3-0#toc86>


> to create a variable with the value of the header with the desired field
> removed and then use append_hf to insert the variable as the modified
> header.
>
> On Tue, Jun 20, 2023 at 11:58 PM  wrote:
>
>> Hello mates,
>>
>>
>>
>> Sorry for sending my message several times. I need your help
>>
>> I want to remove a field from the headers PAI, Diversion and History
>> info.
>>
>>
>>
>> I can remove the whole header by loading the *sipmsgops* and the
>> function Remove_hd
>>
>> But i did not find a way how to remove a specefic field in the header
>> PAI for example.
>>
>>
>>
>> Could you please help ?
>>
>>
>>
>> Thank you
>>
>>
>>
>> Best regards
>>
>>
>>
>> Amel
>>
>>
>> ___
>> 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] Remove a field from the header PAI Diversion and History info - Opensips2.4 and 3.3

2023-06-20 Thread mayamatakeshi
I have not tested it but I think you could use
{re.subst,expression}

to create a variable with the value of the header with the desired field
removed and then use append_hf to insert the variable as the modified
header.

On Tue, Jun 20, 2023 at 11:58 PM  wrote:

> Hello mates,
>
>
>
> Sorry for sending my message several times. I need your help
>
> I want to remove a field from the headers PAI, Diversion and History info.
>
>
>
> I can remove the whole header by loading the *sipmsgops* and the function
> Remove_hd
>
> But i did not find a way how to remove a specefic field in the header PAI
> for example.
>
>
>
> Could you please help ?
>
>
>
> Thank you
>
>
>
> Best regards
>
>
>
> Amel
>
>
> ___
> 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] WSS not sending bye

2023-06-16 Thread mayamatakeshi
Have you confirmed a Record-Route header was added to the SIP messages
exchanged?

Anyway, I would try to enable debug log in the SIP client to see what it is
deciding to do when you press the hangup button (ideally we should see the
BYE and the address to where the request is being sent to, if it is failing
to open a WSS connection with opensips etc).


On Fri, Jun 16, 2023 at 11:22 PM Pat M  wrote:

> so even after adding the record route it still does not hangup and send
> the bye
>
> Sent with Proton Mail <https://proton.me/> secure email.
>
> --- Original Message ---
> On Thursday, June 15th, 2023 at 11:02 PM, mayamatakeshi <
> mayamatake...@gmail.com> wrote:
>
>
>
> On Fri, Jun 16, 2023 at 2:05 AM Pat M  wrote:
>
>> See below
>>
>> but what i can see there is no Allow, not sure if that is why?
>>
>>
>>> You are not using Record-Route.
> This is not required for SIP to work as long as the UAs are able to talk
> to each other independently of the SIP proxy after a session is established.
> But probably this is not your case.
> Please try adding this to your route{}:
>
> if (is_method("INVITE"))
> record_route();
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] WSS not sending bye

2023-06-15 Thread mayamatakeshi
On Fri, Jun 16, 2023 at 2:05 AM Pat M  wrote:

> See below
>
> but what i can see there is no Allow, not sure if that is why?
>
>
>> You are not using Record-Route.
This is not required for SIP to work as long as the UAs are able to talk to
each other independently of the SIP proxy after a session is established.
But probably this is not your case.
Please try adding this to your route{}:

if (is_method("INVITE"))
record_route();
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] WSS not sending bye

2023-06-14 Thread mayamatakeshi
As Răzvan said,
please post the SIP logs/capture (the SIP messages).
Probably there is some issue with Record-Route headers.

On Thu, Jun 15, 2023 at 12:49 AM Pat M via Users 
wrote:

> anyone have any advice what i can check?
> i am desperate now
>
>
>
>
> Sent with Proton Mail secure email.
>
> --- Original Message ---
> On Wednesday, June 14th, 2023 at 10:05 AM, Pat M via Users <
> users@lists.opensips.org> wrote:
>
>
> > Hi Razvan
> >
> > I do not see anything in the logs of the client but here is the invite
> portion of the opensips
> > outbound calls have no problem it is only calls the webrtc client
> receives
> >
> >
> > route{
> > if(!has_totag() && is_method("INVITE")) {
> > if ($rU =~ '^[0-9]{11,}$') {
> > create_dialog();
> > topology_hiding("UC");
> >
> >
> >
> > $var(rtpengine_params) = $var(direction) + " replace-origin
> replace-session-connection";
> >
> > if ( has_body("application/sdp") )
> > rtpengine_manage("$var(rtpengine_params)");
> >
> > $du = "sip:" + :5060;
> > $ru = "sip:" + $rU + "@" + :5060;
> >
> > route(RELAY);
> > } else {
> > xlog("Not Outbound Call");
> > }
> > xlog("($$ct=$tU)\n");
> >
> > if (!mid_registrar_lookup("location")) {
> > t_reply(404, "Not Found");
> > exit;
> > }
> > create_dialog();
> > topology_hiding("U");
> > $var(rtpengine_params) = "trust-address replace-origin
> replace-session-connection rtcp-mux-offer ICE=force transcode-PCMU
> transcode-G722 SDES-off UDP/TLS/RTP/SAVPF";
> > xlog("USING RTPENGINE!!!");
> > if ( has_body("application/sdp") )
> > rtpengine_manage("$var(rtpengine_params)");
> > t_relay();
> > exit;
> >
> > }
> >
> >
> >
> >
> >
> >
> > Sent with Proton Mail secure email.
> >
> >
> > --- Original Message ---
> > On Wednesday, June 14th, 2023 at 8:53 AM, Răzvan Crainea
> raz...@opensips.org wrote:
> >
> >
> >
> > > Hi, Pat!
> > >
> > > You might be missing a Record-Route or something. Please post the SIP
> > > logs from your WebRTC client if you need further help.
> > >
> > > Best regards,
> > >
> > > Răzvan Crainea
> > > OpenSIPS Core Developer
> > > http://www.opensips-solutions.com
> > >
> > > On 6/13/23 19:56, Pat M via Users wrote:
> > >
> > > > Hi everyone
> > > >
> > > > Please help!!
> > > >
> > > > I have a mobile webrtc client that i am trying to use with opensips,
> it
> > > > all works fine except when you try hangup from the client it does
> > > > nothing, does not send any bye to opensips and therefore opensips
> does
> > > > not send a bye upstream
> > > > i am using mid_registrar
> > > >
> > > > but if i register it direct to an asterisk server it works fine
> > > >
> > > > my wss config is very normal including the tls section
> > > >
> > > > loadmodule "proto_wss.so"
> > > > modparam("proto_wss", "require_origin", yes)
> > > > modparam("proto_wss", "wss_max_msg_chunks", 16)
> > > > modparam("proto_wss", "wss_handshake_timeout", 300)
> > > >
> > > > modparam("tls_mgm", "ca_list", "[sip]/etc/letsencrypt/fullchain.pem")
> > > > modparam("tls_mgm", "certificate", "[sip]/etc/opensips/tls/cert.pem")
> > > > modparam("tls_mgm", "private_key", "[sip]/etc/opensips/tls/ckey.pem")
> > > > modparam("tls_mgm", "require_cert", "[sip]0")
> > > > modparam("tls_mgm", "verify_cert", "[sip]0")
> > > > modparam("tls_mgm", "tls_library", "wolfssl")
> > > >
> > > > modparam("tls_mgm", "client_domain", "sip1")
> > > > modparam("tls_mgm", "ca_list",
> "[sip1]/etc/letsencrypt/fullchain.pem")
> > > > modparam("tls_mgm", "certificate",
> "[sip1]/etc/opensips/tls/sip1.pem")
> > > > modparam("tls_mgm", "private_key",
> "[sip1]/etc/opensips/tls/sip1key.pem")
> > > > modparam("tls_mgm", "require_cert", "[sip1]0")
> > > > modparam("tls_mgm", "verify_cert", "[sip1]0")
> > > > modparam("tls_mgm", "match_ip_address", "[sip1]*")
> > > >
> > > > loadmodule "mid_registrar.so"
> > > > modparam("mid_registrar", "mode", 2) /* 1 = mirror / 1 = ct / 2 =
> AoR */
> > > > modparam("mid_registrar", "outgoing_expires", 180)
> > > > modparam("mid_registrar", "min_expires", 60)
> > > > modparam("mid_registrar", "max_expires", 180)
> > > > modparam("mid_registrar", "max_contacts", 16)
> > > > modparam("mid_registrar", "received_avp", "$avp(received)")
> > > > modparam("mid_registrar", "pn_pnsreg_interval", 140)
> > > >
> > > > mid_registrar_save("location", "p0v");
> > > >
> > > > Thanks Pat
> > > > Sent with Proton Mail https://proton.me/ secure email.
> > > >
> > > > ___
> > > > 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
>
> ___
> User

Re: [OpenSIPS-Users] How to CANCEL a Dialog from script

2022-11-07 Thread mayamatakeshi
Maybe you could use t_cancel_branch():

onreply_route[XXX] {
...
if ((t_check_status("180") && (SOME_HEADER_HAS_SOME_VALUE)) {
t_cancel_branch("a");
}
...
}

https://opensips.org/html/docs/modules/3.2.x/tm#func_t_cancel_branch


On Mon, Nov 7, 2022 at 6:45 PM Alain Bieuzent 
wrote:

> Hi all,
>
>
>
> I need to end a call not yet established from my script; how can I do that?
>
>
>
> example :
>
> I receive an INVITE followed by a 180 Ringing
>
> I read a header in the 180 Ringing and depending on the value of the
> header, I want to cancel this call.
>
>
>
> Kinda like like a dlg_end_dlg but from my script.
>
>
>
> Alain.
> ___
> 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] Orderly shutdown

2022-10-26 Thread mayamatakeshi
It can be done with:
  https://opensips.org/docs/modules/3.1.x/gflags.html


On Thu, Oct 27, 2022 at 1:18 PM Saint Michael  wrote:

> Dear Friends
> I successfully wrote a script that terminates all open calls in an
> orderly fashion.
> The question is, before I execute my script, is there any similar
> command (like opensips-cli -x mi dlg_end_dlg "${callid}") that would
> stop taking new calls?  Like "reject any call attempts with 503 or
> 404", because, in a high-pressure environment, 2000 new calls may
> arrive before I close all calls and shut down Opensips.
> I use version:
> opensips -V
> version: opensips 3.1.12 (x86_64/linux)
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll, sigio_rt, select.
> git revision: 15ef14a89
> main.c compiled on 03:16:12 Oct 25 2022 with gcc 9
>
> On Wed, Oct 26, 2022 at 10:49 AM Bogdan-Andrei Iancu
>  wrote:
> >
> > Hi,
> >
> > Sending a sig TERM to the opensips processes will trigger a controlled
> > shutdown of opensips (meaning with flushing data to DB, if needed,
> > cleanup, etc). Nevertheless, the opensips shutdown does not ends the
> > call, as the calls may be continued after restarting opensips.
> >
> > Still, if you want to terminate all ongoing calls before shutting down,
> > better use dialog module and check these MI cmds:
> > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg
> >
> https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs
> >
> > Regards,
> >
> > Bogdan-Andrei Iancu
> >
> > OpenSIPS Founder and Developer
> >https://www.opensips-solutions.com
> > OpenSIPS Bootcamp 5-16 Dec 2022, online
> >https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
> >
> > On 10/25/22 2:15 PM, Saint Michael wrote:
> > > Dear friends
> > > is there a command I can send to Opensips 3.1, so all calls are shut
> > > down and BYEs are sent to both the caller and the callee? Then of
> > > course, opensips closes down.
> > >
> > > ___
> > > 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] early dialog termination

2022-10-22 Thread mayamatakeshi
Hi,
I've been following this discussion as I have a similar use case.
I have created a PR offering a new function t_reply_by_callid for the
module tm to simplify this:
  https://github.com/OpenSIPS/opensips/pull/2937

Regards,
Takeshi

On Thu, Oct 20, 2022 at 4:04 PM Bogdan-Andrei Iancu 
wrote:

> Ivan,
>
> Actually a simpler approach will be to use t_wait_for_new_branches()
> instead of that t_write function, it should do the same trick (postponing
> the deletion of the transaction), but without any side effects.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Bootcamp 5-16 Dec 2022, online
>   https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>
> On 10/19/22 10:21 AM, Ryzhik Ivan wrote:
>
> Sorry, I mean no sleep, i mean async( sleep($var(wait_time)), after_sleep
> );
> Regards, Ivan.
>
> вт, 18 окт. 2022 г. в 14:42, Bogdan-Andrei Iancu :
>
>> Hi,
>>
>> yes, call it before ending the REQUEST route. I'm 100% the transaction is
>> not deleted before the end of the route. And try to use the unix sock
>> flavor for the function, not the fifo one.
>>
>> DO NOT use the sleep, you will block your whole opensips.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Bootcamp 5-16 Dec 2022, online
>>   https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/
>>
>> On 10/17/22 11:56 AM, Ryzhik Ivan wrote:
>>
>> Hi, did you mean that i must call t_write_req once before REQUEST_ROUTE
>> is finished? In this case the transaction was removed.
>> "even if you do not have to actually write anything to outer world -
>> just fake it." - i must use fifo and i must read data from it, in else
>> we got:
>> ERROR:tm:write_to_fifo: nobody listening on [/tmp/moh.fifo] fifo for
>> reading!
>> ERROR:tm:t_write_req: write_to_fifo failed
>> And last question is may I use sleep(20) at the end of route to keep
>> transaction? or can i use modparam("tm", "wt_timer", 20)?
>> Regards, Ivan
>>
>> пн, 17 окт. 2022 г. в 09:38, Bogdan-Andrei Iancu :
>>
>>> Hi Ryzhik,
>>>
>>> Right, the transaction must be forced to stay until you are done with a
>>> final reply. Unfortunately there is no clear way to do this from script
>>> (this may be subject of further small improvements), but you can try taking
>>> advantage of the `t_write_req` [1] for this purpose, even if you do not
>>> have to actually write anything to outer world - just fake it.
>>>
>>>
>>> [1]
>>> https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_write_req
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>
>>> OpenSIPS Founder and Developer
>>>   https://www.opensips-solutions.com
>>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>>   https://www.opensips.org/events/Summit-2022Athens/
>>>
>>> On 10/13/22 2:45 PM, Ryzhik Ivan wrote:
>>>
>>> Hi.
>>> One more question.
>>> Everything works fine except the transaction was deleted after 15
>>> sec after the initial route was finished.
>>> on INVITE i last do t_reply_with_body(183, "Session progress", ...) and
>>> than exit;
>>>
>>> on end route log :
>>>
>>> 2022-10-13T10:58:01.994598+00:00  DBG:tm:_reply_light: reply sent out.
>>> buf=0x7f558a087d98: SIP/2.0 1..., shmem=0x7f5549797470: SIP/2.0 1
>>> 2022-10-13T10:58:01.994676+00:00  DBG:tm:_reply_light: finished
>>>
>>> 2022-10-13T10:58:01.995835+00:00  DBG:tm:do_t_cleanup: transaction
>>> 0x7f5549793b18 already updated! Skipping update!
>>> 2022-10-13T10:58:01.996020+00:00  DBG:tm:cleanup_uac_timers: RETR/FR
>>> timers reset
>>> 2022-10-13T10:58:01.996202+00:00  *DBG:tm:insert_timer_unsafe: [2]:
>>> 0x7f5549793b98 (12)*
>>> 2022-10-13T10:58:01.996317+00:00 * DBG:tm:t_unref: UNREF_UNSAFE:
>>> [0x7f5549793b18] after is 0*
>>> 2022-10-13T10:58:01.996488+00:00  DBG:core:destroy_avp_list: destroying
>>> list (nil)
>>> 2022-10-13T10:58:01.996673+00:00  DBG:core:receive_msg: cleaning up
>>>
>>> 2022-10-13T10:58:07.651091+00:00*  DBG:tm:timer_routine: timer
>>> routine:2,tl=0x7f5549793b98 next=(nil), timeout=12*
>>> 2022-10-13T10:58:07.651332+00:00  DBG:tm:wait_handler: removing
>>> 0x7f5549793b18 from table
>>> 2022-10-13T10:58:07.651425+00:00  DBG:tm:delete_ce*ll: delete
>>> transaction 0x7f5549793b18*
>>> 2022-10-13T10:58:07.651513+00:00  DBG:tm:wait_handler: done
>>>
>>> Can you tell me how I can i fix this? Transaction marked safe for
>>> deletion...
>>> Regards, Ivan
>>>
>>> ср, 12 окт. 2022 г. в 13:11, Bogdan-Andrei Iancu :
>>>
 Perfect !!!

 Bogdan-Andrei Iancu

 OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
 OpenSIPS Summit 27-30 Sept 2022, Athens
   https://www.opensips.org/events/Summit-2022Athens/

 On 10/12/22 1:09 PM, Ryzhik Ivan wrote:

 I found a solution. hex strings are reversed).
 Thank you very much!

 ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan :

> and one more research: $T_id returns hex encoded label.hashid
> but my

Re: [OpenSIPS-Users] Creating branches inside a while loop

2022-10-11 Thread mayamatakeshi
Hi Bogdan,
yes. It works.
I am using it like this:





















*$var(idx) = 0;$var(aor) =
$(var(aors){s.select,$var(idx),,});while($var(aor)
!= null) {if($var(idx) > 0) {
append_branch();}
seturi("sip:$var(aor)@$fd");$var(idx) = $var(idx) + 1;
  $var(aor) = $(var(aors){s.select,$var(idx),!});}
  if (lookup("location", "r")) {
t_on_branch("USERAGENT_BRANCH");route(RELAY_REQUEST);
  } else {sl_send_reply(480, "subscriber not online
retcode=$retcode");}*

Thanks and regards,
Takeshi

On Tue, Oct 11, 2022 at 6:32 PM Bogdan-Andrei Iancu 
wrote:

> Hi, and it works now, right?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>   https://www.opensips.org/events/Summit-2022Athens/
>
> On 10/11/22 10:29 AM, mayamatakeshi wrote:
>
> Hi Bogdan,
> indeed, I think I removed the append_branch() line by mistake when
> removing some debug lines I added to check function return code etc.
> Thanks,
> Takeshi
>
> On Mon, Oct 10, 2022 at 9:39 PM Bogdan-Andrei Iancu 
> wrote:
>
>> Hi Takeshi,
>>
>> Aren't you missing the "seturi()" + "append_branch()" in the loop ??
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit 27-30 Sept 2022, Athens
>>   https://www.opensips.org/events/Summit-2022Athens/
>>
>> On 9/28/22 4:26 PM, mayamatakeshi wrote:
>>
>>
>> On Wed, Sep 28, 2022 at 2:21 PM mayamatakeshi 
>> wrote:
>>
>>> Hi,
>>> I'm testing latest commit b243666098be44226ade6a7df2b62851efcb5de8 of
>>> opensips-3.2.
>>>
>>> I tested adding branches to an INVITE for a fixed size list of AORs this
>>> way:
>>>
>>> $var(aors) = "sip:us...@test1.com,sip:us...@test1.com,
>>> sip:us...@test1.com";
>>>
>>> seturi($(var(aors){s.select,0,,}));
>>>
>>> append_branch();
>>> seturi($(var(aors){s.select,1,,}));
>>>
>>> append_branch();
>>> seturi($(var(aors){s.select,2,,}));
>>>
>>> lookup("location", "r")
>>>
>>> The above works fine and all 3 destinations resolved by AOR lookup are
>>> called (max of contact per AOR).
>>>
>>> However, in case of a a list of unknown size, I tried to use a while
>>> loop like this:
>>> $var(aors) = "sip:us...@test1.com,sip:us...@test1.com,
>>> sip:us...@test1.com";
>>>
>>> $var(idx) = 0;
>>> $var(aor) = $(var(aors){s.select,$var(idx),,});
>>>
>>> while($var(aor) != null) {
>>> seturi($var(aor));
>>>
>>> $var(idx) = $var(idx) + 1;
>>> $var(aor) = $(var(aors){s.select,$var(idx),,});
>>> }
>>>
>>> lookup("location", "r")
>>>
>>> But with the above, only the last destination (lookup of us...@test1.com)
>>> is called.
>>> I confirmed this is not related to the lookup function because I tried
>>> with fixed destinations like this:
>>>
>>> $var(aors) = "sip:user1@10.0.0.1:5072,
>>> sip:user2@10.0.0.1:5074,sip:user3@10.0.0.1:5076";
>>>
>>> $var(idx) = 0;
>>> $var(aor) = $(var(aors){s.select,$var(idx),,});
>>>
>>> while($var(aor) != null) {
>>> seturi($var(aor));
>>>
>>> $var(idx) = $var(idx) + 1;
>>> $var(aor) = $(var(aors){s.select,$var(idx),,});
>>> }
>>>
>>> and the same problem happens: only the last destination
>>> sip:user3@10.0.0.1:5076 is called.
>>>
>>> So, is there a way to append a non-fixed number of branches to an INVITE?
>>>
>>> Regards,
>>> Takeshi
>>>
>>
>> Sorry, I think I did something wrong.
>> I was able to make append_branch to work inside a while loop.
>> So there is no problem.
>> Regards,
>> Takeshi
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://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] Creating branches inside a while loop

2022-10-11 Thread mayamatakeshi
Hi Bogdan,
indeed, I think I removed the append_branch() line by mistake when removing
some debug lines I added to check function return code etc.
Thanks,
Takeshi

On Mon, Oct 10, 2022 at 9:39 PM Bogdan-Andrei Iancu 
wrote:

> Hi Takeshi,
>
> Aren't you missing the "seturi()" + "append_branch()" in the loop ??
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>   https://www.opensips.org/events/Summit-2022Athens/
>
> On 9/28/22 4:26 PM, mayamatakeshi wrote:
>
>
> On Wed, Sep 28, 2022 at 2:21 PM mayamatakeshi 
> wrote:
>
>> Hi,
>> I'm testing latest commit b243666098be44226ade6a7df2b62851efcb5de8 of
>> opensips-3.2.
>>
>> I tested adding branches to an INVITE for a fixed size list of AORs this
>> way:
>>
>> $var(aors) = "sip:us...@test1.com,sip:us...@test1.com,
>> sip:us...@test1.com";
>>
>> seturi($(var(aors){s.select,0,,}));
>>
>> append_branch();
>> seturi($(var(aors){s.select,1,,}));
>>
>> append_branch();
>> seturi($(var(aors){s.select,2,,}));
>>
>> lookup("location", "r")
>>
>> The above works fine and all 3 destinations resolved by AOR lookup are
>> called (max of contact per AOR).
>>
>> However, in case of a a list of unknown size, I tried to use a while loop
>> like this:
>> $var(aors) = "sip:us...@test1.com,sip:us...@test1.com,
>> sip:us...@test1.com";
>>
>> $var(idx) = 0;
>> $var(aor) = $(var(aors){s.select,$var(idx),,});
>>
>> while($var(aor) != null) {
>> seturi($var(aor));
>>
>> $var(idx) = $var(idx) + 1;
>> $var(aor) = $(var(aors){s.select,$var(idx),,});
>> }
>>
>> lookup("location", "r")
>>
>> But with the above, only the last destination (lookup of us...@test1.com)
>> is called.
>> I confirmed this is not related to the lookup function because I tried
>> with fixed destinations like this:
>>
>> $var(aors) = "sip:user1@10.0.0.1:5072,sip:user2@10.0.0.1:5074
>> ,sip:user3@10.0.0.1:5076";
>>
>> $var(idx) = 0;
>> $var(aor) = $(var(aors){s.select,$var(idx),,});
>>
>> while($var(aor) != null) {
>> seturi($var(aor));
>>
>> $var(idx) = $var(idx) + 1;
>> $var(aor) = $(var(aors){s.select,$var(idx),,});
>> }
>>
>> and the same problem happens: only the last destination
>> sip:user3@10.0.0.1:5076 is called.
>>
>> So, is there a way to append a non-fixed number of branches to an INVITE?
>>
>> Regards,
>> Takeshi
>>
>
> Sorry, I think I did something wrong.
> I was able to make append_branch to work inside a while loop.
> So there is no problem.
> Regards,
> Takeshi
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://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] Creating branches inside a while loop

2022-09-28 Thread mayamatakeshi
On Wed, Sep 28, 2022 at 2:21 PM mayamatakeshi 
wrote:

> Hi,
> I'm testing latest commit b243666098be44226ade6a7df2b62851efcb5de8 of
> opensips-3.2.
>
> I tested adding branches to an INVITE for a fixed size list of AORs this
> way:
>
> $var(aors) = "sip:us...@test1.com,sip:us...@test1.com,
> sip:us...@test1.com";
>
> seturi($(var(aors){s.select,0,,}));
>
> append_branch();
> seturi($(var(aors){s.select,1,,}));
>
> append_branch();
> seturi($(var(aors){s.select,2,,}));
>
> lookup("location", "r")
>
> The above works fine and all 3 destinations resolved by AOR lookup are
> called (max of contact per AOR).
>
> However, in case of a a list of unknown size, I tried to use a while loop
> like this:
> $var(aors) = "sip:us...@test1.com,sip:us...@test1.com,
> sip:us...@test1.com";
>
> $var(idx) = 0;
> $var(aor) = $(var(aors){s.select,$var(idx),,});
>
> while($var(aor) != null) {
> seturi($var(aor));
>
> $var(idx) = $var(idx) + 1;
> $var(aor) = $(var(aors){s.select,$var(idx),,});
> }
>
> lookup("location", "r")
>
> But with the above, only the last destination (lookup of us...@test1.com)
> is called.
> I confirmed this is not related to the lookup function because I tried
> with fixed destinations like this:
>
> $var(aors) = "sip:user1@10.0.0.1:5072,sip:user2@10.0.0.1:5074,
> sip:user3@10.0.0.1:5076";
>
> $var(idx) = 0;
> $var(aor) = $(var(aors){s.select,$var(idx),,});
>
> while($var(aor) != null) {
> seturi($var(aor));
>
> $var(idx) = $var(idx) + 1;
> $var(aor) = $(var(aors){s.select,$var(idx),,});
> }
>
> and the same problem happens: only the last destination
> sip:user3@10.0.0.1:5076 is called.
>
> So, is there a way to append a non-fixed number of branches to an INVITE?
>
> Regards,
> Takeshi
>

Sorry, I think I did something wrong.
I was able to make append_branch to work inside a while loop.
So there is no problem.
Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Route header in CANCEL requests

2015-10-09 Thread mayamatakeshi
For completeness, it will be also necessary to call t_reply to send '100
Trying' as we are using t_newtran():

append_hf("Route: \r\n");
t_newtran();
t_reply("100", "Trying");
t_add_hdrs("Route: \r\n");


On Sat, Oct 10, 2015 at 10:27 AM, mayamatakeshi 
wrote:

> Hello,
> i have found the solution in the docs:
>
> append_hf("Route: \r\n");
> t_newtran();
> t_add_hdrs("Route: \r\n");
>
> Regards,
> Takeshi
>
> On Sat, Oct 10, 2015 at 9:03 AM, mayamatakeshi 
> wrote:
>
>> Hi, i have opensips behind another SIP proxy.
>> When I need to t_relay an INVITE from an uac to the proxy, my
>> opensips.cfg uses append_hf to add a Route header with a username required
>> by the proxy (some sort of validation).
>> This works fine. However, if the uac cancels the INVITE, the
>> transaction-controlled CANCEL generated by opensips goes out without this
>> Route header.
>> I was expecting opensips to add this Route header because opensips is
>> also used as a registrar and the proxy in front of it adds Path header to
>> the REGISTER requests and then when I relay an INVITE to the registered
>> entity (after doing lookup() ), the INVITE goes out with the contents of
>> the Path header in a Route header and the same Route header is added by
>> opensips to the CANCEL it generates.
>>
>> So, is there a way to force opensips to add this header to CANCEL? (I
>> cannot change the proxy in front of opensips. I need to conform with it).
>> I am using opensips 1.11 commit 719f298d5ad3300b790f64cfed40e797eeb23225.
>> Regards,
>> Takeshi
>>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Route header in CANCEL requests

2015-10-09 Thread mayamatakeshi
Hello,
i have found the solution in the docs:

append_hf("Route: \r\n");
t_newtran();
t_add_hdrs("Route: \r\n");

Regards,
Takeshi

On Sat, Oct 10, 2015 at 9:03 AM, mayamatakeshi 
wrote:

> Hi, i have opensips behind another SIP proxy.
> When I need to t_relay an INVITE from an uac to the proxy, my opensips.cfg
> uses append_hf to add a Route header with a username required by the proxy
> (some sort of validation).
> This works fine. However, if the uac cancels the INVITE, the
> transaction-controlled CANCEL generated by opensips goes out without this
> Route header.
> I was expecting opensips to add this Route header because opensips is also
> used as a registrar and the proxy in front of it adds Path header to the
> REGISTER requests and then when I relay an INVITE to the registered entity
> (after doing lookup() ), the INVITE goes out with the contents of the Path
> header in a Route header and the same Route header is added by opensips to
> the CANCEL it generates.
>
> So, is there a way to force opensips to add this header to CANCEL? (I
> cannot change the proxy in front of opensips. I need to conform with it).
> I am using opensips 1.11 commit 719f298d5ad3300b790f64cfed40e797eeb23225.
> Regards,
> Takeshi
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Route header in CANCEL requests

2015-10-09 Thread mayamatakeshi
Hi, i have opensips behind another SIP proxy.
When I need to t_relay an INVITE from an uac to the proxy, my opensips.cfg
uses append_hf to add a Route header with a username required by the proxy
(some sort of validation).
This works fine. However, if the uac cancels the INVITE, the
transaction-controlled CANCEL generated by opensips goes out without this
Route header.
I was expecting opensips to add this Route header because opensips is also
used as a registrar and the proxy in front of it adds Path header to the
REGISTER requests and then when I relay an INVITE to the registered entity
(after doing lookup() ), the INVITE goes out with the contents of the Path
header in a Route header and the same Route header is added by opensips to
the CANCEL it generates.

So, is there a way to force opensips to add this header to CANCEL? (I
cannot change the proxy in front of opensips. I need to conform with it).
I am using opensips 1.11 commit 719f298d5ad3300b790f64cfed40e797eeb23225.
Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] No acc records after opensips restart

2014-05-07 Thread mayamatakeshi
Razvan,
sorry again.
I did a dumb mistake and used "opensipsctl fifo debug 9" instead of
enabling the debug in the opensips.cfg file. So when opensips restarted,
debug was disabled.
Here are the logs:
http://pastebin.com/mtG6n68E

Regards,
Takeshi


On Thu, May 8, 2014 at 3:06 AM, Răzvan Crainea  wrote:

> Hi, Takeshi!
>
> I don't see any BYE or restart in your logs. Can you please send the logs
> starting from the INVITE, then restart and BYE?
>
> Best regards,
>
> Razvan Crainea
>
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 05/07/2014 11:58 AM, mayamatakeshi wrote:
>
>> Hi Razvan,
>>
>>
>> On Wed, May 7, 2014 at 5:10 PM, Răzvan Crainea > <mailto:raz...@opensips.org>> wrote:
>>
>> Hi, Takeshi!
>>
>> I am not sure you patch was successfully installed, since I don't
>> see the logs I put in the patch.
>>
>>
>> Sorry. I was loading the modules from the wrong path so it was using
>> unpatched build.
>> Here are the logs:
>> http://pastebin.com/5ubakRkP
>> (but I only see the "Registered terminated callback with flags" line in
>> them).
>>
>> Is there any chance you could give me access to a development
>> machine where this is happening?
>>
>>
>> If it gets difficult for you to debug this from the logs only, i will
>> try to prepare an environment at home because the company i work for
>> doesn't allow me to give this access.
>>
>> Regards,
>> Takeshi
>>
>>
>> Best regards,
>>
>> Răzvan Crainea
>>
>> OpenSIPS Core Developer
>> http://www.opensips-solutions.__com <http://www.opensips-
>> solutions.com>
>>
>>
>> On 05/05/2014 05:43 PM, mayamatakeshi wrote:
>>
>>
>>
>> On Mon, May 5, 2014 at 10:16 PM, Răzvan Crainea
>> mailto:raz...@opensips.org>
>> <mailto:raz...@opensips.org <mailto:raz...@opensips.org>>> wrote:
>>
>>  I think the first patch was corrupted while I pasted it.
>> Please try
>>  to use this one[1].
>>
>>  [1] http://pastebin.com/DvRCwT20
>>
>>
>> Hi Razvan,
>>
>> Actually, it seems that message from patch was just a warning
>> and can be
>> ignored
>> (http://unix.stackexchange.__com/questions/1395/what-does-_
>> _patch-unexpectedly-ends-in-__middle-of-line-mean
>> <http://unix.stackexchange.com/questions/1395/what-does-
>> patch-unexpectedly-ends-in-middle-of-line-mean>).
>>
>>
>> So i checked the code and the problem was a typo.
>> Instead of :
>> LM_DBG("Registered terminated callback with flags %x\n",
>> reg->flags);
>> it should have been:
>> LM_DBG("Registered terminated callback with flags %x\n",
>> req->flags);
>>
>> So I corrected it and rebuilt opensips and tested it.
>> Here are the logs:
>> http://pastebin.com/Ne3vUdzG
>>
>> Regards,
>> Takeshi
>>
>>
>> _
>> Users mailing list
>> Users@lists.opensips.org <mailto:Users@lists.opensips.org>
>> http://lists.opensips.org/cgi-__bin/mailman/listinfo/users
>> <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>>
>>
>> _
>> Users mailing list
>> Users@lists.opensips.org <mailto:Users@lists.opensips.org>
>> http://lists.opensips.org/cgi-__bin/mailman/listinfo/users
>> <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] No acc records after opensips restart

2014-05-07 Thread mayamatakeshi
Hi Razvan,


On Wed, May 7, 2014 at 5:10 PM, Răzvan Crainea  wrote:

> Hi, Takeshi!
>
> I am not sure you patch was successfully installed, since I don't see the
> logs I put in the patch.
>

Sorry. I was loading the modules from the wrong path so it was using
unpatched build.
Here are the logs:
http://pastebin.com/5ubakRkP
(but I only see the "Registered terminated callback with flags" line in
them).


> Is there any chance you could give me access to a development machine
> where this is happening?
>

If it gets difficult for you to debug this from the logs only, i will try
to prepare an environment at home because the company i work for doesn't
allow me to give this access.

Regards,
Takeshi


>
> Best regards,
>
> Răzvan Crainea
>
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 05/05/2014 05:43 PM, mayamatakeshi wrote:
>
>>
>>
>> On Mon, May 5, 2014 at 10:16 PM, Răzvan Crainea > <mailto:raz...@opensips.org>> wrote:
>>
>> I think the first patch was corrupted while I pasted it. Please try
>> to use this one[1].
>>
>> [1] http://pastebin.com/DvRCwT20
>>
>>
>> Hi Razvan,
>>
>> Actually, it seems that message from patch was just a warning and can be
>> ignored
>> (http://unix.stackexchange.com/questions/1395/what-does-
>> patch-unexpectedly-ends-in-middle-of-line-mean).
>>
>> So i checked the code and the problem was a typo.
>> Instead of :
>>LM_DBG("Registered terminated callback with flags %x\n", reg->flags);
>> it should have been:
>>LM_DBG("Registered terminated callback with flags %x\n", req->flags);
>>
>> So I corrected it and rebuilt opensips and tested it.
>> Here are the logs:
>> http://pastebin.com/Ne3vUdzG
>>
>> Regards,
>> Takeshi
>>
>>
>> ___
>> 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] No acc records after opensips restart

2014-05-07 Thread mayamatakeshi
On Mon, May 5, 2014 at 11:43 PM, mayamatakeshi wrote:

>
>
> On Mon, May 5, 2014 at 10:16 PM, Răzvan Crainea wrote:
>
>> I think the first patch was corrupted while I pasted it. Please try to
>> use this one[1].
>>
>> [1] http://pastebin.com/DvRCwT20
>>
>
> Hi Razvan,
>
> Actually, it seems that message from patch was just a warning and can be
> ignored (
> http://unix.stackexchange.com/questions/1395/what-does-patch-unexpectedly-ends-in-middle-of-line-mean
> ).
>
> So i checked the code and the problem was a typo.
> Instead of :
>   LM_DBG("Registered terminated callback with flags %x\n", reg->flags);
> it should have been:
>   LM_DBG("Registered terminated callback with flags %x\n", req->flags);
>
> So I corrected it and rebuilt opensips and tested it.
> Here are the logs:
> http://pastebin.com/Ne3vUdzG
>

Razvan,
sorry, I checked the logs and the lines you added are not being printed. It
seems I am loading the modules from the wrong path. I will correct it and
get the logs again. Please wait.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] No acc records after opensips restart

2014-05-05 Thread mayamatakeshi
On Mon, May 5, 2014 at 10:16 PM, Răzvan Crainea  wrote:

> I think the first patch was corrupted while I pasted it. Please try to use
> this one[1].
>
> [1] http://pastebin.com/DvRCwT20
>

Hi Razvan,

Actually, it seems that message from patch was just a warning and can be
ignored (
http://unix.stackexchange.com/questions/1395/what-does-patch-unexpectedly-ends-in-middle-of-line-mean
).

So i checked the code and the problem was a typo.
Instead of :
  LM_DBG("Registered terminated callback with flags %x\n", reg->flags);
it should have been:
  LM_DBG("Registered terminated callback with flags %x\n", req->flags);

So I corrected it and rebuilt opensips and tested it.
Here are the logs:
http://pastebin.com/Ne3vUdzG

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] No acc records after opensips restart

2014-05-05 Thread mayamatakeshi
Hi Razvan,
I will do it.
But how should I apply the patch?
I tried using patch command but I got an error:

root@LAB002177-STR2-SERVER:opensips-1.11# patch -p0 < razvan_patch.txt
(Stripping trailing CRs from patch.)
patching file modules/acc/acc.c
(Stripping trailing CRs from patch.)
patching file modules/acc/acc_logic.c
(Stripping trailing CRs from patch.)
patching file modules/dialog/dlg_db_handler.c
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 376 with fuzz 1.

Anyway, I tried to compile this but I got an error:

make[1]: Entering directory `/usr/local/src/git/opensips-1.11/modules/acc'
Compiling acc.c
Compiling acc_logic.c
acc_logic.c: In function ‘acc_onreply’:
acc_logic.c:597:3: error: ‘reg’ undeclared (first use in this function)
acc_logic.c:597:3: note: each undeclared identifier is reported only once
for each function it appears in
make[1]: *** [acc_logic.o] Error 1
make[1]: *** Waiting for unfinished jobs
make[1]: Leaving directory `/usr/local/src/git/opensips-1.11/modules/acc'
make: *** [modules] Error 2


I also inspected the patch with command 'git apply' but i go this:

root@LAB002177-STR2-SERVER:opensips-1.11# git apply --stat razvan_patch.txt
fatal: corrupt patch at line 72

I don't know much about patch file formats. Please instruct me on how to
apply the patch.

Regards,
Takeshi

On Mon, May 5, 2014 at 7:06 PM, Răzvan Crainea  wrote:

> Hi, Takeshi!
>
> Can you please apply this patch [1] and run again in debugging mode?
>
> Thanks,
>
> [1] http://pastebin.com/i6uvbREf
>
>
> Razvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 05/01/2014 03:26 PM, mayamatakeshi wrote:
>
>> Hello Razvan,
>>
>>
>> On Thu, May 1, 2014 at 4:11 PM, Răzvan Crainea > <mailto:raz...@opensips.org>> wrote:
>>
>> Hi, Takeshi!
>>
>> You are right, CDR_FLAG should only be set on the initial INVITE.
>> DB_FLAG should not be set for BYE, because otherwise you will only
>> account that method, not the CDR (no duration, setuptime, etc.).
>> Have you tried with other Accounting backends (log, events)?
>>
>>
>> Yes. I use both db and log backends and no CDRs are written to
>> opensips.log in 1.11 after an opensips restart.
>>
>> Can you run a test in debugging mode, paste the logs on pastebin[1]
>> and send them over (privately if you want)?
>>
>> [1] http://pastebin.com/
>>
>>
>> Here it is:
>> http://pastebin.com/hcdybZL3
>>
>> Thanks.
>> Regards,
>> Takeshi
>>
>>
>>
>> Best regards,
>>
>> Razvan Crainea
>> OpenSIPS Core Developer
>> http://www.opensips-solutions.__com <http://www.opensips-
>> solutions.com>
>>
>>
>> On 05/01/2014 09:23 AM, mayamatakeshi wrote:
>>
>> Razvan,
>> no, I was only setting the CDR_FLAG on the initial INVITE. This
>> works
>> with 1.10.
>>
>> Then with 1.11, I tested setting the CDR_FLAG when processing BYE
>> requests but it didn't work.
>> Then I set DB_FLAG for BYE and after that, it worked.
>> So this behavior changed.
>> Thanks a lot.
>>
>> Regards,
>> Takeshi.
>>
>>
>> On Wed, Apr 30, 2014 at 11:05 PM, Răzvan Crainea
>> mailto:raz...@opensips.org>
>> <mailto:raz...@opensips.org <mailto:raz...@opensips.org>>> wrote:
>>
>>  Hi, Takeshi!
>>
>>  I just tested and there are no issues on my setup. Are you
>> setting
>>  the CDR_FLAG for all the requests? Have you also tried with
>>  different db modes?
>>
>>  Best regards,
>>
>>  Razvan Crainea
>>  OpenSIPS Core Developer
>> http://www.opensips-solutions.com
>> <http://www.opensips-__solutions.com
>>
>> <http://www.opensips-solutions.com>>
>>
>>
>>
>>  On 04/23/2014 03:05 PM, mayamatakeshi wrote:
>>
>>  Hello,
>>  I am trying to upgrade from opensips 1.10 (commit
>>  bfd86ab25554082053167a82655e669ca1c0ea7c)
>>  to 1.11 (latest
>> 313f41ad46921d543980fa9fc71fb0715d385085).
>>
>>
>>
>>  Almost everything works.
>>  However, in my opensips.cfg I set dialog db_mode to
>> REALTIME.
>>  And I have
>> 

Re: [OpenSIPS-Users] No acc records after opensips restart

2014-05-01 Thread mayamatakeshi
Hello Razvan,


On Thu, May 1, 2014 at 4:11 PM, Răzvan Crainea  wrote:

> Hi, Takeshi!
>
> You are right, CDR_FLAG should only be set on the initial INVITE. DB_FLAG
> should not be set for BYE, because otherwise you will only account that
> method, not the CDR (no duration, setuptime, etc.).
> Have you tried with other Accounting backends (log, events)?
>

Yes. I use both db and log backends and no CDRs are written to opensips.log
in 1.11 after an opensips restart.


> Can you run a test in debugging mode, paste the logs on pastebin[1] and
> send them over (privately if you want)?
>
> [1] http://pastebin.com/


Here it is:
http://pastebin.com/hcdybZL3

Thanks.
Regards,
Takeshi


>
>
> Best regards,
>
> Razvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 05/01/2014 09:23 AM, mayamatakeshi wrote:
>
>> Razvan,
>> no, I was only setting the CDR_FLAG on the initial INVITE. This works
>> with 1.10.
>>
>> Then with 1.11, I tested setting the CDR_FLAG when processing BYE
>> requests but it didn't work.
>> Then I set DB_FLAG for BYE and after that, it worked.
>> So this behavior changed.
>> Thanks a lot.
>>
>> Regards,
>> Takeshi.
>>
>>
>> On Wed, Apr 30, 2014 at 11:05 PM, Răzvan Crainea > <mailto:raz...@opensips.org>> wrote:
>>
>> Hi, Takeshi!
>>
>> I just tested and there are no issues on my setup. Are you setting
>> the CDR_FLAG for all the requests? Have you also tried with
>> different db modes?
>>
>> Best regards,
>>
>> Razvan Crainea
>> OpenSIPS Core Developer
>> http://www.opensips-solutions.__com <http://www.opensips-
>> solutions.com>
>>
>>
>>
>> On 04/23/2014 03:05 PM, mayamatakeshi wrote:
>>
>> Hello,
>> I am trying to upgrade from opensips 1.10 (commit
>> bfd86ab25554082053167a82655e66__9ca1c0ea7c)
>> to 1.11 (latest 313f41ad46921d543980fa9fc71fb0__715d385085).
>>
>>
>> Almost everything works.
>> However, in my opensips.cfg I set dialog db_mode to REALTIME.
>> And I have
>> acc in CDR mode.
>> Then after making some calls and confirming the dialogs were
>> inserted in
>> the opensips.dialog table, I kill and restart opensips. Then I
>> terminate
>> the calls.
>> In 1.10, this causes proper generation of records in the acc
>> table.
>> However, in 1.11, no records are written to acc table.
>> I checked the release notes for 1.11 but could not find any
>> indication
>> that this behavior would change:
>> http://opensips.org/pub/__opensips/1.11.0/src/ChangeLog
>>
>> <http://opensips.org/pub/opensips/1.11.0/src/ChangeLog>
>>
>> Before filing a bug ticket i would like to confirm as i might be
>> overlooking something.
>>
>> Here is the significant snippets of opensips.cfg:
>>
>> loadmodule "dialog.so"
>> modparam("dialog", "default_timeout", 10800)
>> modparam("dialog", "profiles_with_value", "calls")
>> modparam("dialog", "db_url",
>> "mysql://opensips:opensipsrw@__localhost/opensips")
>>
>> modparam("dialog", "db_mode", 1) # 1=REALTIME, 2=DELAYED,
>> 3=SHUTDOWN
>> modparam("dialog", "db_update_period", 10)
>>
>>
>> loadmodule "acc.so"
>> modparam("acc", "db_flag", "DB_FLAG")
>> modparam("acc", "log_flag", "LOG_FLAG")
>> modparam("acc", "log_level", -1)
>> modparam("acc", "log_facility", "LOG_LOCAL0")
>> modparam("acc", "db_url",
>> "mysql://opensips:opensipsrw@__localhost/opensips")
>>
>> modparam("acc", "failed_transaction_flag",
>> "FAILED_TRANSACTION_FLAG")
>> modparam("acc", "db_extra",
>> "domain=$avp(i:6);direction=$__avp(i:20);from_uname=$fU;to__
>> _uname=$tU;calling_number=$avp(__i:21);destination=$avp(
>> i:22);__anonymous=$avp(i:23);gwid=$__avp(i:24);forward=$avp(i:25)")
>>
>> modparam("acc", "log_extra",

Re: [OpenSIPS-Users] No acc records after opensips restart

2014-04-30 Thread mayamatakeshi
Razvan,
no, I was only setting the CDR_FLAG on the initial INVITE. This works with
1.10.

Then with 1.11, I tested setting the CDR_FLAG when processing BYE requests
but it didn't work.
Then I set DB_FLAG for BYE and after that, it worked.
So this behavior changed.
Thanks a lot.

Regards,
Takeshi.


On Wed, Apr 30, 2014 at 11:05 PM, Răzvan Crainea wrote:

> Hi, Takeshi!
>
> I just tested and there are no issues on my setup. Are you setting the
> CDR_FLAG for all the requests? Have you also tried with different db modes?
>
> Best regards,
>
> Razvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
>
> On 04/23/2014 03:05 PM, mayamatakeshi wrote:
>
>> Hello,
>> I am trying to upgrade from opensips 1.10 (commit
>> bfd86ab25554082053167a82655e669ca1c0ea7c)
>> to 1.11 (latest 313f41ad46921d543980fa9fc71fb0715d385085).
>>
>> Almost everything works.
>> However, in my opensips.cfg I set dialog db_mode to REALTIME. And I have
>> acc in CDR mode.
>> Then after making some calls and confirming the dialogs were inserted in
>> the opensips.dialog table, I kill and restart opensips. Then I terminate
>> the calls.
>> In 1.10, this causes proper generation of records in the acc table.
>> However, in 1.11, no records are written to acc table.
>> I checked the release notes for 1.11 but could not find any indication
>> that this behavior would change:
>> http://opensips.org/pub/opensips/1.11.0/src/ChangeLog
>>
>> Before filing a bug ticket i would like to confirm as i might be
>> overlooking something.
>>
>> Here is the significant snippets of opensips.cfg:
>>
>> loadmodule "dialog.so"
>> modparam("dialog", "default_timeout", 10800)
>> modparam("dialog", "profiles_with_value", "calls")
>> modparam("dialog", "db_url",
>> "mysql://opensips:opensipsrw@localhost/opensips")
>> modparam("dialog", "db_mode", 1) # 1=REALTIME, 2=DELAYED, 3=SHUTDOWN
>> modparam("dialog", "db_update_period", 10)
>>
>>
>> loadmodule "acc.so"
>> modparam("acc", "db_flag", "DB_FLAG")
>> modparam("acc", "log_flag", "LOG_FLAG")
>> modparam("acc", "log_level", -1)
>> modparam("acc", "log_facility", "LOG_LOCAL0")
>> modparam("acc", "db_url", "mysql://opensips:opensipsrw@
>> localhost/opensips")
>> modparam("acc", "failed_transaction_flag", "FAILED_TRANSACTION_FLAG")
>> modparam("acc", "db_extra",
>> "domain=$avp(i:6);direction=$avp(i:20);from_uname=$fU;to_
>> uname=$tU;calling_number=$avp(i:21);destination=$avp(i:22);
>> anonymous=$avp(i:23);gwid=$avp(i:24);forward=$avp(i:25)")
>> modparam("acc", "log_extra",
>> "domain=$avp(i:6);direction=$avp(i:20);from_uname=$fU;to_
>> uname=$tU;calling_number=$avp(i:21);destination=$avp(i:22);
>> anonymous=$avp(i:23);gwid=$avp(i:24);forward=$avp(i:25)")
>> modparam("acc", "cdr_flag", "CDR_FLAG")
>>
>> Regards,
>> Takeshi
>>
>>
>>
>> ___
>> 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


[OpenSIPS-Users] No acc records after opensips restart

2014-04-23 Thread mayamatakeshi
Hello,
I am trying to upgrade from opensips 1.10 (commit
bfd86ab25554082053167a82655e669ca1c0ea7c)
to 1.11 (latest 313f41ad46921d543980fa9fc71fb0715d385085).

Almost everything works.
However, in my opensips.cfg I set dialog db_mode to REALTIME. And I have
acc in CDR mode.
Then after making some calls and confirming the dialogs were inserted in
the opensips.dialog table, I kill and restart opensips. Then I terminate
the calls.
In 1.10, this causes proper generation of records in the acc table.
However, in 1.11, no records are written to acc table.
I checked the release notes for 1.11 but could not find any indication that
this behavior would change:
http://opensips.org/pub/opensips/1.11.0/src/ChangeLog

Before filing a bug ticket i would like to confirm as i might be
overlooking something.

Here is the significant snippets of opensips.cfg:

loadmodule "dialog.so"
modparam("dialog", "default_timeout", 10800)
modparam("dialog", "profiles_with_value", "calls")
modparam("dialog", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")
modparam("dialog", "db_mode", 1) # 1=REALTIME, 2=DELAYED, 3=SHUTDOWN
modparam("dialog", "db_update_period", 10)


loadmodule "acc.so"
modparam("acc", "db_flag", "DB_FLAG")
modparam("acc", "log_flag", "LOG_FLAG")
modparam("acc", "log_level", -1)
modparam("acc", "log_facility", "LOG_LOCAL0")
modparam("acc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
modparam("acc", "failed_transaction_flag", "FAILED_TRANSACTION_FLAG")
modparam("acc", "db_extra",
"domain=$avp(i:6);direction=$avp(i:20);from_uname=$fU;to_uname=$tU;calling_number=$avp(i:21);destination=$avp(i:22);anonymous=$avp(i:23);gwid=$avp(i:24);forward=$avp(i:25)")
modparam("acc", "log_extra",
"domain=$avp(i:6);direction=$avp(i:20);from_uname=$fU;to_uname=$tU;calling_number=$avp(i:21);destination=$avp(i:22);anonymous=$avp(i:23);gwid=$avp(i:24);forward=$avp(i:25)")
modparam("acc", "cdr_flag", "CDR_FLAG")

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Cancelling calls after sending '180 Ringing' via MI t_reply doesn't work

2013-12-24 Thread mayamatakeshi
Hi Răzvan.

On Tue, Dec 24, 2013 at 6:23 PM, Răzvan Crainea  wrote:

> Hi, Takeshi!
>
> Is the UAS sending a 100 Trying?


Yes. I just confirmed now: '100 Trying' is sent by the UAS.


> If it's not and you are also dropping all the replies (the 180 messages),
> then OpenSIPS considers that no reply was received from the UAS, therefore
> it cannot be reached. A CANCEL would not make sense, because there is no
> indication that the UAS received the INVITE request.
>

Yes, I eventually realized this would be the case and my approach was wrong.

However, this doesn't explain the result  of my other test:
if instead of dropping it I convert 180 to 181, then the transaction is
cancellable.
But if after relaying this modified message I send '180 Ringing', the
transaction cannot be cancelled anymore.
So it looks like using MI t_reply messes with transactions.

Regards,
Takeshi


>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
>
> On 12/21/2013 03:24 AM, mayamatakeshi wrote:
>
>> Hello,
>> I have a requirement to delay the relay of '180 Ringing' for 3 seconds.
>> So what I did was to intercept the '180 Ringing' at the onreply_route
>> and drop it.
>> I send the transaction_id and to-tag to an external app that starts a 3
>> seconds timer and uses t_reply via MI to send a '180 Ringing' on the
>> transaction.
>> This works fine.
>>
>> However, if after the delayed '180 Ringing' is sent the caller cancels
>> the request, opensips doesn't send CANCEL to the callee.
>>
>> I have also tried to convert '180 Ringing' to '181 Call is Being
>> Forwarded' instead of dropping it, and this works fine too and the call
>> can be cancelled.
>> However, if the delayed '180 Ringing' is sent, the call cannot be
>> cancelled anymore.
>> So, am I doing something wrong?
>>
>> Regards,
>> Takeshi
>>
>>
>>
>>
>>
>>
>> ___
>> 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


[OpenSIPS-Users] Cancelling calls after sending '180 Ringing' via MI t_reply doesn't work

2013-12-20 Thread mayamatakeshi
Hello,
I have a requirement to delay the relay of '180 Ringing' for 3 seconds.
So what I did was to intercept the '180 Ringing' at the onreply_route and
drop it.
I send the transaction_id and to-tag to an external app that starts a 3
seconds timer and uses t_reply via MI to send a '180 Ringing' on the
transaction.
This works fine.

However, if after the delayed '180 Ringing' is sent the caller cancels the
request, opensips doesn't send CANCEL to the callee.

I have also tried to convert '180 Ringing' to '181 Call is Being Forwarded'
instead of dropping it, and this works fine too and the call can be
cancelled.
However, if the delayed '180 Ringing' is sent, the call cannot be cancelled
anymore.
So, am I doing something wrong?

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] fr_timer not working properly

2013-10-25 Thread mayamatakeshi
On Sat, Oct 26, 2013 at 1:35 AM, Muhammad Shahzad Shafi <
shah...@voip-demos.com> wrote:

> **
>
> This is pretty strange, since it never happened to me on an AMD machine,
> though i have different model, AMD Athlon II X2 250e.
>
> Can you try using fr_timer_avp? e.g.
>
>  modparam("tm", "fr_timer_avp", "$avp(10)")
> modparam("tm", "fr_inv_timer_avp", "$avp(20)")
>
> See more info,
>
> http://www.opensips.org/html/docs/modules/1.10.x/tm.html#id293753
>
>
> Set these vars and print xlog when INVITE comes in.
>
> branch_route {
> ...
>  $avp(10) = 5;
> $avp(20) = 60;
>  xlog("L_NOTICE", "[$pr:$fU@$si:$sp]: Setting TRY timer to '$avp(10)'
> and RING timer to '$avp(20)' for call from '$fu' to '$ru' \n");
> ...
> }
>
>
> Then check in failure route,
>
> failure_route {
> ...
>  if (t_check_status("408")) {
> if ( t_local_replied("all") ) {
> # local timeout with no reply received -> fr_timer
> xlog("L_NOTICE", "[$pr:$fU@$si:$sp]: Timeout on TRY timer for
> '$rm' from '$fu' to '$ru' after '$avp(10)' seconds \n");
> } else if ( t_local_replied("last") ) {
> # timeout with replies received -> fr_inv_timer
> xlog("L_NOTICE", "[$pr:$fU@$si:$sp]: Timeout on RING timer
> for '$rm' from '$fu' to '$ru' after '$avp(20)' seconds \n");
> } else {
> # received timeout
> xlog("L_NOTICE", "[$pr:$fU@$si:$sp]: Timeout on T2 timer for
> '$rm' from '$fu' to '$ru' after '$avp(20)' seconds \n");
> };
> };
>  ...
> }
>
>
> This will make things clearer if there is any problem.
>
>
Hello Muhammad,
thanks for the info.
I fail to make it clear that this is a problem with opensips running on
virtual machines.
The problem only happens on virtualized AMD Opteron(tm) Processor 6344 (on
KVM).

Actually,  we first detected this problem using fr_timer_avp, then we
proceeded to check with fr_timer parameter.
I forgot to mention that I have opened a ticket with more details about
this:
https://github.com/OpenSIPS/opensips/issues/107

Our conclusion was that the VM host is failing to send all ticks to the VM
guest maybe assuming it is running in tickless mode (although I am using
KVM, a read about this on a VMWare doc). So time passes slowly to the VM
guest.
We could not solve yet this issue so for now, the solution is to run on a
different VM host using a different CPU model.
Regards,
Takeshi


>
>
>
> On 2013-10-25 09:35, mayamatakeshi wrote:
>
>
>
>
> On Tue, Oct 15, 2013 at 10:09 AM, mayamatakeshi 
> wrote:
>
>> Hello,
>> I have some servers running opensips 1.10 commit
>> bfd86ab25554082053167a82655e669ca1c0ea7c
>>
>> I am seeing an issue in them that i cannot reproduce in other servers:
>> the fr_timer is not respected.
>> I set tm fr_timer=5 and use sipp to make a call and make opensips to send
>> the call to an address that is not being listened by any app like
>> 127.0.0.1:5010.
>> In these servers, sometimes timeout happens after 6, 9, 12 seconds but
>> never (so far after) 5 seconds.
>> But in other machines, fr_timer is consistently respected.
>> So I am trying to figure out what would be causing this.
>> Does anyone have any idea of configuration of the server that could cause
>> this?
>> The only significant difference I see is that on the problematic servers
>> corosync was installed for HA (to control opensips switchover) but I don't
>> see how this could have such impact.
>>
>
> Just in case someone else gets into this.
> We verified the problem only happens if the VM runs on a VM host using
> this processor:
>
> model name  : AMD Opteron(tm) Processor 6344
>
> On the server where we have this one:
>
> model name  : Intel(R) Xeon(R) CPU   X5550  @ 2.67GHz
>
>  there is no problem.
>
> Regards,
> Takeshi
>
>  --
> Mit freundlichen Grüßen
> Muhammad Shahzad
> ---
> CISCO Rich Media Communication Specialist (CRMCS)
> CISCO Certified Network Associate (CCNA)
> Cell: +49 176 99 83 10 85
> MSN: shari_78...@hotmail.com
> Email: shaherya...@googlemail.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] fr_timer not working properly

2013-10-25 Thread mayamatakeshi
On Tue, Oct 15, 2013 at 10:09 AM, mayamatakeshi wrote:

> Hello,
> I have some servers running opensips 1.10 commit
> bfd86ab25554082053167a82655e669ca1c0ea7c
>
> I am seeing an issue in them that i cannot reproduce in other servers:
> the fr_timer is not respected.
> I set tm fr_timer=5 and use sipp to make a call and make opensips to send
> the call to an address that is not being listened by any app like
> 127.0.0.1:5010.
> In these servers, sometimes timeout happens after 6, 9, 12 seconds but
> never (so far after) 5 seconds.
> But in other machines, fr_timer is consistently respected.
> So I am trying to figure out what would be causing this.
> Does anyone have any idea of configuration of the server that could cause
> this?
> The only significant difference I see is that on the problematic servers
> corosync was installed for HA (to control opensips switchover) but I don't
> see how this could have such impact.
>

Just in case someone else gets into this.
We verified the problem only happens if the VM runs on a VM host using this
processor:

model name  : AMD Opteron(tm) Processor 6344

On the server where we have this one:

model name  : Intel(R) Xeon(R) CPU   X5550  @ 2.67GHz

there is no problem.

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] fr_timer not working properly

2013-10-14 Thread mayamatakeshi
Hello,
I have some servers running opensips 1.10 commit
bfd86ab25554082053167a82655e669ca1c0ea7c

I am seeing an issue in them that i cannot reproduce in other servers:
the fr_timer is not respected.
I set tm fr_timer=5 and use sipp to make a call and make opensips to send
the call to an address that is not being listened by any app like
127.0.0.1:5010.
In these servers, sometimes timeout happens after 6, 9, 12 seconds but
never (so far after) 5 seconds.
But in other machines, fr_timer is consistently respected.
So I am trying to figure out what would be causing this.
Does anyone have any idea of configuration of the server that could cause
this?
The only significant difference I see is that on the problematic servers
corosync was installed for HA (to control opensips switchover) but I don't
see how this could have such impact.

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Dialog db flush issue

2013-10-03 Thread mayamatakeshi
On Thu, Oct 3, 2013 at 10:15 PM, mayamatakeshi wrote:

> Hello,
> I am experimenting with module dialog profiles to limit simultaneous calls
> from/to a subscriber.
> This works fine.
> And also works when I restart opensips:
>   - calls established before restart are counted when limit is checked
>   - acc record (cdr mode) is generated for the call when BYE is received.
> I can see this happens because when opensips shuts down gracefully, it
> saves dialog data to DB.
>
>
> Then, I experimented simulating an opensips crash by doing "kill -9 pid"
> for each opensips process.
> This was done after i confirmed dialog has flushed its data to DB (i am
> using db_mode=DELAYED and db_update_period=10).
> However, after restarting opensips, although I can see it was able to load
> dialog data:
>   - calls established before the "crash" are not counted when limit is
> checked
>   - no acc record is generated when BY is received.
>
>
> Comparing, the records for the same call that periodic dialog update
> generates with what a graceful shutdown saves, I can see they are different:
>
>
> After periodic dialog db update:
>
> mysql> select * from dialog;
>
> +---+--+---+--++--+--++-+-+--+--+--+--+--++++---+++--+--+--+---+
> | dlg_id| callid   |
> from_uri  | from_tag |
> to_uri | to_tag   |
> mangled_from_uri | mangled_to_uri | caller_cseq | callee_cseq |
> caller_ping_cseq | callee_ping_cseq | caller_route_set | callee_route_set |
> caller_contact   | callee_contact |
> caller_sock| callee_sock| state | start_time |
> timeout| vars | profiles | script_flags | flags |
>
> +---+--+---+--++--+--++-+-+--+--+--+--+--++++---+++--+--+--+---+
> | 9549462304683 | b583e688-f87b-4861-936f-7dc76e33004a |
> sip:53535353224...@somedomain.com | d2ecbce5-9275-4788-a40c-509a23476e35
> | sip:234223423423@192.168.2.177 | 39178165-9e29-4a31-af78-51e61e54920c |
> NULL | NULL   | 0   | 21320
> |0 |0 | NULL | NULL
> | sip:sip-tester@192.168.2.78:5060 | sip:sip-tester@192.168.2.239:10802 |
> udp:192.168.2.177:5060 | udp:192.168.2.177:5060 | 4 | 1380805509 |
> 1380816310 | NULL | NULL |0 |16 |
>
> +---+--+---+--++--+--++-+-+--+--+--+--+--+++--

[OpenSIPS-Users] Dialog db flush issue

2013-10-03 Thread mayamatakeshi
Hello,
I am experimenting with module dialog profiles to limit simultaneous calls
from/to a subscriber.
This works fine.
And also works when I restart opensips:
  - calls established before restart are counted when limit is checked
  - acc record (cdr mode) is generated for the call when BYE is received.
I can see this happens because when opensips shuts down gracefully, it
saves dialog data to DB.


Then, I experimented simulating an opensips crash by doing "kill -9 pid"
for each opensips process.
This was done after i confirmed dialog has flushed its data to DB (i am
using db_mode=DELAYED and db_update_period=10).
However, after restarting opensips, although I can see it was able to load
dialog data:
  - calls established before the "crash" are not counted when limit is
checked
  - no acc record is generated when BY is received.


Comparing, the records for the same call that periodic dialog update
generates with what a graceful shutdown saves, I can see they are different:


After periodic dialog db update:

mysql> select * from dialog;
+---+--+---+--++--+--++-+-+--+--+--+--+--++++---+++--+--+--+---+
| dlg_id| callid   |
from_uri  | from_tag |
to_uri | to_tag   |
mangled_from_uri | mangled_to_uri | caller_cseq | callee_cseq |
caller_ping_cseq | callee_ping_cseq | caller_route_set | callee_route_set |
caller_contact   | callee_contact |
caller_sock| callee_sock| state | start_time |
timeout| vars | profiles | script_flags | flags |
+---+--+---+--++--+--++-+-+--+--+--+--+--++++---+++--+--+--+---+
| 9549462304683 | b583e688-f87b-4861-936f-7dc76e33004a |
sip:53535353224...@somedomain.com | d2ecbce5-9275-4788-a40c-509a23476e35 |
sip:234223423423@192.168.2.177 | 39178165-9e29-4a31-af78-51e61e54920c |
NULL | NULL   | 0   | 21320
|0 |0 | NULL | NULL
| sip:sip-tester@192.168.2.78:5060 | sip:sip-tester@192.168.2.239:10802 |
udp:192.168.2.177:5060 | udp:192.168.2.177:5060 | 4 | 1380805509 |
1380816310 | NULL | NULL |0 |16 |
+---+--+---+--++--+--++-+-+--+--+--+--+--++++---+++--+--+--+---+
1 row in set (0.00 sec)


After opensips graceful shutdown:

mysql> select * from dialog;
+---+--+---+--++--+--++-+-+--+--+--+--+--++++---++++--+--+---+
| dlg_id| callid   |
from_uri  | from_tag |
to_uri 

Re: [OpenSIPS-Users] Stats for module dialog using binary interface

2013-09-10 Thread mayamatakeshi
Hi Liviu,
understood.
I failed to notice "13 + 20 = 33".
Thanks for the clarification.
Regards,
Takeshi



On Tue, Sep 10, 2013 at 7:01 PM, Liviu Chircu  wrote:

>  Hello Takeshi,
>
> As you probably noticed, the difference comes from several failed dialogs
> (most likely from a negative reply). Since only confirmed dialogs are
> replicated, the standby server will not receive all statistics.
>
> Although the issue is harmless, to me it looks like it needs a fix. I'll
> put in on my TODO list.
>
> Best regards,
>
> Liviu Chircu
> OpenSIPS Devhttp://www.opensips-solutions.com
>
> On 09/09/2013 03:29 PM, mayamatakeshi wrote:
>
>  I am experimenting with the binary interface to replicate dialog data
> between 2 instances of opensips
>
>  After a batch of tests (done after restarting opensips), I compared the
> stats for module dialog and verified they are not the same:
>
> Active server:
> # opensipsctl fifo get_statistics dialog:
> dialog:active_dialogs = 0
> dialog:early_dialogs = 0
> dialog:processed_dialogs = 33
> dialog:expired_dialogs = 0
> dialog:failed_dialogs = 20
> dialog:create_sent = 13
> dialog:update_sent = 49
> dialog:delete_sent = 48
> dialog:create_recv = 0
> dialog:update_recv = 0
> dialog:delete_recv = 0
>
>
> Standby server:
> # opensipsctl fifo get_statistics dialog:
> dialog:active_dialogs = 0
> dialog:early_dialogs = 0
> dialog:processed_dialogs = 13
> dialog:expired_dialogs = 0
> dialog:failed_dialogs = 0
> dialog:create_sent = 0
> dialog:update_sent = 0
> dialog:delete_sent = 0
> dialog:create_recv = 13
> dialog:update_recv = 49
> dialog:delete_recv = 48
>
>
>  Is the above expected? (obs: repeating the tests always produce the same
> numbers).
>
>  Regards,
>  Takeshi
>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://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


[OpenSIPS-Users] Stats for module dialog using binary interface

2013-09-09 Thread mayamatakeshi
I am experimenting with the binary interface to replicate dialog data
between 2 instances of opensips

After a batch of tests (done after restarting opensips), I compared the
stats for module dialog and verified they are not the same:

Active server:
# opensipsctl fifo get_statistics dialog:
dialog:active_dialogs = 0
dialog:early_dialogs = 0
dialog:processed_dialogs = 33
dialog:expired_dialogs = 0
dialog:failed_dialogs = 20
dialog:create_sent = 13
dialog:update_sent = 49
dialog:delete_sent = 48
dialog:create_recv = 0
dialog:update_recv = 0
dialog:delete_recv = 0


Standby server:
# opensipsctl fifo get_statistics dialog:
dialog:active_dialogs = 0
dialog:early_dialogs = 0
dialog:processed_dialogs = 13
dialog:expired_dialogs = 0
dialog:failed_dialogs = 0
dialog:create_sent = 0
dialog:update_sent = 0
dialog:delete_sent = 0
dialog:create_recv = 13
dialog:update_recv = 49
dialog:delete_recv = 48


Is the above expected? (obs: repeating the tests always produce the same
numbers).

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Accepting calls only form Some IP Address

2013-08-30 Thread mayamatakeshi
Try this:

if ($si == "192.168.0.35") {
t_relay();
} else {
sl_send_reply("403", "Forbidden");
exit;
}

regards,
Takeshi

On Fri, Aug 30, 2013 at 7:39 PM, Danny Dias  wrote:

> sorry, my small script is like this:
>
> if (check_address("0","192.168.0.35","0","ANY","", "")) {
> t_relay();
> }
> else {
> sl_send_reply("403", "Forbidden");
> exit;
> }
>
> Still receiving the 403
>
>
>
> 2013/8/30 Danny Dias 
>
>> Finally,
>>
>> I did it like this:
>>
>> if (!check_address("0","192.168.0.35","0","ANY","", "")) {
>>> t_relay();
>>> }
>>> else {
>>> sl_send_reply("403", "Forbidden");
>>> exit;
>>> }
>>
>>
>> But now, all the calls from source ip address 192.168.0.35 receive a 403:
>>
>> U 192.168.0.35:3832 -> 192.168.1.20:5060
>>> INVITE sip:1001@192.168.1.20 SIP/2.0.
>>> Via: SIP/2.0/UDP 192.168.1.35:3832
>>> ;branch=z9hG4bK-d8754z-c4f09d265010a511-1---d8754z-;rport.
>>> Max-Forwards: 70.
>>> Contact: .
>>> To: .
>>> From: "1000";tag=6be1ed13.
>>> Call-ID: ZGZiMjEwMzFjZjRkNDFmMzdhZGJkNTgxYzlmYjE4MTY.
>>> CSeq: 1 INVITE.
>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
>>> SUBSCRIBE, INFO.
>>> Content-Type: application/sdp.
>>> Supported: replaces.
>>> User-Agent: Bria 3 release 3.5.3 stamp 70600.
>>> Content-Length: 208.
>>> .
>>> v=0.
>>> o=- 1377858559536092 1 IN IP4 192.168.0.35.
>>> s=Bria 3 release 3.5.3 stamp 70600.
>>> c=IN IP4 192.168.0.35.
>>> t=0 0.
>>> m=audio 53766 RTP/AVP 8 0 101.
>>> a=rtpmap:101 telephone-event/8000.
>>> a=fmtp:101 0-15.
>>> a=sendrecv.
>>>
>>> U 192.168.1.20:5060 -> 192.168.0.35:3832
>>> SIP/2.0 403 Forbidden.
>>> Via: SIP/2.0/UDP 192.168.0.35:3832
>>> ;received=192.168.0.35;branch=z9hG4bK-d8754z-c4f09d265010a511-1---d8754z-;rport=3832.
>>> To: ;tag=7ff88f74df89822193682e3f23116cc8.59de.
>>> From: "1000";tag=6be1ed13.
>>> Call-ID: ZGZiMjEwMzFjZjRkNDFmMzdhZGJkNTgxYzlmYjE4MTY.
>>> CSeq: 1 INVITE.
>>> Server: OpenSIPS (1.9.1-notls (i386/linux)).
>>> Content-Length: 0.
>>
>>
>>
>>
>>
>>
>> 2013/8/30 Danny Dias 
>>
>>> So,
>>>
>>> It would be something like this (not quite sure...):
>>>
>>> route {
 if (check_address("0","192.168.2.135","0","ANY","", "")) {
 t_relay();
 else if (sl_send_reply("403", "Forbidden"));
 exit;
 }
>>>
>>> .
 .
>>>
>>>
>>> In this small script at the very begining of route script, i will only
>>> permit calls from ip "192.168.2.135", any other ip, will receive a 403. Am
>>> i right?
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2013/8/30 Víctor Fernández Martínez 
>>>
 Hi Danny,

 You can check the source IP address using $si and send a forbidden
 response if
 it doesn't match your needs.

 Best regards.



 On Friday 30 August 2013 03:48:25 Danny Días wrote:
 > Hi,
 >
 > I need to configure OpenSIPS to only accept calls from 1 IP address
 and
 > without any kind of authentication (no password required for
 clients); i
 > wonder if there's a function in OpenSIPS to accomplish this?
 >
 > Thanks so much


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

>>>
>>>
>>>
>>> --
>>> *SIP:* da...@voice.danntel.net 
>>> *Web: *http://www.danntel.net
>>>
>>
>>
>>
>> --
>> *SIP:* da...@voice.danntel.net 
>> *Web: *http://www.danntel.net
>>
>
>
>
> --
> *SIP:* da...@voice.danntel.net 
> *Web: *http://www.danntel.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 to get is_from_gw to fill gw_id_avp

2013-08-06 Thread mayamatakeshi
Hello Vlad,
I tested and confirmed it is OK now.
Thanks.

Regards,
Takeshi


On Wed, Aug 7, 2013 at 4:33 AM, Vlad Paiu  wrote:

>  Hello,
>
> Actually, the ERROR:core:fixup_uint: bad number <-1> error message was a
> bug in the code, that it wouldn't accept negative numbers for the gateway
> type ( as the docs suggest would match any gw type ).
>
> I've just pushed a fix for this on 1.8, 1.9 and 1.10.
>
> Best Regards,
>
> Vlad Paiu
> OpenSIPS Developerhttp://www.opensips-solutions.com
>
> On 08/04/2013 11:39 PM, mayamatakeshi wrote:
>
>  Thanks,
> actually, I realized it was my mistake:
> i was calling is_from_gw more than once but only used "i" on one place and
> so opensips was not always filling the AVP as it was not requested.
>
>  regards,
> Takeshi
>
>
> On Mon, Aug 5, 2013 at 9:24 AM, Laszlo  wrote:
>
>>  http://openser.org/pipermail/users/2013-May/025705.html
>>
>>  maybe this can give you an idea..
>>
>>  -Laszlo
>>
>>
>> 2013/8/3 mayamatakeshi 
>>
>>>   Hello, can anyone give me an example of how to call drouting function
>>> is_from_gw ?
>>>
>>> http://www.opensips.org/html/docs/modules/1.9.x/drouting.html#id293958
>>>
>>>  The doc gives this example:
>>> if (is_from_gw("3","1")
>>>  which seems to be incorrect as "1" is not a valid flag.
>>>
>>>  I am trying to use flag "i" to get the gwid in the AVP set using
>>> gw_id_avp but it is not working.
>>> I already tried as:
>>> if (is_from_gw("", "i"))
>>> and
>>> if (is_from_gw("0", "i"))
>>>  but it is not working: the avp set by avp_gw_id is no filled.
>>> I know my configuration is correct because do_routing() does fill the
>>> avp.
>>>
>>>  Obs: the doc also says that if I don't care about the type of the
>>> gateway I can pass a negative number.
>>>  So I tried:
>>> if (is_from_gw("-1", "i")
>>>  But then i get:
>>> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
>>> ERROR:core:fixup_uint: bad number <-1>
>>> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
>>> ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 227
>>> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
>>> CRITICAL:core:fix_expr: fix_actions error
>>> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
>>> ERROR:core:main: failed to fix configuration with err code -6
>>>
>>>
>>>
>>> In case this is a bug, I tried with this git commit (head):
>>>
>>> commit 70b6629f88e2e3fc51e42154b7db8fb7b94417a1
>>> Author: Damien Sandras 
>>> Date:   Wed Jul 10 17:59:34 2013 +0200
>>>
>>>
>>>
>>>  regards,
>>>  Takeshi
>>>
>>>  ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>>
>> --
>>
>> --
>>  Kind regards,
>>  Laszlo Bekesi
>>  http://voipfreak.net
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://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-Devel] [NEW] Dialog replication using a new core interface

2013-08-06 Thread mayamatakeshi
Sorry, please ignore. Replied to the wrong post.


On Wed, Aug 7, 2013 at 9:54 AM, mayamatakeshi wrote:

> Hello Vlad,
> I tested and confirmed it is OK now.
> Thanks.
>
> Regards,
> Takeshi
>
>
>
> On Wed, Aug 7, 2013 at 4:52 AM, Vlad Paiu  wrote:
>
>> Hello,
>>
>> What are you thinking about more exactly here in terms of security ?
>>
>> The OpenSIPS worker processes that listen for BIN replicated packages do
>> not perform any IP authentication by themselves, so if you leave those UDP
>> ports open from the outside, you are leaving yourself exposed to outside
>> attackers coming in and either deleting some of the existing dialogs ( by
>> sending you some binary packages that destroy an ongoing dialog ) or
>> filling up your shared memory ( by sending you 'new dialog' binary packages
>> ).
>>
>> Currently, it's left to the OpenSIPS administrator to properly configure
>> the firewall so that the binary interface listeners ( the ones specified by
>> bin_listen=127.0.0.1: ) are only open for the other OpenSIPS
>> instance IPs.
>>
>> Best Regards,
>>
>> Vlad Paiu
>> OpenSIPS Developer
>> http://www.opensips-solutions.**com <http://www.opensips-solutions.com>
>>
>>
>> On 08/01/2013 07:58 PM, Nick Khamis wrote:
>>
>>> What needs to be considered in terms of security?
>>>
>>> Nick.
>>>
>>> On 7/31/13, Bogdan-Andrei Iancu  wrote:
>>>
>>>> Hi Ryan,
>>>>
>>>> This has nothing to do with dialog pining or accounting - the new
>>>> interface allows OpenSIPS to replicate the dialog state to another
>>>> OpenSIPS instance. If I misunderstood you, please rephrase :)
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>> OpenSIPS Founder and Developer
>>>> http://www.opensips-solutions.**com <http://www.opensips-solutions.com>
>>>>
>>>>
>>>> On 07/29/2013 08:20 PM, Ryan Bullock wrote:
>>>>
>>>>> This is pretty exciting!
>>>>>
>>>>> What are the plans for how this will work with features such as dialog
>>>>> pinging and accounting?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Ryan
>>>>>
>>>>>
>>>>> On Mon, Jul 29, 2013 at 9:46 AM, Bogdan-Andrei Iancu
>>>>> mailto:bog...@opensips.org>> wrote:
>>>>>
>>>>>  In long term we plan to use the BIN interface to replicate even
>>>>>  more internal data between multiple OpenSIPS instances, like doing
>>>>>  registration replication (instead of doing it from script via
>>>>>  SIP). Theoretically it may be used for replicating even
>>>>>  transaction state between 2 OpenSIPS instances - imagine having a
>>>>>  call ringing on instance A and being accepted on instance B (after
>>>>>  a failover) - 0% losses !
>>>>>
>>>>>  Aside realtime data replication, the BIN interface is to be used
>>>>>  also for exchanging any other type of information between OpenSIPS
>>>>>  instances, like federating multiple instances.
>>>>>
>>>>>  The main advantages of the BIN interface over the MI interface :
>>>>>  - BIN is binary encoded so much faster (as performance)
>>>>>  - BIN interface has both sender and receiver in OpenSIPS (MI
>>>>>  has only the receiver)
>>>>>  - MI is for external usage, while BIN is internal
>>>>>  (opensips2opensips)
>>>>>
>>>>>  Regards,
>>>>>
>>>>>  Bogdan-Andrei Iancu
>>>>>  OpenSIPS Founder and Developer
>>>>>  
>>>>> http://www.opensips-solutions.**com<http://www.opensips-solutions.com>
>>>>>
>>>>>
>>>>>  On 07/29/2013 06:22 PM, Liviu Chircu wrote:
>>>>>
>>>>>>  Hello all,
>>>>>>
>>>>>>  OpenSIPS just got better with a /new core interface/ and a /new
>>>>>>  failover mechanism/!
>>>>>>
>>>>>>  The purpose of the new *Binary Internal Interface *is to offer a
>>>>>>  fast and efficient communication channel between OpenSIPS
>>>>>>  instances. Ope

Re: [OpenSIPS-Users] [OpenSIPS-Devel] [NEW] Dialog replication using a new core interface

2013-08-06 Thread mayamatakeshi
Hello Vlad,
I tested and confirmed it is OK now.
Thanks.

Regards,
Takeshi


On Wed, Aug 7, 2013 at 4:52 AM, Vlad Paiu  wrote:

> Hello,
>
> What are you thinking about more exactly here in terms of security ?
>
> The OpenSIPS worker processes that listen for BIN replicated packages do
> not perform any IP authentication by themselves, so if you leave those UDP
> ports open from the outside, you are leaving yourself exposed to outside
> attackers coming in and either deleting some of the existing dialogs ( by
> sending you some binary packages that destroy an ongoing dialog ) or
> filling up your shared memory ( by sending you 'new dialog' binary packages
> ).
>
> Currently, it's left to the OpenSIPS administrator to properly configure
> the firewall so that the binary interface listeners ( the ones specified by
> bin_listen=127.0.0.1: ) are only open for the other OpenSIPS instance
> IPs.
>
> Best Regards,
>
> Vlad Paiu
> OpenSIPS Developer
> http://www.opensips-solutions.**com 
>
>
> On 08/01/2013 07:58 PM, Nick Khamis wrote:
>
>> What needs to be considered in terms of security?
>>
>> Nick.
>>
>> On 7/31/13, Bogdan-Andrei Iancu  wrote:
>>
>>> Hi Ryan,
>>>
>>> This has nothing to do with dialog pining or accounting - the new
>>> interface allows OpenSIPS to replicate the dialog state to another
>>> OpenSIPS instance. If I misunderstood you, please rephrase :)
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.**com 
>>>
>>>
>>> On 07/29/2013 08:20 PM, Ryan Bullock wrote:
>>>
 This is pretty exciting!

 What are the plans for how this will work with features such as dialog
 pinging and accounting?

 Regards,

 Ryan


 On Mon, Jul 29, 2013 at 9:46 AM, Bogdan-Andrei Iancu
 mailto:bog...@opensips.org>> wrote:

  In long term we plan to use the BIN interface to replicate even
  more internal data between multiple OpenSIPS instances, like doing
  registration replication (instead of doing it from script via
  SIP). Theoretically it may be used for replicating even
  transaction state between 2 OpenSIPS instances - imagine having a
  call ringing on instance A and being accepted on instance B (after
  a failover) - 0% losses !

  Aside realtime data replication, the BIN interface is to be used
  also for exchanging any other type of information between OpenSIPS
  instances, like federating multiple instances.

  The main advantages of the BIN interface over the MI interface :
  - BIN is binary encoded so much faster (as performance)
  - BIN interface has both sender and receiver in OpenSIPS (MI
  has only the receiver)
  - MI is for external usage, while BIN is internal
  (opensips2opensips)

  Regards,

  Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.**com


  On 07/29/2013 06:22 PM, Liviu Chircu wrote:

>  Hello all,
>
>  OpenSIPS just got better with a /new core interface/ and a /new
>  failover mechanism/!
>
>  The purpose of the new *Binary Internal Interface *is to offer a
>  fast and efficient communication channel between OpenSIPS
>  instances. OpenSIPS modules can now use this core interface to
>  send/receive packets with specific information. A common usage
>  case for this feature would be data replication between a primary
>  instance and a backup one.
>
>  This is especially useful in scenarios with OpenSIPS instances
>  which handle large amounts of concurrent calls, so that failover
>  through a database backend is not feasible anymore due to the
>  significant time required in order to load the needed tables.
>
>  As an example of using the interface, the dialog module now
>  offers the possibility of *replicating dialogs* to another
>  instance. The script writer may now configure a set of proxies
>  which will receive dialog-related events: /creation/,
>  /confirmation/ and /deletion/, all in /realtime/. These messages
>  are compact and they are sent over UDP. The dialog module now
>  also exports several new statistics which show the total
>  sent/received replication packets.
>
>  Configuring UDP listeners for the new interface is trivial and
>  explained in the OpenSIPS manuals [1].
>
>  [1]: 
> http://www.opensips.org/**Documentation/Interface-Binary
>
>  Best regards,
>  --
>  Liviu Chircu
>  OpenSIPS Developer
>  

Re: [OpenSIPS-Users] How to get is_from_gw to fill gw_id_avp

2013-08-04 Thread mayamatakeshi
Thanks,
actually, I realized it was my mistake:
i was calling is_from_gw more than once but only used "i" on one place and
so opensips was not always filling the AVP as it was not requested.

regards,
Takeshi


On Mon, Aug 5, 2013 at 9:24 AM, Laszlo  wrote:

> http://openser.org/pipermail/users/2013-May/025705.html
>
> maybe this can give you an idea..
>
> -Laszlo
>
>
> 2013/8/3 mayamatakeshi 
>
>> Hello, can anyone give me an example of how to call drouting function
>> is_from_gw ?
>>
>> http://www.opensips.org/html/docs/modules/1.9.x/drouting.html#id293958
>>  <http://www.opensips.org/html/docs/modules/devel/drouting.html#id294786>
>>
>> The doc gives this example:
>> if (is_from_gw("3","1")
>> which seems to be incorrect as "1" is not a valid flag.
>>
>> I am trying to use flag "i" to get the gwid in the AVP set using
>> gw_id_avp but it is not working.
>> I already tried as:
>> if (is_from_gw("", "i"))
>> and
>> if (is_from_gw("0", "i"))
>> but it is not working: the avp set by avp_gw_id is no filled.
>> I know my configuration is correct because do_routing() does fill the avp.
>>
>> Obs: the doc also says that if I don't care about the type of the gateway
>> I can pass a negative number.
>> So I tried:
>> if (is_from_gw("-1", "i")
>> But then i get:
>> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
>> ERROR:core:fixup_uint: bad number <-1>
>> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
>> ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 227
>> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
>> CRITICAL:core:fix_expr: fix_actions error
>> Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
>> ERROR:core:main: failed to fix configuration with err code -6
>>
>>
>>
>> In case this is a bug, I tried with this git commit (head):
>>
>> commit 70b6629f88e2e3fc51e42154b7db8fb7b94417a1
>> Author: Damien Sandras 
>> Date:   Wed Jul 10 17:59:34 2013 +0200
>>
>>
>>
>> regards,
>> Takeshi
>> <http://www.opensips.org/html/docs/modules/devel/drouting.html#id294786>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
>
> --
> Kind regards,
> Laszlo Bekesi
> http://voipfreak.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


[OpenSIPS-Users] How to get is_from_gw to fill gw_id_avp

2013-08-03 Thread mayamatakeshi
Hello, can anyone give me an example of how to call drouting function
is_from_gw ?

http://www.opensips.org/html/docs/modules/1.9.x/drouting.html#id293958


The doc gives this example:
if (is_from_gw("3","1")
which seems to be incorrect as "1" is not a valid flag.

I am trying to use flag "i" to get the gwid in the AVP set using gw_id_avp
but it is not working.
I already tried as:
if (is_from_gw("", "i"))
and
if (is_from_gw("0", "i"))
but it is not working: the avp set by avp_gw_id is no filled.
I know my configuration is correct because do_routing() does fill the avp.

Obs: the doc also says that if I don't care about the type of the gateway I
can pass a negative number.
So I tried:
if (is_from_gw("-1", "i")
But then i get:
Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
ERROR:core:fixup_uint: bad number <-1>
Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
ERROR:core:fix_actions: fixing failed (code=-6) at cfg line 227
Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
CRITICAL:core:fix_expr: fix_actions error
Aug  3 16:53:44 SERVER /usr/local/src/git/opensips-head/opensips[1454]:
ERROR:core:main: failed to fix configuration with err code -6



In case this is a bug, I tried with this git commit (head):

commit 70b6629f88e2e3fc51e42154b7db8fb7b94417a1
Author: Damien Sandras 
Date:   Wed Jul 10 17:59:34 2013 +0200



regards,
Takeshi

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Reception of "100 Trying" doesn't cancel tm fr_timer

2013-07-15 Thread mayamatakeshi
On Mon, Jul 15, 2013 at 7:56 PM, mayamatakeshi wrote:

>
>
>
> On Mon, Jul 15, 2013 at 11:49 AM, mayamatakeshi 
> wrote:
>
>>
>>
>>
>> On Mon, Jul 15, 2013 at 10:13 AM, mayamatakeshi 
>> wrote:
>>
>>> Hello,
>>> we are using opensips 1.6 r. 7055 under CentOS 5.3 x86_64 and this works
>>> fine on several machines.
>>> I am tasked with preparing upgrade to CentOS 6.4 x86_64 so I have
>>> prepared a Virtual Machine to run this OS,  installed opensips and used the
>>> same opensips.cfg .
>>>
>>> However, I am seeing the following issue: reception of "100 Trying"
>>> doesn't cancel module tm fr_timer but if other provisional responses like
>>> "180 Ringing" is received, fr_timer is canceled.
>>> I am sure the "100 Trying" is received by opensips because it doesn't
>>> retransmit the INVITE.
>>>
>>
>> Sorry, by mistake I looked at the wrong capture. Indeed, opensips is
>> retransmitting the INVITE. But checking Call-ID, from-tag and Via headers,
>> they match and so, opensips should not do retransmission. It seems somehow
>> it is ignoring the "100 Trying".
>>
>> So to further investigate I enabled debug with "opensipsctl fifo debug 4"
>> (instead of default debug 0), but surprisingly, now opensips accepts the
>> "180 Trying"  (doesn't retransmit the INVITE) and fr_timer is canceled.
>>
>
> In the above I meant "100 Trying".
>
>
>>  I tested several times and just by switching debug off and on is enough
>> to cause the problem to appear/disappear.
>>
>>
>>
>>> Everything else seems to be fine.
>>>
>>> Does anyone has any idea why this could be happening?
>>> Also, to confirm I have prepared 3 CentOS 6.4 x86_64 VMs, but in one of
>>> them the problem doesn't happen but I don't know why this is so as i
>>> compared the packages installed (yum list installed) and they are all the
>>> same, including version numbers.
>>>
>>
>> Also, on the machine where the problem doesn't manifest itself, it is the
>> opposite:
>> if I enable debug with "opensipsctl fifo debug 4", fr_timer fails to be
>> canceled by "100 Trying".
>>
>
> Retrying several times, the problem occasionally happens on this machine
> too. So it seems to be some race condition.
>
> I was able to try with latest revisions of 1.7 and 1.8 branches and the
> problem also happens with them.
>

In my tests, I have this scenario:
  sipp uac --> INVITE -->  opensips --> FreeSWITCH
  sipp uac <--  opensips <-- 100 Trying <-- FreeSWITCH
however, if I replace FreeSWITCH with a sipp uas, the problem doesn't
happen.
I took care of preparing the sipp uas to generate the  "100 Trying" exactly
the same as FS would do it, but still I could not reproduce the problem.
So i think the presence of FS has some strange influence in the environment
and i cannot  be sure the problem is with opensips itself anymore.
Sorry for the noise.

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Reception of "100 Trying" doesn't cancel tm fr_timer

2013-07-15 Thread mayamatakeshi
On Mon, Jul 15, 2013 at 11:49 AM, mayamatakeshi wrote:

>
>
>
> On Mon, Jul 15, 2013 at 10:13 AM, mayamatakeshi 
> wrote:
>
>> Hello,
>> we are using opensips 1.6 r. 7055 under CentOS 5.3 x86_64 and this works
>> fine on several machines.
>> I am tasked with preparing upgrade to CentOS 6.4 x86_64 so I have
>> prepared a Virtual Machine to run this OS,  installed opensips and used the
>> same opensips.cfg .
>>
>> However, I am seeing the following issue: reception of "100 Trying"
>> doesn't cancel module tm fr_timer but if other provisional responses like
>> "180 Ringing" is received, fr_timer is canceled.
>> I am sure the "100 Trying" is received by opensips because it doesn't
>> retransmit the INVITE.
>>
>
> Sorry, by mistake I looked at the wrong capture. Indeed, opensips is
> retransmitting the INVITE. But checking Call-ID, from-tag and Via headers,
> they match and so, opensips should not do retransmission. It seems somehow
> it is ignoring the "100 Trying".
>
> So to further investigate I enabled debug with "opensipsctl fifo debug 4"
> (instead of default debug 0), but surprisingly, now opensips accepts the
> "180 Trying"  (doesn't retransmit the INVITE) and fr_timer is canceled.
>

In the above I meant "100 Trying".


> I tested several times and just by switching debug off and on is enough to
> cause the problem to appear/disappear.
>
>
>
>> Everything else seems to be fine.
>>
>> Does anyone has any idea why this could be happening?
>> Also, to confirm I have prepared 3 CentOS 6.4 x86_64 VMs, but in one of
>> them the problem doesn't happen but I don't know why this is so as i
>> compared the packages installed (yum list installed) and they are all the
>> same, including version numbers.
>>
>
> Also, on the machine where the problem doesn't manifest itself, it is the
> opposite:
> if I enable debug with "opensipsctl fifo debug 4", fr_timer fails to be
> canceled by "100 Trying".
>

Retrying several times, the problem occasionally happens on this machine
too. So it seems to be some race condition.

I was able to try with latest revisions of 1.7 and 1.8 branches and the
problem also happens with them.


>
>
>>
>> (Also I have tried upgrading to latest branch 1.6 r. 10024, and the
>> problem persists).
>>
>> Regards,
>> Takeshi
>>
>>
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Reception of "100 Trying" doesn't cancel tm fr_timer

2013-07-14 Thread mayamatakeshi
On Mon, Jul 15, 2013 at 10:13 AM, mayamatakeshi wrote:

> Hello,
> we are using opensips 1.6 r. 7055 under CentOS 5.3 x86_64 and this works
> fine on several machines.
> I am tasked with preparing upgrade to CentOS 6.4 x86_64 so I have prepared
> a Virtual Machine to run this OS,  installed opensips and used the same
> opensips.cfg .
>
> However, I am seeing the following issue: reception of "100 Trying"
> doesn't cancel module tm fr_timer but if other provisional responses like
> "180 Ringing" is received, fr_timer is canceled.
> I am sure the "100 Trying" is received by opensips because it doesn't
> retransmit the INVITE.
>

Sorry, by mistake I looked at the wrong capture. Indeed, opensips is
retransmitting the INVITE. But checking Call-ID, from-tag and Via headers,
they match and so, opensips should not do retransmission. It seems somehow
it is ignoring the "100 Trying".

So to further investigate I enabled debug with "opensipsctl fifo debug 4"
(instead of default debug 0), but surprisingly, now opensips accepts the
"180 Trying"  (doesn't retransmit the INVITE) and fr_timer is canceled.
I tested several times and just by switching debug off and on is enough to
cause the problem to appear/disappear.



> Everything else seems to be fine.
>
> Does anyone has any idea why this could be happening?
> Also, to confirm I have prepared 3 CentOS 6.4 x86_64 VMs, but in one of
> them the problem doesn't happen but I don't know why this is so as i
> compared the packages installed (yum list installed) and they are all the
> same, including version numbers.
>

Also, on the machine where the problem doesn't manifest itself, it is the
opposite:
if I enable debug with "opensipsctl fifo debug 4", fr_timer fails to be
canceled by "100 Trying".


>
> (Also I have tried upgrading to latest branch 1.6 r. 10024, and the
> problem persists).
>
> Regards,
> Takeshi
>
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Reception of "100 Trying" doesn't cancel tm fr_timer

2013-07-14 Thread mayamatakeshi
Hello,
we are using opensips 1.6 r. 7055 under CentOS 5.3 x86_64 and this works
fine on several machines.
I am tasked with preparing upgrade to CentOS 6.4 x86_64 so I have prepared
a Virtual Machine to run this OS,  installed opensips and used the same
opensips.cfg .

However, I am seeing the following issue: reception of "100 Trying" doesn't
cancel module tm fr_timer but if other provisional responses like "180
Ringing" is received, fr_timer is canceled.
I am sure the "100 Trying" is received by opensips because it doesn't
retransmit the INVITE.
Everything else seems to be fine.

Does anyone has any idea why this could be happening?
Also, to confirm I have prepared 3 CentOS 6.4 x86_64 VMs, but in one of
them the problem doesn't happen but I don't know why this is so as i
compared the packages installed (yum list installed) and they are all the
same, including version numbers.

(Also I have tried upgrading to latest branch 1.6 r. 10024, and the problem
persists).

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] For what do you use tm MI function t_reply?

2012-04-29 Thread mayamatakeshi
 Hello,
I have found the explanation while reading old posts.

On Mon, Apr 30, 2012 at 12:13 AM, mayamatakeshi wrote:

> Hello,
> out of curiosity, for what scenario the tm MI function t_reply was
> envisioned for?
>

It can be used to have some control of calls by an external entity (not
sure of what people are doing with this right now, but I am sure there are
good applications for it).


> And how would I get the trans_id necessary to use it?
>

On the cfg file, by using functions
  t_write_req(info,fifo)
and
  t_write_unix(info,sock)

Here's a dump of what these would write:

0.3
sip_request.calling_useragent
INVITE
user2
192.168.0.129
127.0.0.1
.
sip:user2@192.168.0.129:5061
sip:mod_sofia@127.0.0.1:5070
"displayname.user1" 

574adad2-0cc2-1230-e9b9-000c29db16eb
vjaSNUXZB52DN

27523925
46961:1279687637
.
.
P-MsgFlags: 1
the_fu: sip:us...@test1.com
.
v=0
o=FreeSWITCH 1335707806 1335707807 IN IP4 192.168.2.9
s=FreeSWITCH
c=IN IP4 192.168.2.9
t=0 0
m=audio 12172 RTP/AVP 0 8 3 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20

>From the looks, the trans_id is the 16th line "46961:1279687637".

Regards,
Takeshi.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] For what do you use tm MI function t_reply?

2012-04-29 Thread mayamatakeshi
Hello,
out of curiosity, for what scenario the tm MI function t_reply was
envisioned for?
And how would I get the trans_id necessary to use it?

Regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] creating a regular expression

2011-10-10 Thread mayamatakeshi
On Mon, Oct 10, 2011 at 9:40 PM, mayamatakeshi wrote:

>
> On Mon, Oct 10, 2011 at 9:20 PM, Toyima Dias  wrote:
>
>> sorry, the range is 31297 - 31336...
>>
>> 2011/10/10 Toyima Dias 
>>
>>> Hello,
>>>
>>> i would like some help on a regular expression using dialplan module and
>>> regular expressions...this is what i want:
>>>
>>> construct a regular expression for the following range: 31297-313336...i
>>> heve this simple string ^31[2-3]the problem is the range from 97 to
>>> 36...any help please?
>>>
>>
> I don't know if there is a simpler way.
> Here' it what i would use:
>
> ^(3129[789]|313([0-2][0-9]|3[0-6]))$
>
> Test with this:
>
> #!/usr/bin/python
> import re
> r = re.compile("^(3129[789]|313([0-2][0-9]|3[0-6]))$")
> count = 0
> for i in range(10):
> if r.match(str(i)):
> count = count + 1
> print "Expected: " + str(31336 - 31296)
> print "Result:   " + str(count)
>

And be aware that there are some variations in regex syntax between tools.
So this might not work the same with opensips. You need to test it.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] creating a regular expression

2011-10-10 Thread mayamatakeshi
On Mon, Oct 10, 2011 at 9:20 PM, Toyima Dias  wrote:

> sorry, the range is 31297 - 31336...
>
> 2011/10/10 Toyima Dias 
>
>> Hello,
>>
>> i would like some help on a regular expression using dialplan module and
>> regular expressions...this is what i want:
>>
>> construct a regular expression for the following range: 31297-313336...i
>> heve this simple string ^31[2-3]the problem is the range from 97 to
>> 36...any help please?
>>
>
I don't know if there is a simpler way.
Here' it what i would use:

^(3129[789]|313([0-2][0-9]|3[0-6]))$

Test with this:

#!/usr/bin/python
import re
r = re.compile("^(3129[789]|313([0-2][0-9]|3[0-6]))$")
count = 0
for i in range(10):
if r.match(str(i)):
count = count + 1
print "Expected: " + str(31336 - 31296)
print "Result:   " + str(count)

regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Parse errore in config file

2011-07-25 Thread mayamatakeshi
On Tue, Jul 26, 2011 at 2:55 AM, tom wish  wrote:

> I am trying to start opensips and am getting parse errors for bad
> syntax.  I have followed everything I could find online and it looks
> correct.
>
> Could someone take a look and help me figure this out.
>
> failure_route[1] {
>if (t_was_cancelled()) {
>exit;
>}
>
> }
>
> failure_route[12] {
>  if (t_was_cancelled()) {
>  exit;
>  }
>
>  if (t_check_status("408|5[0-9][0-9]")) {
> {
>  if (do_routing()) {
>   t_on_failure("13");
>   append_branch();
>   route(1);
>  };
>  exit;
>  } else if (t_check_status("3[0-9][0-9]")) {
>  t_reply("404","Not found");
>  exit;
>  }
> }
>
> failure_route[13] {
>  xlog("L_INFO", "entering failure_route[13] for reply code
> '$T_reply_code'\n");
>  if (t_was_cancelled()) {
>  exit;
>  }
> }
>
>
You have one extra curly bracket :

  if (t_check_status("408|5[0-9][0-9]")) {
>>{

regards,
Takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] parameter not found in module

2011-04-12 Thread mayamatakeshi
On Tue, Apr 12, 2011 at 4:57 PM, Toyima Dias  wrote:

> Hello,
>
> I'm receiving the following errors on my opensips.log:
>
>  *ERROR:core:set_mod_param_regex: parameter  not found in module
> 
> *
> This is what i've added to my opensips.cfg:
>
>
> loadmodule "mi_xmlrpc.so"
> loadmodule "siptrace.so"
>
> # - setting module-specific parameters ---
>  MODPARAMS FRO SIP TRACE
> modparam("mi_xmlrpc","port", "8000")
>


Have you tried:
modparam("mi_xmlrpc","port", 8000)



> modparam("siptrace", "db_url",
> "mysql://opensips:opensipsrw@localhost/opensips")
> modparam("siptrace", "trace_flag", 22)
> modparam("siptrace", "traced_user_avp", "$avp(s:traceuser)")
>
> What could be wrong? i'm using *Server:: OpenSIPS (1.6.4-2-notls
> (i386/linux))*
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] BYE processing and AVP

2010-11-30 Thread mayamatakeshi
On Tue, Nov 30, 2010 at 11:19 PM, mayamatakeshi wrote:

>
> 2010/11/30 Anton Zagorskiy 
>
> Why BYE isn't a part of the transaction?
>>
>
> From RFC3261:
>
> Specifically, a SIP transaction consists of a single request and any 
> responses to
>that request, which include zero or more provisional responses and
>one or more final responses.
>
> But when opensips docs say transaction, it is also implying that you are
> using module tm (if you don't use tm functions, then you are doing stateless
> processing and no AVP will be saved).
>

For completeness,
the BYE is part of the dialog established by the INVITE transaction that
ended when "200 OK" was received. But the BYE itself starts another
transaction.
So, the AVPs you set in the processing of the INVITE will be available (as
long as you use module tm) when your process responses for that INVITE (180,
183, 200 etc), but not when you are handling other requests in the dialog.


>
>
>> 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
>>
>>
>> From: users-boun...@lists.opensips.org
>> [mailto:users-boun...@lists.opensips.org] On Behalf Of mayamatakeshi
>> Sent: Tuesday, November 30, 2010 4:13 PM
>> To: OpenSIPS users mailling list
>> Subject: Re: [OpenSIPS-Users] BYE processing and AVP
>>
>>
>> On Tue, Nov 30, 2010 at 10:07 PM, Anton Zagorskiy
>>  wrote:
>> Hello.
>>
>> During INVITE processing I'm setting up some avp variables. When I'm
>> receiving a BYE request all avps are null. Why does this happen?
>> A part of the script:
>>
>> if (has_totag())
>> {
>>if (loose_route())
>>{
>>if (is_method("BYE"))
>>{
>>xlog("*** BYE $avp(i:2)");
>>
>> From the docs (http://www.opensips.org/Resources/DocsCoreVar#toc2):
>>
>> "AVPs are part of the transaction context, so they will be visible
>> everywhere where the transaction is present. "
>>
>> br,
>> takeshi
>>
>>
>>
>> ___
>> 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] BYE processing and AVP

2010-11-30 Thread mayamatakeshi
2010/11/30 Anton Zagorskiy 

> Why BYE isn't a part of the transaction?
>

>From RFC3261:

Specifically, a SIP transaction consists of a single request and any
responses to
   that request, which include zero or more provisional responses and
   one or more final responses.

But when opensips docs say transaction, it is also implying that you are
using module tm (if you don't use tm functions, then you are doing stateless
processing and no AVP will be saved).


> 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
>
>
> From: users-boun...@lists.opensips.org
> [mailto:users-boun...@lists.opensips.org] On Behalf Of mayamatakeshi
> Sent: Tuesday, November 30, 2010 4:13 PM
> To: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] BYE processing and AVP
>
>
> On Tue, Nov 30, 2010 at 10:07 PM, Anton Zagorskiy
>  wrote:
> Hello.
>
> During INVITE processing I'm setting up some avp variables. When I'm
> receiving a BYE request all avps are null. Why does this happen?
> A part of the script:
>
> if (has_totag())
> {
>if (loose_route())
>{
>if (is_method("BYE"))
>{
>xlog("*** BYE $avp(i:2)");
>
> From the docs (http://www.opensips.org/Resources/DocsCoreVar#toc2):
>
> "AVPs are part of the transaction context, so they will be visible
> everywhere where the transaction is present. "
>
> br,
> takeshi
>
>
>
> ___
> 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] BYE processing and AVP

2010-11-30 Thread mayamatakeshi
On Tue, Nov 30, 2010 at 10:07 PM, Anton Zagorskiy <
a.zagors...@oyster-telecom.ru> wrote:

> Hello.
>
> During INVITE processing I'm setting up some avp variables. When I'm
> receiving a BYE request all avps are null. Why does this happen?
> A part of the script:
>
> if (has_totag())
> {
>if (loose_route())
>{
>if (is_method("BYE"))
>{
>xlog("*** BYE $avp(i:2)");
>

>From the docs (http://www.opensips.org/Resources/DocsCoreVar#toc2):

"AVPs are part of the transaction context, so they will be visible
everywhere where the transaction is present. "

br,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Forcing minimum value for SUBSCRIBE Expires

2010-11-29 Thread mayamatakeshi
I can see there is a parameter max_expires_subscribe for module presence,
but there is no min_expires_subscribe.
Is it possible to force a minimum value for SUBSCRIBE expires?

br,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How opensis can manage different ports.

2010-09-17 Thread mayamatakeshi
On Sat, Sep 18, 2010 at 11:49 AM, mayamatakeshi wrote:

>
> On Sat, Sep 18, 2010 at 7:57 AM, Stefano Pisani <
> stefano.pis...@omnianet.it> wrote:
>
>>  No I don't.
>> I want that opensis uses same port of registration for INVITE.
>> i.e. the client is register on port 5061, opensips uses from port 5061
>> for INVITE
>>
>
> If you are dealing with more than 2 ports, this might get complicated.
> But in case of just 2 ports, you could check the ReceivedPort and set a
> bflag during handling of the REGISTER request:
>
> if($Rp == 5060) {
>   setbflag(BFLAG_RECEIVED_ON_PORT_5060);
> }
>
> The bflags are saved with the registration, so you can check them in a
> branch_route called after lookup and force the port to be used to relay the
> request:
>
> if (lookup("location")) {
>   t_on_branch("USER_BRANCH");
>   if (!t_relay()) {
> sl_reply_error();
> exit;
>   }
> }
>
> branch_route [USER_BRANCH] {
>   if (isbflagset(BFLAG_RECEIVED_ON_PORT_5060)) {
> force_send_socket(MY_IP_ADDRESS:5060);
>} else {
> force_send_socket(MY_IP_ADDRESS:5061);
>   }
> }
>
> (obs: I actually, never tested this. I'm writing from my recollections of
> similar problems I had to deal with).
>
>
I looked at the docs. I'm not sure but maybe, the socket where the message
was received will be available in the branch_route as $(branch(socket)):

http://www.opensips.org/Resources/DocsCoreVar16#toc16

At least I can see this info being stored in the location table and I expect
the branch processing to load it as it does with the bflags.
So maybe you can use just $(branch(socket)) in the call to
force_send_socket:

force_send_socket($(branch(socket)));

(I don't know if it is necessary to remove the "sip:" prefix from the socket
info).
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How opensis can manage different ports.

2010-09-17 Thread mayamatakeshi
On Sat, Sep 18, 2010 at 7:57 AM, Stefano Pisani
wrote:

>  No I don't.
> I want that opensis uses same port of registration for INVITE.
> i.e. the client is register on port 5061, opensips uses from port 5061
> for INVITE
>

If you are dealing with more than 2 ports, this might get complicated.
But in case of just 2 ports, you could check the ReceivedPort and set a
bflag during handling of the REGISTER request:

if($Rp == 5060) {
  setbflag(BFLAG_RECEIVED_ON_PORT_5060);
}

The bflags are saved with the registration, so you can check them in a
branch_route called after lookup and force the port to be used to relay the
request:

if (lookup("location")) {
  t_on_branch("USER_BRANCH");
  if (!t_relay()) {
sl_reply_error();
exit;
  }
}

branch_route [USER_BRANCH] {
  if (isbflagset(BFLAG_RECEIVED_ON_PORT_5060)) {
force_send_socket(MY_IP_ADDRESS:5060);
   } else {
force_send_socket(MY_IP_ADDRESS:5061);
  }
}

(obs: I actually, never tested this. I'm writing from my recollections of
similar problems I had to deal with).
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Multiple contact entries

2010-08-04 Thread mayamatakeshi
On Thu, Aug 5, 2010 at 2:25 AM, David Cunningham
wrote:

> Hello,
>
> We have a system using the usrloc module (with dbmode=3) and for some
> reason a few phones have multiple entries in the locations table, all
> with exactly the same 'contact' address.
> This is causing multiple INVITEs to be sent to the phone, which it doesn't
> like.
>
> Does anyone have an idea how to fix or work around this?
>
> Someone advised it may be possible to tell usrloc to only use the most
> recent contact entry for that phone, can anyone advise how it can be
> done?
>

You can try this:
http://www.mail-archive.com/users@lists.opensips.org/msg09495.html
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Memcache and calculate_ha1 disabled

2010-08-02 Thread mayamatakeshi
On Mon, Aug 2, 2010 at 12:48 AM, Bogdan-Andrei Iancu  wrote:

> Hi Takeshi,
>
> The tutorial was written for the case where you provide the plain-text
> password and the auth engine calculates the ha1.
>
> If you want to disable the HA1 calculation, in that case you need to
> cache it and to provide it to auth engine via the password AVP (for pv
> authentication).
>
> Actually, aside of changing the "calculate_ha1" param , you should not
> change anything else - if your changes are consistent (like adding in
> "password" column in DB the HA1 value), the caching mechanism will work
> unchanged - it will load, cache and provide the HA1 instead of passwd.
>

But Bogdan, it might not happen that www/proxy_authorize would need to use
the password from column ha1b instead (username in credentials containing
"@domain")?

So If that happens, next time when I get the password from cache, it will
not work.
Am I missing something?

br,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] authentication error

2010-07-31 Thread mayamatakeshi
On Sun, Aug 1, 2010 at 7:16 PM, Meftah Tayeb  wrote:

> hi
> i used and enabled opensips mysql module and authentication
> i added user 1000 with pass 1234
> user is connecting corectly
> but evean if i do any username is connecting
> why?
>

Opensips will not perform authentication unless you say it to do so. But in
your cfg file, all auth code (calls to www_authorize, proxy_authorize,
www_challenge, proxy_challenge) are disable.

br,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Memcache and calculate_ha1 disabled

2010-07-29 Thread mayamatakeshi
Hello,
I'm reading about using memcache (
http://www.opensips.org/Resources/DocsTutMemcache) to cache passowords.
However, what if i need to disable calculate_ha1? When
www_authorize/proxy_authorize completes, how could I know which password AVP
was used (ha1 or ha1b)?
I think I can concatenate the 2 passwords and cache it. Then when I need to
authenticate again I could read from cache, split the passwords and try
both. But is there a simpler way?

br,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Limitations of b2b_entities?

2010-07-20 Thread mayamatakeshi
Hi Anca,

On Mon, Jul 19, 2010 at 11:58 PM, Anca Vamanu  wrote:

>  Hi Takeshi,
>
> This was something easy to do so I added the support for this - I extended
> the client_info structure with 3 more fields: to_dname, from_dname ( here
> you should put the display name) and req_uri for Request URI. The to_uri and
> from_uri fields must really contain a URI.
> Check it out.
>

It is OK now. Thanks.

While testing, I have found another thing: if I call server_new and a CANCEL
is received before I call send_reply(200 OK), this event is not notified to
the b2b_notify_t callback function.


> It would be nice if you would also make your perl/lua code controlling
> b2b_entities module public.
>

Sure (if i ever managed to get this done: I'm not a seasoned c/perl/lua
programmer and opensips source code keeps mystifying me).

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Limitations of b2b_entities?

2010-07-18 Thread mayamatakeshi
Hello,
I'm playing with the module b2b_entities. I was thinking in writing some
perl/lua code to control UA entities provided by this module.
However, I am seeing some shortcomings/bugs in it:

1) If I pass
 "\"user1\">" as from_uri to
function client_new, it will be rendered as this in the request:
  From: <"user1"
>>;tag=a34656f511fe5edd5d76196c64f246a7-aba5

(obs: to_uri is free from this problem:
  to_uri = "\"user2\">"
-> To: "user2">)

2) function client_new doesn't permit to specify the Request-URI. There are
situations where Request-URI will have to be set differently from To-Uri (I
know at least the case where some PSTN-GWs recognises RURI-Username !=
To-URI-Username as redirection indication).

I just thought to highlight those points, so that they could be improved in
the future.

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] URI PARSING

2010-07-11 Thread mayamatakeshi
On Fri, Jul 9, 2010 at 8:10 PM, Premalatha Kuppan
wrote:

> Please tell me how to search for special character in a string.
>
> {s.select,0,_} this would return the value; instead if i want to search
> whether special characters exist or not, which transformation should i use.


Use module regex instead:
http://www.opensips.org/html/docs/modules/1.6.x/regex.html#id228196
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registration expiration doesn't decrease usrloc:registered_users

2010-07-09 Thread mayamatakeshi
Thanks, Bogdan,
I tested and it looks fine now.
I will do load tests and report any problems.

regards,
takeshi

On Fri, Jul 9, 2010 at 5:17 PM, Bogdan-Andrei Iancu
wrote:

> FIXED, please update from SVN.
>
> Regards,
> Bogdan
>
> Bogdan-Andrei Iancu wrote:
> > Hi,
> >
> > indeed, I was able to reproduce the error - I will work for a fix.
> >
> > Thanks for reporting,
> > Bogdan
> >
> > mayamatakeshi wrote:
> >
> >> On Wed, Jul 7, 2010 at 2:29 AM, Bogdan-Andrei Iancu
> >> mailto:bog...@voice-system.ro>> wrote:
> >>
> >> Hi,
> >>
> >> what db_mode are you using for usrloc?
> >>
> >>
> >> Hi Bogdan,
> >>
> >> modparam("usrloc", "db_mode",   0)
> >>
> >>
> >>
> >> mayamatakeshi wrote:
> >> > Hello,
> >> > I'm testing with opensips 1.6, latest revision 6985.
> >> >
> >> > I'm not sure if I'm doing something wrong but I'm not seeing the
> >> value
> >> > of usrloc:registered_users to decrease when the registration
> >> expires.
> >> > To test this, I have set a low value for expires. Here are the
> >> > parameters I have changed in the sample opensips.cfg:
> >> >
> >> > modparam("registrar", "max_expires", 30)
> >> > modparam("registrar", "min_expires", 30)
> >> > modparam("registrar", "default_expires", 30)
> >> > modparam("alias_db|auth_db|usrloc|uri", "use_domain", 1)
> >> >
> >> > Then using SIPp I generated a single REGISTER, got the "200 OK"
> and
> >> > waited 30 seconds. After that, I got this:
> >> >
> >> > [r...@centos53-02008]# opensipsctl fifo get_statistics usrloc:
> >> > usrloc:registered_users = 1
> >> > usrloc:location-users = 1
> >> > usrloc:location-contacts = 0
> >> > usrloc:location-expires = 1
> >> >
> >> > But I was expecting registered_users to be zero, as it happens
> >> when I
> >> > unregister:
> >> >
> >> > After registration:
> >> > [r...@centos53-02008 Basix]# opensipsctl fifo get_statistics
> usrloc:
> >> > usrloc:registered_users = 1
> >> > usrloc:location-users = 1
> >> > usrloc:location-contacts = 1
> >> > usrloc:location-expires = 0
> >> >
> >> > After unregistration (request with Expires=0):
> >> > [r...@centos53-02008 Basix]# opensipsctl fifo get_statistics
> usrloc:
> >> > usrloc:registered_users = 0
> >> > usrloc:location-users = 0
> >> > usrloc:location-contacts = 0
> >> > usrloc:location-expires = 0
> >> >
> >> > regards,
> >> > takeshi
> >> >
> >>
> 
> >> >
> >> > ___
> >> > Users mailing list
> >> > Users@lists.opensips.org <mailto: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 <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
> >>
> >>
> >> 
> >>
> >> ___
> >> 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] URI PARSING

2010-07-07 Thread mayamatakeshi
On Wed, Jul 7, 2010 at 8:01 PM, Premalatha Kuppan
wrote:

> Thanks. Corrected teh opensips.cfg file
>
> But the problem was due to this. by default DB URL was NULL. Now i have
> added the DB URL for avpops.
>
> # default URL
> modparam("avpops","db_url","mysql://user:pas...@host/database")
>
> But the value of $rU is NULL..am i placing it in wrong location?
>  I want the userpart e.g: sip:userp...@domain is the request uri; i need
> only userpart . I believe that would be stored in $rU; but tis coming as
> NULL. Which variable or where should i place this command for registration
> and de-registration.
>
> Any Idea ?
>

I think you should be able to use $rU directly like this:
$(rU{s.select,0,_})

However, are you sure there is a username in the request URI?
I know at least two sip phone models (SAXA/03.T1.10.9 and CounterPath
eyebeam), that don't send a username in the REGISTER Request URI:

REGISTER sip:test.com SIP/2.0
Via: SIP/2.0/UDP 192.168.11.214:5060;branch=z9hG4bK23ff25886a332c4f
To: "1694">
From: "1694">;tag=6fe26be279236cd3
Call-ID: 40025caa51f66e0d06d5f8595f531...@192.168.11.214
CSeq: 1 REGISTER
Max-Forwards: 70
Expires: 0
Contact: *
User-Agent: SAXA/03.T1.10.9
Content-Length: 0
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] URI PARSING

2010-07-07 Thread mayamatakeshi
On Wed, Jul 7, 2010 at 7:32 PM, Premalatha Kuppan
wrote:

> Hi,
>
> Iam using avp_db_query, but opensips is dead with following error,
>
> During Registration, when the user is registered. I have to parse and store
> th value in DB. So, included the avp_db_query in this loop. Is this right
> one to do. I assume the value of rU is NULL over here, probably its failing.
> Not sure :(
>
> Any insight  ?
>
> if (is_method("REGISTER"))
> {
> # authenticate the REGISTER requests (uncomment to enable
> auth)
> if (!www_authorize("10.140.1.110", "subscriber"))
> {
> www_challenge("10.140.1.110", "0");
> exit;
> }
>
>  #  if (!db_check_to())
>  #  {
>  #  sl_send_reply("403","Forbidden auth ID");
>  #  exit;
>  #  }
>
> if (!save("location"))
> sl_reply_error();
>
> $var(x) = $rU ;
> avp_db_query("INSERT INTO TESTTABLE (xxx,yyy,zzz)
> VALUES('$(var(x){s.select,0,_})','$var(x)({s.select,1,_})','$(var(x){s.select,2,_})'");
> exit;
> }
>
>
> Jul  7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]:
> ERROR:avpops:fixup_db_query_avp: no db url defined to be used by this
> function
> Jul  7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]: 
> *ERROR:core:fix_actions:
> fixing failed (code=-6) at cfg line 351*
> Jul  7 06:25:16 204548-4 /usr/local/sbin/opensips[17791]: ERROR:core:main:
> failed to fix configuration with err code -6
>

Clearly you misplaced the parenthesis:

$(var(x){s.select,0,_})',
'$var(x)({s.select,1,_})',
'$(var(x){s.select,2,_})'
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registration expiration doesn't decrease usrloc:registered_users

2010-07-07 Thread mayamatakeshi
On Wed, Jul 7, 2010 at 2:29 AM, Bogdan-Andrei Iancu
wrote:

> Hi,
>
> what db_mode are you using for usrloc?
>

Hi Bogdan,

modparam("usrloc", "db_mode",   0)


>
> mayamatakeshi wrote:
> > Hello,
> > I'm testing with opensips 1.6, latest revision 6985.
> >
> > I'm not sure if I'm doing something wrong but I'm not seeing the value
> > of usrloc:registered_users to decrease when the registration expires.
> > To test this, I have set a low value for expires. Here are the
> > parameters I have changed in the sample opensips.cfg:
> >
> > modparam("registrar", "max_expires", 30)
> > modparam("registrar", "min_expires", 30)
> > modparam("registrar", "default_expires", 30)
> > modparam("alias_db|auth_db|usrloc|uri", "use_domain", 1)
> >
> > Then using SIPp I generated a single REGISTER, got the "200 OK" and
> > waited 30 seconds. After that, I got this:
> >
> > [r...@centos53-02008]# opensipsctl fifo get_statistics usrloc:
> > usrloc:registered_users = 1
> > usrloc:location-users = 1
> > usrloc:location-contacts = 0
> > usrloc:location-expires = 1
> >
> > But I was expecting registered_users to be zero, as it happens when I
> > unregister:
> >
> > After registration:
> > [r...@centos53-02008 Basix]# opensipsctl fifo get_statistics usrloc:
> > usrloc:registered_users = 1
> > usrloc:location-users = 1
> > usrloc:location-contacts = 1
> > usrloc:location-expires = 0
> >
> > After unregistration (request with Expires=0):
> > [r...@centos53-02008 Basix]# opensipsctl fifo get_statistics usrloc:
> > usrloc:registered_users = 0
> > usrloc:location-users = 0
> > usrloc:location-contacts = 0
> > usrloc:location-expires = 0
> >
> > regards,
> > takeshi
> > 
> >
> > ___
> > 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] URI PARSING

2010-07-06 Thread mayamatakeshi
On Tue, Jul 6, 2010 at 7:43 PM, Premalatha Kuppan
wrote:

> I have followed this link and used
>
> exec_msg("./test.sh '$$SIP_OUSER'");
>
> Opensips is running, but i doubt whether it is the correct way to use it.
> From log file, i can see DBG:exec:w_exec_msg: executing [./test.sh
> '$SIP_OUSER']
>
> But, script action is not done.
>
> My intention is to execute test.sh script and send Username has input to
> test.sh.
>
> How to use it using exec commands ?
>

I have never used module exec myself. I know about it because I read the
opensips docs a lot.

Try the sample commands. It they work, yours should too.

Then experiment passing the full path to the script instead of a relative
path.

Keep trying, you will get there.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] URI PARSING

2010-07-05 Thread mayamatakeshi
On Tue, Jul 6, 2010 at 3:29 PM, Premalatha Kuppan
wrote:

> Thanks.
>
> Can i call shell script from opensips.cfg ?
>
> Iam getting error, "parse error in config file,"
>
> Any idea ?
>

http://www.opensips.org/html/docs/modules/1.6.x/exec.html#id226438
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] URI PARSING

2010-07-02 Thread mayamatakeshi
On Fri, Jul 2, 2010 at 6:44 PM, Premalatha Kuppan
wrote:

> Hi,
>
> Can anyone tell me how to parse SIP URL in Opensips.
>
> Iam getting request as 
> Sip:aa_bb_...@opensips.org.
> I need to parse "aa_bb_ccc" as aa,bb,cc and store it in DB.
>
> Anyidea or suggestions ?
>
>
Maybe you can use this transformation on the $rU:
http://www.opensips.org/Resources/DocsCoreTran16#toc6

But you will need to call it 3 times, once for each token.

If the number of token varies, then I think you could ask module perl to
split it to you.

br,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Registration expiration doesn't decrease usrloc:registered_users

2010-06-26 Thread mayamatakeshi
Hello,
I'm testing with opensips 1.6, latest revision 6985.

I'm not sure if I'm doing something wrong but I'm not seeing the value of
usrloc:registered_users to decrease when the registration expires.
To test this, I have set a low value for expires. Here are the parameters I
have changed in the sample opensips.cfg:

modparam("registrar", "max_expires", 30)
modparam("registrar", "min_expires", 30)
modparam("registrar", "default_expires", 30)
modparam("alias_db|auth_db|usrloc|uri", "use_domain", 1)

Then using SIPp I generated a single REGISTER, got the "200 OK" and waited
30 seconds. After that, I got this:

[r...@centos53-02008]# opensipsctl fifo get_statistics usrloc:
usrloc:registered_users = 1
usrloc:location-users = 1
usrloc:location-contacts = 0
usrloc:location-expires = 1

But I was expecting registered_users to be zero, as it happens when I
unregister:

After registration:
[r...@centos53-02008 Basix]# opensipsctl fifo get_statistics usrloc:
usrloc:registered_users = 1
usrloc:location-users = 1
usrloc:location-contacts = 1
usrloc:location-expires = 0

After unregistration (request with Expires=0):
[r...@centos53-02008 Basix]# opensipsctl fifo get_statistics usrloc:
usrloc:registered_users = 0
usrloc:location-users = 0
usrloc:location-contacts = 0
usrloc:location-expires = 0

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Segfault during load test

2010-04-13 Thread mayamatakeshi
Hi Bogdan,

On Mon, Apr 12, 2010 at 10:27 PM, Bogdan-Andrei Iancu <
bog...@voice-system.ro> wrote:

> Hi Takeshi,
>
> Do you still have the core file ?  If yes, could you print  "dest" and
> "*dest" ?
>


(gdb) print dest
$1 = (void **) 0x0


>
> Do you get any previous errors (from the same process) ? like mem errors?
>

Now that you mentioned, I went to the log file and saw lots of this:

Apr  3 05:25:19 centos53_02005 /usr/local/sbin/opensips[29732]:
ERROR:tm:relay_reply: no more share memory
Apr  3 05:25:19 centos53_02005 /usr/local/sbin/opensips[29732]:
ERROR:tm:_reply_light: failed to allocate shmem buffer

(sorry, I should have looked into this as first thing)


>
> Also, can you reproduce this ?
>

I was load testing r.  6605 with 800 Registrations per second (32000 users)
and didn't saw this ever happen before (I ran this same load session several
times: one of them reached 1 billion registration requests). And actually,
in previous tests I was using opensips with just 256 MB of shared memory and
not with "-m 1024" as above.
With r. 6758 so far nothing wrong happened.
I will update to 1.6 head and will report if problem happens again, but
maybe in the above case, my SIPp instance went crazy in the other end and
generated too much traffic.

Thanks and regards,
takeshi


> mayamatakeshi wrote:
> > Hello,
> > I was load testing opensips-1.6 r. 6605
> > and I got a seg fault.
> > I will try updating to most recent revision of 1.6, but I thought
> > someone would like to take a look at this.
> >
> > regards,
> > takeshi
> >
> >
> > Core was generated by `/usr/local/sbin/opensips -m 1024'.
> > Program terminated with signal 11, Segmentation fault.
> > [New process 29728]
> > #0  slot_add (_s=0x2b361ce6ac10, _r=0x2b363326ca20) at hslot.c:151
> > 151 *dest = _r;
> > (gdb) bt
> > #0  slot_add (_s=0x2b361ce6ac10, _r=0x2b363326ca20) at hslot.c:151
> > #1  0x2b3619b9ac65 in mem_insert_urecord (_d=0x2b361ce69560,
> > _aor=, _r=0x7fff919cb740)
> > at udomain.c:648
> > #2  0x2b3619b9ad42 in insert_urecord (_d=0x2b361ce69560,
> > _aor=0x7fff919cb958, _r=0x7fff919cb740) at udomain.c:781
> > #3  0x2b3619fb5769 in insert_contacts (_m=0x79b600, _c=0x79c468,
> > _d=0x2b361ce69560, _a=0x7fff919cb958,
> > _sctx=0x7fff919cb950) at save.c:398
> > #4  0x2b3619fb6592 in save (_m=0x79b600, _d=0x2b361ce69560 "",
> > _f=, _s=0x0) at save.c:680
> > #5  0x0040e9e9 in do_action (a=0x78def8, msg=0x79b600) at
> > action.c:967
> > #6  0x004114bc in run_action_list (a=,
> > msg=0x79b600) at action.c:139
> > #7  0x00466b24 in eval_expr (e=0x78dfd0, msg=0x79b600,
> > val=0x0) at route.c:1240
> > #8  0x0046659d in eval_expr (e=0x78e020, msg=0x79b600,
> > val=0x0) at route.c:1553
> > #9  0x00466545 in eval_expr (e=0x78e070, msg=0x79b600,
> > val=0x0) at route.c:1558
> > #10 0x0040d9cd in do_action (a=0x78e2c8, msg=0x79b600) at
> > action.c:689
> > #11 0x004114bc in run_action_list (a=,
> > msg=0x79b600) at action.c:139
> > #12 0x0040fcc3 in do_action (a=0x78e888, msg=0x79b600) at
> > action.c:706
> > #13 0x004114bc in run_action_list (a=,
> > msg=0x79b600) at action.c:139
> > #14 0x00411819 in run_top_route (a=0x78ad18, msg=0x79b600) at
> > action.c:119
> > #15 0x00455ff5 in receive_msg (
> > buf=0x754f20 "REGISTER sip:domain13564.com
> > <http://domain13564.com> SIP/2.0\r\nVia: SIP/2.0/UDP
> > 192.168.2.6:;rport;branch=z9hG4bK-4540-1443964-5\r\nFrom:
> > \"13564\" 
> > <mailto:sip%3a13...@domain13564.com 
> >>;tag=4540SIPpTag001443964\r\nTo:
> > \"13564\"  > rcv_info=0x7fff919ccc10) at receive.c:162
> > #16 0x0049a304 in udp_rcv_loop () at udp_server.c:492
> > #17 0x00429bbd in main (argc=3, argv=) at
> > main.c:818
> > (gdb)
> >
> > 
> >
> > ___
> > 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Segfault during load test

2010-04-02 Thread mayamatakeshi
Hello,
I was load testing opensips-1.6 r. 6605
and I got a seg fault.
I will try updating to most recent revision of 1.6, but I thought someone
would like to take a look at this.

regards,
takeshi


Core was generated by `/usr/local/sbin/opensips -m 1024'.
Program terminated with signal 11, Segmentation fault.
[New process 29728]
#0  slot_add (_s=0x2b361ce6ac10, _r=0x2b363326ca20) at hslot.c:151
151 *dest = _r;
(gdb) bt
#0  slot_add (_s=0x2b361ce6ac10, _r=0x2b363326ca20) at hslot.c:151
#1  0x2b3619b9ac65 in mem_insert_urecord (_d=0x2b361ce69560, _aor=, _r=0x7fff919cb740)
at udomain.c:648
#2  0x2b3619b9ad42 in insert_urecord (_d=0x2b361ce69560,
_aor=0x7fff919cb958, _r=0x7fff919cb740) at udomain.c:781
#3  0x2b3619fb5769 in insert_contacts (_m=0x79b600, _c=0x79c468,
_d=0x2b361ce69560, _a=0x7fff919cb958,
_sctx=0x7fff919cb950) at save.c:398
#4  0x2b3619fb6592 in save (_m=0x79b600, _d=0x2b361ce69560 "", _f=, _s=0x0) at save.c:680
#5  0x0040e9e9 in do_action (a=0x78def8, msg=0x79b600) at
action.c:967
#6  0x004114bc in run_action_list (a=,
msg=0x79b600) at action.c:139
#7  0x00466b24 in eval_expr (e=0x78dfd0, msg=0x79b600, val=0x0) at
route.c:1240
#8  0x0046659d in eval_expr (e=0x78e020, msg=0x79b600, val=0x0) at
route.c:1553
#9  0x00466545 in eval_expr (e=0x78e070, msg=0x79b600, val=0x0) at
route.c:1558
#10 0x0040d9cd in do_action (a=0x78e2c8, msg=0x79b600) at
action.c:689
#11 0x004114bc in run_action_list (a=,
msg=0x79b600) at action.c:139
#12 0x0040fcc3 in do_action (a=0x78e888, msg=0x79b600) at
action.c:706
#13 0x004114bc in run_action_list (a=,
msg=0x79b600) at action.c:139
#14 0x00411819 in run_top_route (a=0x78ad18, msg=0x79b600) at
action.c:119
#15 0x00455ff5 in receive_msg (
buf=0x754f20 "REGISTER sip:domain13564.com SIP/2.0\r\nVia: SIP/2.0/UDP
192.168.2.6:;rport;branch=z9hG4bK-4540-1443964-5\r\nFrom: \"13564\" <
sip:13...@domain13564.com
>;tag=4540SIPpTag001443964\r\nTo:
\"13564\" ) at
main.c:818
(gdb)
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Using is_from_gw with incoming-only GWs

2010-04-01 Thread mayamatakeshi
On Thu, Apr 1, 2010 at 4:28 PM, mayamatakeshi wrote:

> While testing with drouting function is_from_gw(), it seems that in
> addition to be present in the dr_gateways table, there must also exist at
> least one entry in dr_rules referencing the GW otherwise the function
> returns false. Is this intentional?
> In my case, I have incoming-only GWs so there are no rules for them. For
> now for each of them I add a rule that never matches just to permit to use
> is_from_gw, but I'm might be overlooking something.
>

Sorry,
please ignore.
Doing some more tests i realized for is_from_gw to work, dr_rules cannot be
empty (I was testing with the minimal changes in the db so I have not added
the records for the other GWs).

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Using is_from_gw with incoming-only GWs

2010-04-01 Thread mayamatakeshi
While testing with drouting function is_from_gw(), it seems that in addition
to be present in the dr_gateways table, there must also exist at least one
entry in dr_rules referencing the GW otherwise the function returns false.
Is this intentional?
In my case, I have incoming-only GWs so there are no rules for them. For now
for each of them I add a rule that never matches just to permit to use
is_from_gw, but I'm might be overlooking something.

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Contact list in REGISTER response

2010-02-24 Thread mayamatakeshi
On Wed, Feb 24, 2010 at 8:03 PM, Bogdan-Andrei Iancu  wrote:

> Be careful about the expires value - the usrloc module will choose an
> expire value based on the received expire and the max_expire (module
> param). You need to send back to the UAC exactly the same expire as the
> own determined by usrloc, otherwise the server and client will be out of
> sync from expiration point of view. Like the uac will think it is still
> registered, will the proxy will expire the UAC's contact.
>

Ah. Got it.
Thanks, Bogdan.

regards,
takeshi



> mayamatakeshi wrote:
> >
> >
> > On Tue, Feb 16, 2010 at 6:45 PM, Bogdan-Andrei Iancu
> > mailto:bog...@voice-system.ro>> wrote:
> >
> > Hi,
> >
> > Yes, that is the only way - if REGISTRAR module builds the reply, it
> > will do it in RFC way (adding all the registered contacts) and you
> > cannot change this behaviour.
> >
> >
> > Thanks,
> > I tested it:
> >
> > if (!save("location","rp1")) {
> > sl_reply_error();
> > }
> > append_to_reply("Contact: $ct;expires=40\r\n");
> > sl_send_reply("200","OK");
> >
> > It works fine.
> >
> > regards,
> > takeshi
> >
> >
> >
> > mayamatakeshi wrote:
> > >
> > > On Tue, Feb 16, 2010 at 12:54 AM, mayamatakeshi
> > > mailto:mayamatake...@gmail.com>
> > <mailto:mayamatake...@gmail.com <mailto:mayamatake...@gmail.com>>>
> > wrote:
> > >
> > > Hello,
> > > about registration, is it possible somehow to make opensips to
> > > reply with a "200 OK" containing only the Contact of the
> > > registering UA instead of all contacts from usrloc?
> > >
> > > I'm having a problem with eyebeam. It has a bug (at least the
> > > version I'm testing) and it doesn't parse the Contact header
> > > correctly and it always gets the value of expires from the
> first
> > > contact listed.
> > > So in the case of a "200 OK" with a Contact like this:
> > >
> > > Contact:  > <http://sip:1...@192.168.2.5:5050>
> > >
> > <http://sip:1...@192.168.2.5:5050>>;expires=5;received="sip:
> 192.168.2.5:5050
> > <http://192.168.2.5:5050>
> > > <http://192.168.2.5:5050>",  > <http://sip:1...@192.168.0.2:8286>
> > >
> > <http://sip:1...@192.168.0.2:8286>>;expires=40;received="sip:
> 192.168.128.33:61717
> > <http://192.168.128.33:61717>
> > > <http://192.168.128.33:61717>"
> > >
> > > it should get expires=40 but it is getting expires=5. And since
> > > eyebeam re-registers 5 seconds before expirations, it sends
> > > REGISTER immediately and this goes on in a loop till the
> expires
> > > of the first contact gets greater than 5 (when the other
> > terminal
> > > re-registers).
> > >
> > >
> > > I have not tested yet, but I think I got it:
> > > I have to call the function save with the flag "r" (no Reply),
> > compose
> > > the Contact header myself and send the reply.
> > >
> > >
> > >
> >
> 
> > >
> > > ___
> > > 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
> >
> >
> > 
> >
> > ___
> > 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Conditional processing of branches after lookup

2010-02-23 Thread mayamatakeshi
On Wed, Feb 24, 2010 at 2:28 AM, mayamatakeshi wrote:

> Hello,
> is it possible to do conditional processing for each branch after lookup()
> is called (branch_route) based on data saved with the contact?
> Specifically, I would like to add a different header like Alert-Info based
> on the field user_agent.
>

Reading the docs, I believe this cannot be done.
But a limited conditional processing could be done indirectly using bflags:
we can identify the User-Agent during registration and set bflags based on
it. Then those bflags will be available in the branches when lookup() is
performed.

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Conditional processing of branches after lookup

2010-02-23 Thread mayamatakeshi
Hello,
is it possible to do conditional processing for each branch after lookup()
is called (branch_route) based on data saved with the contact?
Specifically, I would like to add a different header like Alert-Info based
on the field user_agent.

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Contact list in REGISTER response

2010-02-23 Thread mayamatakeshi
On Tue, Feb 16, 2010 at 6:45 PM, Bogdan-Andrei Iancu  wrote:

> Hi,
>
> Yes, that is the only way - if REGISTRAR module builds the reply, it
> will do it in RFC way (adding all the registered contacts) and you
> cannot change this behaviour.
>

Thanks,
I tested it:

if (!save("location","rp1")) {
sl_reply_error();
}
append_to_reply("Contact: $ct;expires=40\r\n");
sl_send_reply("200","OK");

It works fine.

regards,
takeshi



> mayamatakeshi wrote:
> >
> > On Tue, Feb 16, 2010 at 12:54 AM, mayamatakeshi
> > mailto:mayamatake...@gmail.com>> wrote:
> >
> > Hello,
> > about registration, is it possible somehow to make opensips to
> > reply with a "200 OK" containing only the Contact of the
> > registering UA instead of all contacts from usrloc?
> >
> > I'm having a problem with eyebeam. It has a bug (at least the
> > version I'm testing) and it doesn't parse the Contact header
> > correctly and it always gets the value of expires from the first
> > contact listed.
> > So in the case of a "200 OK" with a Contact like this:
> >
> > Contact:  > <http://sip:1...@192.168.2.5:5050>>;expires=5;received="sip:
> 192.168.2.5:5050
> > <http://192.168.2.5:5050>",  > <http://sip:1...@192.168.0.2:8286>>;expires=40;received="sip:
> 192.168.128.33:61717
> > <http://192.168.128.33:61717>"
> >
> > it should get expires=40 but it is getting expires=5. And since
> > eyebeam re-registers 5 seconds before expirations, it sends
> > REGISTER immediately and this goes on in a loop till the expires
> > of the first contact gets greater than 5 (when the other terminal
> > re-registers).
> >
> >
> > I have not tested yet, but I think I got it:
> > I have to call the function save with the flag "r" (no Reply), compose
> > the Contact header myself and send the reply.
> >
> >
> > 
> >
> > ___
> > 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
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Contact list in REGISTER response

2010-02-15 Thread mayamatakeshi
On Tue, Feb 16, 2010 at 12:54 AM, mayamatakeshi wrote:

> Hello,
> about registration, is it possible somehow to make opensips to reply with a
> "200 OK" containing only the Contact of the registering UA instead of all
> contacts from usrloc?
>
> I'm having a problem with eyebeam. It has a bug (at least the version I'm
> testing) and it doesn't parse the Contact header correctly and it always
> gets the value of expires from the first contact listed.
> So in the case of a "200 OK" with a Contact like this:
>
> Contact: ;expires=5;received="sip:
> 192.168.2.5:5050", ;expires=40;received="sip:
> 192.168.128.33:61717"
>
> it should get expires=40 but it is getting expires=5. And since eyebeam
> re-registers 5 seconds before expirations, it sends REGISTER immediately and
> this goes on in a loop till the expires of the first contact gets greater
> than 5 (when the other terminal re-registers).
>

I have not tested yet, but I think I got it:
I have to call the function save with the flag "r" (no Reply), compose the
Contact header myself and send the reply.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Contact list in REGISTER response

2010-02-15 Thread mayamatakeshi
Hello,
about registration, is it possible somehow to make opensips to reply with a
"200 OK" containing only the Contact of the registering UA instead of all
contacts from usrloc?

I'm having a problem with eyebeam. It has a bug (at least the version I'm
testing) and it doesn't parse the Contact header correctly and it always
gets the value of expires from the first contact listed.
So in the case of a "200 OK" with a Contact like this:

Contact: ;expires=5;received="sip:
192.168.2.5:5050", ;expires=40;received="sip:
192.168.128.33:61717"

it should get expires=40 but it is getting expires=5. And since eyebeam
re-registers 5 seconds before expirations, it sends REGISTER immediately and
this goes on in a loop till the expires of the first contact gets greater
than 5 (when the other terminal re-registers).

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Opensips segfault during pua_dialoginfo tests

2009-11-24 Thread mayamatakeshi
Hello Anca,
it's done.
Thanks.

br,
takeshi

On Wed, Nov 25, 2009 at 1:59 AM, Anca Vamanu  wrote:

> Hi Takeshi,
>
> Please open a bug report on sourceforge tracker
> http://sourceforge.net/tracker/?atid=1086410&group_id=232389&func=browse
> and specify what version you are using.
> Also can you please run 'bt full' to see also what are the values of the
> variables there.
>
> Regards,
>
> --
> Anca Vamanu
> www.voice-system.ro
>
>
> mayamatakeshi wrote:
> > Hello,
> > is the mailing list the place to report segfaults?
> >
> > I'm doing some manual tests with presence and pua dialoginfo modules.
> > Opensips is crashing very frequently. Last time was this:
> >
> > Log:
> > Nov 25 00:57:27 lab kernel: opensips[10924]: segfault at
> > 0008 rip 2b2fe86c65f9 rsp 7fffc3b581e0 error 4
> >
> > Backtrace:
> > #0  0x2b2fe86c65f9 in publ_build_hdr (expires=3600, ev=0x0,
> > content_type=0x0, etag=0x2b2fe940c248, extra_headers=0x2b2fe940c335,
> > is_body=0) at send_publish.c:80
> > 80  memcpy(str_hdr->s+ str_hdr->len, ev->name.s,
> > ev->name.len);
> > (gdb) bt
> > #0  0x2b2fe86c65f9 in publ_build_hdr (expires=3600, ev=0x0,
> > content_type=0x0, etag=0x2b2fe940c248, extra_headers=0x2b2fe940c335,
> > is_body=0) at send_publish.c:80
> > #1  0x2b2fe86c24d1 in update_pua (p=0x2b2fe940c1f8,
> > hash_code=) at pua.c:670
> > #2  0x2b2fe86c2f74 in hashT_clean (ticks=,
> > param=) at pua.c:625
> > #3  0x0048bf63 in start_timer_processes () at timer.c:325
> > #4  0x004297e1 in main (argc=3, argv=0x4) at main.c:867
> >
> > regards,
> > takeshi
> > 
> >
> > ___
> > 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


[OpenSIPS-Users] Opensips segfault during pua_dialoginfo tests

2009-11-24 Thread mayamatakeshi
Hello,
is the mailing list the place to report segfaults?

I'm doing some manual tests with presence and pua dialoginfo modules.
Opensips is crashing very frequently. Last time was this:

Log:
Nov 25 00:57:27 lab kernel: opensips[10924]: segfault at 0008
rip 2b2fe86c65f9 rsp 7fffc3b581e0 error 4

Backtrace:
#0  0x2b2fe86c65f9 in publ_build_hdr (expires=3600, ev=0x0,
content_type=0x0, etag=0x2b2fe940c248, extra_headers=0x2b2fe940c335,
is_body=0) at send_publish.c:80
80  memcpy(str_hdr->s+ str_hdr->len, ev->name.s, ev->name.len);
(gdb) bt
#0  0x2b2fe86c65f9 in publ_build_hdr (expires=3600, ev=0x0,
content_type=0x0, etag=0x2b2fe940c248, extra_headers=0x2b2fe940c335,
is_body=0) at send_publish.c:80
#1  0x2b2fe86c24d1 in update_pua (p=0x2b2fe940c1f8, hash_code=) at pua.c:670
#2  0x2b2fe86c2f74 in hashT_clean (ticks=,
param=) at pua.c:625
#3  0x0048bf63 in start_timer_processes () at timer.c:325
#4  0x004297e1 in main (argc=3, argv=0x4) at main.c:867

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Avoiding use of table presentity

2009-11-20 Thread mayamatakeshi
Thanks, Anka,
I got it.

best regards.

On Fri, Nov 20, 2009 at 10:14 PM, Anca Vamanu  wrote:

> mayamatakeshi wrote:
> > Hello,
> > I'm experimenting with module presence.
> > Is it possible somehow to make presence to NOT write to table presentity?
> > I'm sending PUBLISH messages to opensips and I just want its contents
> > to be sent to the watchers. I don't care to add previous contents nor
> > even to send anything in case of NOTIFY due to SUBSCRIBE.
> >
> > regards,
> > takeshi
> > 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> Hi Takeshi,
>
> No, it is not possible to avoid using presentity table. The presence
> module uses it real time for storing info from Publish messages and
> getting info when sending Notifies. The reason why the database must be
> used in this case is that the documents can be large and can not be
> stored in memory.
>
> 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


[OpenSIPS-Users] Avoiding use of table presentity

2009-11-20 Thread mayamatakeshi
Hello,
I'm experimenting with module presence.
Is it possible somehow to make presence to NOT write to table presentity?
I'm sending PUBLISH messages to opensips and I just want its contents to be
sent to the watchers. I don't care to add previous contents nor even to send
anything in case of NOTIFY due to SUBSCRIBE.

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] NAT handling on a chain of proxies

2009-11-16 Thread mayamatakeshi
On Tue, Nov 17, 2009 at 12:00 AM, Bogdan-Andrei Iancu <
bog...@voice-system.ro> wrote:

> Hi Takeshi,
>
> First of all, you want to do the detection for the initial requests or
> for sequential requests only?
>

Hi Bogdan,
I needed to check and change both initial and subsequent requests.


>
> But going to the bottom, you should do the fixing only if the contact
> show "signs" of NAT presence (network level or private ips) - so you
> should not rely on the position of your proxy in the chain, but on the
> actual information from the messages.
>

Yes, but in my case, the downstream proxy bridges public and private
networks and so some private ips showing up in the Contact header were valid
and should not be modified and this was causing problems.
So, I decided to check and fix the header Contact only if the source of the
message is not in the GW tables (in this table I put all proxies and GWs I
interconnect with).
So i just have to use is_from_gw (drouting) or from_gw (lcr) and everything
is fine now.

br,
takeshi


>
>
> mayamatakeshi wrote:
> >
> > On Fri, Oct 30, 2009 at 7:54 PM, mayamatakeshi
> > mailto:mayamatake...@gmail.com>> wrote:
> >
> > Hello,
> > is there an easy way to check if my opensips instance is the last
> > proxy before the UAS?
> > I need this to avoid calling nat_uac_test/fix_nated_contact in my
> > onreply_route in case I'm receiving a response relayed by another
> > proxy.
> > I was thinking I could test if i'm in the top-most Record-Route in
> > the reply, but I was unable to figure out how to do it.
> >
> >
> > Reading the page about transformations, I think something like this
> > would work:
> >
> > if ( $(hdr(Record-Route)[0]{uri.host}) == myself ) {
> >
> > }
> >
> > However, I think to implement a generic way to handle this would
> > become very convoluted: I was thinking that I should do this
> > considering the possibility of dealing with redirection and downstream
> > proxies that would do not record_route or would do it conditionally.
> > So I would have to check this, set some parameter in Record-Route,
> > take care in case of branching and checking the Route header etc, etc.
> > But I think this is a lot of trouble and will not actually happen in
> > our network.
> > So I will write my cfg just testing:
> >
> > if ( !from_gw() ) {
> >   fix_nated_contact();
> > }
> >
> > because I just need to fix the contact of the registered users.
> >
>
> --
> Bogdan-Andrei Iancu
> 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] Presence server behind load-balancer

2009-11-16 Thread mayamatakeshi
On Mon, Nov 16, 2009 at 3:34 AM, Bogdan-Andrei Iancu  wrote:

> Hi Takeshi,
>
> Routing the presence traffic does not require USRLOC/REGISTRATION at
> all.  The clients do send PUBLISH to the presence agent and they also
> send the SUBSCRIBE request to it. The PA (presence agent) is sending
> back the NOTIFY requests within the dialog created by the SUBSCRIBE
> request. So, the NOTIFY will be route back based on the Record-Route you
> did for SUBSCRIBE.
>

Bogdan,
I got it: I was mislead by an error in my cfg (wrong treatment of SUBSCRIBE
requests with to-tag) and was receiving "404 Not here" for them. So I
thought I had to create a new out-of-dialog request every time I wanted to
subscribe.
Thank you for clarifying this.

br,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Presence server behind load-balancer

2009-11-15 Thread mayamatakeshi
Hello,
I am testing opensips as registrar in the following scenario:

UA ---REGISTER---> opensips (load-balancer) REGISTER with header
Path> opensips (registrar).

This works fine, and I have the INVITEs that reach the registrar going thru
both proxies as expected:

UA <-INVITE- opensips(load-balancer)
<---INVITE---opensips(registrar) <-- GW

But now I want to make the registrar to work as a presence server and I want
the NOTIFY requests to go thru the load-balancer too (to permit reach UAs
behind NAT).
Is this possible? I mean, when presence is processed by opensips, it seems
to me we cannot route NOTIFY requests using the usrloc data from the
registrar, because the NOTIFYs generated by this are not processed by the
cfg file.
So, is there any way to do this?

br,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] NAT handling on a chain of proxies

2009-10-31 Thread mayamatakeshi
On Fri, Oct 30, 2009 at 7:54 PM, mayamatakeshi wrote:

> Hello,
> is there an easy way to check if my opensips instance is the last proxy
> before the UAS?
> I need this to avoid calling nat_uac_test/fix_nated_contact in my
> onreply_route in case I'm receiving a response relayed by another proxy.
> I was thinking I could test if i'm in the top-most Record-Route in the
> reply, but I was unable to figure out how to do it.
>

Reading the page about transformations, I think something like this would
work:

if ( $(hdr(Record-Route)[0]{uri.host}) == myself ) {
   
}

However, I think to implement a generic way to handle this would become very
convoluted: I was thinking that I should do this considering the possibility
of dealing with redirection and downstream proxies that would do not
record_route or would do it conditionally. So I would have to check this,
set some parameter in Record-Route, take care in case of branching and
checking the Route header etc, etc.
But I think this is a lot of trouble and will not actually happen in our
network.
So I will write my cfg just testing:

if ( !from_gw() ) {
  fix_nated_contact();
}

because I just need to fix the contact of the registered users.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] NAT handling on a chain of proxies

2009-10-30 Thread mayamatakeshi
Hello,
is there an easy way to check if my opensips instance is the last proxy
before the UAS?
I need this to avoid calling nat_uac_test/fix_nated_contact in my
onreply_route in case I'm receiving a response relayed by another proxy.
I was thinking I could test if i'm in the top-most Record-Route in the
reply, but I was unable to figure out how to do it.
(to avoid calling fix_nated_contact in requests, i think I can use
textops:is_present_hf).

regards,
takeshi
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Module Path and function loose_route

2009-08-21 Thread mayamatakeshi
On Fri, Aug 21, 2009 at 7:50 PM, Iñaki Baz Castillo wrote:
> Using loose route makes no sense since its purpose is handling in-dialog
> requests.
> IMHO what you want to achieve is easier:
> - If the proxy receives an initial request from the registrar (no To tag),
> then do loose_route (just to take off the Route header even if it returns
> false) and route the call normally. based on RURI, no more:
>
>  if $si == "REGISTRAR_IP" {
>    loose_route();  # returns false but removes the Route header.
>    t_relay();  # Route based on RURI since the Route header has been removed.
>  }

Thanks,
in my case I will need an extra test as the registrar will actually be
a B2BUA and may require not only termination of calls to users but
also calls to be directed to GWs.
So I came up with this:

if(request came from B2BUA) {
if($(hdr(Route)[0]{nameaddr.uri}{uri.host}) == "MY_IPADDRESS" &&
$(hdr(Route)[1]) == null) {
loose_route(); # this forces removal of the Route header 
detected above.
t_relay();
exit;
}
}

#Proceed to drouting etc.


It's convoluted, but it works.

regards,
takeshi

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Module Path and function loose_route

2009-08-20 Thread mayamatakeshi
On Fri, Aug 21, 2009 at 3:43 AM, Iñaki Baz Castillo wrote:
> El Jueves, 20 de Agosto de 2009, Alex Balashov escribió:
>> Iñaki Baz Castillo wrote:
>> > El Jueves, 20 de Agosto de 2009, mayamatakeshi escribió:
>> >> "There is only one exception: If the request is out-of-dialog (no
>> >> to-tag) and there is only one Route: header indicating the local
>> >> proxy, then the Route: header is removed and the function returns
>> >> FALSE."
>> >>
>> >> But why does it return FALSE?
>> >
>> > Because if an initial request (no To-tag) has a single Route header
>> > pointing to the proxy handling it, it's useless.
>>
>> That's correct - initial INVITEs (and all initial requests) are
>> different than in-dialog requests (requests arising within a dialog
>> created by the initial requests).
>>
>> They are routed manually, not using loose_route() in any way.
>
> In fact, in case of PATH usage, the registrar should receive the request for a
> registered user, add Route header pointing to the inbound/outbound proxy of
> the registered user and change the RURI with the real location of the
> registered user (or mapped public address in case of NAT), route the request
> to it,

Iñaki, Alex,
thanks. But I'm still confused about this.
The above is what I believe I'm doing in my tests: I am setting the
RURI to the real location of the registered user and I'm passing the
URI of opensips in the sole Route header.

> and the inbound/outbound proxy should remove the Route header and route
> the request based on the RURI as usual.

How my cfg should accomplish this then? If loose_route returned TRUE,
I would simply relay the request to the address in the RURI.
Do you mean I should not be using loose_route() for this? Should I
perform the checking in another way?
Well, of course I could come up with something else, but it seems to
me loose_route() would be the simplest way to do it if there was not
that exception clause that I really don't understand why is there.

regards,
takeshi

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Module Path and function loose_route

2009-08-20 Thread mayamatakeshi
Hello,
I'm testing with the path module.
I'm using this scheme:
User1 - REGISTER -> opensips -> REGISTER -> registrar.
Then, when a call comes into the registrar to User1 I'm trying to send
the INVITE to User1 via opensips.

In my cfg I have added a test to see if an out-of-dialog request
contains a valid route set:

#if there is a "pre-loaded route set", then it is a request to
be sent to a user
if(loose_route()) {
 ...relay the request
}

However, loose_route() is returning false.
This is in accordance to
http://www.opensips.org/html/docs/modules/1.5.x/rr.html where we can
read:

"There is only one exception: If the request is out-of-dialog (no
to-tag) and there is only one Route: header indicating the local
proxy, then the Route: header is removed and the function returns
FALSE."

But why does it return FALSE?

I'm trying with the following INVITE:

INVITE sip:eywhywhdyhdyw...@192.168.4.6 SIP/2.0
Via: SIP/2.0/UDP
192.168.2.121:5070;rport;branch=z9hG4bKPjJ5ldIJPcArMnJ0soPgyRWi3zGyA9TYBt
Max-Forwards: 70
From: ;tag=QumeNtxM4Cb9Qj77vumy5ujr8vHoJBfS
To: 
Contact: 
Call-ID: Vw3Cvf6utvMuzj-K2WGOc.YYvYWfORGB
CSeq: 28223 INVITE
Route: 
Allow: SUBSCRIBE, NOTIFY, REFER, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK
Supported: replaces, 100rel
Content-Type: application/sdp
Content-Length:   453
[SDP ommited]

So, how should the INVITE be sent for loose_route to succeed?
Or should I put something else in my cfg?

regards,
takeshi

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Problem using OpenSIPS with SIPp for testing

2009-03-13 Thread mayamatakeshi
On Sat, Mar 14, 2009 at 2:49 PM, SAMEER KUMAR  wrote:
> Hi Takeshi,
>
> I used the exact cfg file you sent. But that too seems to be not helping me.

Sameer,
the cfg does work. I tested using an eyebeam phone. The call goes thru
opensips and it is relayed to another terminal.

> I debugged to find out that the message processing does not go to the
> if(method="INVITE" conditional branch.

If the processing of the request doesn't reach that line, then maybe
the message received (generated by SIPp), is not properly formed. Have
you checked the contents of the message?
Also, have you tried to call using some UA like x-lite?
Put some xlog in the cfg and check where and why the above line is not
hit by the processing.

> I then added all the t_relay and
> other functions in the route[1] branch (anyways relaying would be needed for
> ACKs revieved as well). But that too does not seem to be working. I found
> the t_relay returns following error in route[1].
>
>
> Mar 14 16:58:54 [3891] ERROR:tm:t_forward_nonack: no branch for forwarding
> Mar 14 16:58:54 [3891] ERROR:tm:w_t_relay: t_forward_nonack failed
> Mar 14 16:59:24 [3892] CRITICAL:tm:t_should_relay_response: pick_branch
> failed (lowest==-1) for code 408
>
>
> I am not getting where the things are goinf wrong...
>
> Can you please throw some light.
>
> Sameer Kumar
> B.Tech, Computer Engineering
> Institute of Technology,
> Nirma University,
> Ahmedabad, Gujarat
>
>
>
> On Fri, Mar 13, 2009 at 8:51 AM, mayamatakeshi 
> wrote:
>>
>> On Fri, Mar 13, 2009 at 9:04 PM, SAMEER KUMAR 
>> wrote:
>> > Dear,
>> >
>> > Thanks for such a prompt reply.
>> >
>> > Earlier I was not even using a saperate processing for INVITE. I was
>> > supposed to be processed by the fefault call to route[1] (please refer
>> > to
>> > the cfg file). But as I noticed the problem I stated, I tought that the
>> > call
>> > to t_relay in route[1] is not being processed (in route[1] in the if
>> > condition check). So I made a explicit processing for INVITE and then
>> > used
>> >  t_relay. But when that too did not seemed to help I used stateless
>> > forward.
>> > I had tried lot many different things (like adding via and record route
>> > functions etc etc) and also tested other example cfg files. So be sure
>> > that
>> > there is no problem with cfg file. The problem persists ireespective of
>> > all
>> > that.
>>
>> Hello Sameer,
>> my current installation is not compiled with tls and I also don't have
>> the load_sig_api required by the registrar module. So I cleared your
>> cfg from registrar functions and running it I can see it does work
>> (i'm using opensips head  r. 5438). Here's the modified cfg file:
>>
>> debug=3
>> fork=no
>> log_stderror=yes
>> listen=192.168.2.3
>> port=5080
>> children=4
>> dns=yes
>> rev_dns=yes
>> #fifo= "/tmp/ser_fifo"
>>
>> mpath="/usr/local/lib/opensips/modules"
>>
>> loadmodule "sl.so"
>> loadmodule "tm.so"
>> loadmodule "rr.so"
>> loadmodule "maxfwd.so"
>> loadmodule "usrloc.so"
>>
>> modparam("usrloc", "db_mode", 0)
>> modparam("rr", "enable_full_lr", 1)
>> route  {
>>
>>   if (!mf_process_maxfwd_header("10")) {
>>      sl_send_reply("483", "Too Many Hops");
>>      return;
>>   };
>>
>>   if (msg:len > max_len) {
>>       sl_send_reply("513", "Message Overflow");
>>       return;
>>   };
>>
>>   if (method!="REGISTER") {
>>       record_route();
>>   };
>>
>>   if (loose_route()) {
>>       route(1);
>>       return;
>>   };
>>
>>   if (uri!=myself) {
>>       route(1);
>>       return;
>>   };
>>   if (method=="ACK") {
>>       route(1);
>>       return;
>>   }
>>
>>   if (method=="INVITE") {
>>
>>    add_local_rport();
>>    force_rport();
>>    forward();
>>    t_relay();
>>
>>    return;
>>   };
>>
>>   route(1);
>> }
>>
>> route[1] {
>>
>>   if (!t_relay()) {
>>       sl_reply_error();
>>   };
>>
>> }
>>
>> Maybe this is something related to TLS. Have you tried testing with no
>> TLS?
>
>

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Profile feature not working

2009-02-18 Thread mayamatakeshi
On Thu, Feb 19, 2009 at 2:18 AM, Bogdan-Andrei Iancu  wrote:

> Hi,
>
> in 1.5, do "create_dialog();" before using the profiling functions
>

Hello, Bogdan,
thanks, it worked.
But this is not yet documented.
The page below still says a dialog is created using the "dlg_flag":
http://www.opensips.org/html/docs/modules/devel/dialog.html

best regards,
mayama


> mayamatakeshi wrote:
>
>> Hello,
>> I just got the latest svn revision 5330.
>> I'm trying to use the profile feature of the dialog module to limit the
>> number of simultaneous calls for a given subscriber.
>> I got these errors:
>>
>> Feb 19 01:28:37 ipx029 /usr/local/sbin/opensips[23050]:
>> ERROR:dialog:set_dlg_profile: dialog was not yet created - script error
>> Feb 19 01:28:37 ipx029 /usr/local/sbin/opensips[23050]:
>> ERROR:dialog:w_set_dlg_profile: failed to set profile
>>
>>
>> Significant portions of the cfg are these:
>>
>>setflag(4); #set dialog
>>
>>get_profile_size("caller", "$fu", "$var(SIZE)");
>>if( $var(SIZE) >= $avp(i:10) ){
>>sl_send_reply("503", "Simultaneous calls limit reached");
>>exit;
>>}
>>
>>consume_credentials();
>>set_dlg_profile("caller","$fu");
>>
>>
>> This may be a bug as the script was originally written for kamailio 1.4
>> and works without problems there.
>> (I'm aware the dialog module is diverging between the projects, but
>> reading the docs I could not spot a significant change in this particular
>> feature).
>>
>> 
>>
>> ___
>> 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] Profile feature not working

2009-02-18 Thread mayamatakeshi
Hello,
I just got the latest svn revision 5330.
I'm trying to use the profile feature of the dialog module to limit the
number of simultaneous calls for a given subscriber.
I got these errors:

Feb 19 01:28:37 ipx029 /usr/local/sbin/opensips[23050]:
ERROR:dialog:set_dlg_profile: dialog was not yet created - script error
Feb 19 01:28:37 ipx029 /usr/local/sbin/opensips[23050]:
ERROR:dialog:w_set_dlg_profile: failed to set profile


Significant portions of the cfg are these:

setflag(4); #set dialog

get_profile_size("caller", "$fu", "$var(SIZE)");
if( $var(SIZE) >= $avp(i:10) ){
sl_send_reply("503", "Simultaneous calls limit reached");
exit;
}

consume_credentials();
set_dlg_profile("caller","$fu");


This may be a bug as the script was originally written for kamailio 1.4 and
works without problems there.
(I'm aware the dialog module is diverging between the projects, but reading
the docs I could not spot a significant change in this particular feature).
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Configuration WeSIP 0.1.5 with openser-1.3.4-tls

2009-01-30 Thread mayamatakeshi
On Thu, Jan 29, 2009 at 4:28 PM, arundeking  wrote:

>
> Hi all,
>
>  I am new to WeSIP and i want to configuration WeSip with
> openser-1.3.4-tls.
>
>  I make changes what ever is given
> http://www.wesip.com/mediawiki/index.php/Installation
>  and
> http://www.wesip.com/mediawiki/index.php/Configuration respect to WeSIP
> and
> Openser.
>
> But while runing openser i am getting this error.
>
> ERROR:core:version_control: module version mismatch for
> //lib/openser/modules/seas.so; core: openser 1.3.4-notls (i386/linux);
> module: openser 1.2.2-notls (i386/linux)
>
> Can any one tell me please whats going on.


Hello, I never used seas, but the message above is saying that the seas.so
module does not correspond to the current openser version. (1.3.4 conflicts
with 1.2.2)..
Are you sure you removed the "seas" from the "exclude_modules?" list in the
Makefile before build?  If there is an old version of the file, It should
have been overwritten by the newer version.
If you are sure you did it and still this problem happens, search for all
seas.so and delete them, then rebuild. Maybe openser is looking somewhere
else.

regards,
mayama

>
>
> --
> View this message in context:
> http://n2.nabble.com/Configuration-WeSIP-0.1.5-with-openser-1.3.4-tls-tp2237556p2237556.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