Re: [OpenSIPS-Users] Using Redis with OpenSIPS 2.1.5 error

2016-12-23 Thread Sami Montour
Hi Razvan,

  I compiled OpenSIPS with gcc 5.4. I applied your patch and it works 
now. Thanks so much.

Sam

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


Re: [OpenSIPS-Users] custom presence bodies

2016-12-23 Thread Tito Cumpen
The closest thing that resembles the sort of body I need is using
dialog_info but even that is lacking because it supposed to be used for the
user you are subscribed to. Can you tell me if the dialog id is necessary
during publish? I tried reading https://tools.ietf.org/html/rfc4235 but
cannot find information of where it is sourced from.

On Tue, Dec 20, 2016 at 7:25 AM, Tito Cumpen  wrote:

> Thanks for your reply Razvan,
>
>
> I tried using the conference event with  application/xml+conf but opensips
> is replying with these errors:
>
> : ERROR:presence:handle_subscribe: unrecognized value [conference] in
> Event header
>
> : INFO:presence:handle_subscribe: Missing or unsupported event header
> field value
>
>
> ERROR:presence:handle_publish: unrecognized value [conference] in Event
> header
>
> ERROR:presence:handle_publish: Missing or unsupported event header field
> value
>
>  ERROR:presence:handle_publish: #011event=[conference]
>
>
>
> When I used the presence events with application/pidf+xml  notifies
> worked but they only carried limited information
>
>
> \n entity=\"sip:sjoi...@domain.org\"/>\n
>
>
> reduced from :
> .
>  entity="sips:sjoi4y6"state="full" version="1">.
> .
> connected.
> .
> .
> .
>
>
> which means that the body was dismissed and the entity was taken from the
> ruri?
>
> any idea how to relay this body? or modify it to carry my users tag with
> state and endpoint enitity?
>
> Thanks,
> Tito
>
> On Tue, Dec 20, 2016 at 2:49 AM, Răzvan Crainea 
> wrote:
>
>> Hi, Tito!
>>
>> The Content-Type indicates how to read and parse the Message body. This
>> is a mandatory header, and without it the client can't know how to
>> interpret the body.
>> The Event header is used by opensips (and clients) to figure out the
>> event that happened.
>> The idea is that the clients will subscribe for a particular event
>> (presence, or conference in your case) and when that event happens,
>> OpenSIPS will send notifies only to those clients registered for that event.
>>
>> Best regards,
>>
>> Răzvan Crainea
>> OpenSIPS Solutionswww.opensips-solutions.com
>>
>> On 12/20/2016 11:37 AM, Tito Cumpen wrote:
>>
>> Razvan,
>>
>>
>> Thanks for pointing that out. Will my subscribers get this xml via notify
>> regardless of the content type? say :
>>
>> application/xml+conf"
>>
>> or
>>
>> application/pidf+xml
>>
>> does the application header or Event:presence header mean anything to
>> opensips?
>>
>> On Tue, Dec 20, 2016 at 12:04 AM, Răzvan Crainea 
>> wrote:
>>
>>> Hi, Tito!
>>>
>>> I ran your example in an XML validator, and I noticed that your XML has
>>> an "error on line 2 at column 86: attributes construct error"[1]. If you
>>> add a space before the "state" attribute, the XML gets parsed properly[2].
>>>
>>> [1] http://www.utilities-online.info/xmltojson/?save=5a6721b1-55
>>> f9-46c2-8bda-cf21e15e38b3-xmltojson
>>> [2] http://www.utilities-online.info/xmltojson/?save=320f586b-c2
>>> eb-4e73-b564-3f73f0120662-xmltojson
>>>
>>> Best regards,
>>>
>>> Răzvan Crainea
>>> OpenSIPS Solutionswww.opensips-solutions.com
>>>
>>> On 12/20/2016 01:38 AM, Tito Cumpen wrote:
>>>
>>> I want to implement something similar to
>>>
>>> https://tools.ietf.org/html/rfc4579
>>>
>>> On Mon, Dec 19, 2016 at 1:58 PM, Tito Cumpen  wrote:
>>>
 Group or Devs,

 Is there any way to allow custom bodies during a presence publish?

 I am trying to implement presence notifies for a conferencing scenario
 to allow participants of a conference to subscribe to the conference
 events. The events will send information about who connected to and
 disconnected with the intention of syncing the UI. I am trying to publish
 the following:

 PUBLISH sip:ap5b...@blah.org SIP/2.0.
 Call-ID: 861f3c86868d8a4b00276064d1205e0a@x.x.x.x.x.x.
 CSeq: 2 PUBLISH.
 From: "Dave Drummond" ;
 tag=62944280_a75dd11f_3a41c2f1_a8e175ca.
 To: .
 Max-Forwards: 70.
 User-Agent: Mobicents Sip Servlets 3.0.0-SNAPSHOT.
 Event: presence.
 Via: SIP/2.0/TCP 192.237.207.220:5080;branch=z9
 hG4bKa8e175ca_3a41c2f1_7d6e0f5b-7595-4432-849e-500f6d4fe940.
 Content-Type: application/pidf+xml.
 Proxy-Authorization: Digest username="ddrummond.b...@blah.org",realm="
 blah.org",nonce="58585739212cd09ec487455386e
 318963e82d972f333",uri="sip:ap5b...@blah.org",response="670c
 0336b89491900c284014c12b62ac".
 Content-Length: 263.
 .
 .
 >>> entity="sips:ap5badj"state="full" version="1">.
 .
 connected.
 .
 .
 .


 but I get a 415 unsupported media type

 Dec 19 21:53:15 cloud-server-06 /sbin/opensips[31135]:
 ERROR:presence_xml:xml_publ_handl: bad body format
 Dec 19 21:53:15 cloud-server-06 /sbin/opensips[31135]:
 ERROR:presence:handle_publish: in event specific publish handling


 Can someone tell me how I can modify the body to make this work?


 Thanks,
 Tito

>>>
>>>
>>>
>>> 

Re: [OpenSIPS-Users] Merry Christmas and A Happy New Year

2016-12-23 Thread Ramachandran, Agalya (Contractor)
Merry Christmas and Happy new year to all your team. 

Regards,
Agalya

-Original Message-
From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of 
Bogdan-Andrei Iancu
Sent: Friday, December 23, 2016 11:05 AM
To: users@lists.opensips.org; developensips ; 
busin...@lists.opensips.org
Subject: [OpenSIPS-Users] Merry Christmas and A Happy New Year

Hi all,

As we all move one by one into the holiday mode, we - the entire OpenSIPS team 
- want to wish you Merry Christmas and A Happy New 2017. 
Thanks to all of you 2016 was a good year with many accomplishments and 
progress - nevertheless, let's make 2017 even greater. And we will start this 
by couple of public discussions about the OpenSIPS 2.3 release plan
- a lot of interesting stuff there !

Happy holidays,

--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.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


[OpenSIPS-Users] opensips performance

2016-12-23 Thread Ramachandran, Agalya (Contractor)
Hi Bogdan/team,

Am using opensips 2.2.2 version and using opensips as only proxy.
In the default script, in route[relay], I have called setdsturi(); No other 
changes with the default script.

Earlier, I have used only the default value of S_MEMORY and P_MEMORY in the 
/etc/default/opensips.
With this default values, for the end to end established call , I could reach 
only 150cps.


* When I tried to increase S_MEMORY and P_MEMORY to 1024 and 64 
respectively, and having opensips children =24, I could achieve 1000 cps.

* I have also re-tuned OpenSIPS log file, by adding 
"-/var/log/opensips.log".

* I have set the log_level =1

When I see opensips performance with default script I see you are achieving 
9000cps.
Am running on VM, with 8 core CPU, 16GB RAM  and processor is Intel Xeon 
E312xx(Sandy Bridge).
What are the places I need to take a look to tune up still, to get more 
performance. Your expertise would help me a lot.

In this particular test, I am not performing any DB operations /REST operations.
This is pure proxy, using default script.

Regards,
Agalya




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


Re: [OpenSIPS-Users] Merry Christmas and A Happy New Year

2016-12-23 Thread Giovanni Maruzzelli
Let's all of us enjoy holidays, see you all in new year !

-giovanni

sent from mobile
cell: +39 347 266 56 18
Giovanni Maruzzelli
OpenTelecom.IT

On Dec 23, 2016 17:34, "Nabeel"  wrote:

> Merry Christmas to all.
>
> Happy new year.
>
> On 23 Dec 2016 4:11 p.m., "Bogdan-Andrei Iancu" 
> wrote:
>
>> Hi all,
>>
>> As we all move one by one into the holiday mode, we - the entire OpenSIPS
>> team - want to wish you Merry Christmas and A Happy New 2017. Thanks to all
>> of you 2016 was a good year with many accomplishments and progress -
>> nevertheless, let's make 2017 even greater. And we will start this by
>> couple of public discussions about the OpenSIPS 2.3 release plan - a lot of
>> interesting stuff there !
>>
>> Happy holidays,
>>
>> --
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.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
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Merry Christmas and A Happy New Year

2016-12-23 Thread Nabeel
Merry Christmas to all.

Happy new year.

On 23 Dec 2016 4:11 p.m., "Bogdan-Andrei Iancu"  wrote:

> Hi all,
>
> As we all move one by one into the holiday mode, we - the entire OpenSIPS
> team - want to wish you Merry Christmas and A Happy New 2017. Thanks to all
> of you 2016 was a good year with many accomplishments and progress -
> nevertheless, let's make 2017 even greater. And we will start this by
> couple of public discussions about the OpenSIPS 2.3 release plan - a lot of
> interesting stuff there !
>
> Happy holidays,
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.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


[OpenSIPS-Users] Merry Christmas and A Happy New Year

2016-12-23 Thread Bogdan-Andrei Iancu

Hi all,

As we all move one by one into the holiday mode, we - the entire 
OpenSIPS team - want to wish you Merry Christmas and A Happy New 2017. 
Thanks to all of you 2016 was a good year with many accomplishments and 
progress - nevertheless, let's make 2017 even greater. And we will start 
this by couple of public discussions about the OpenSIPS 2.3 release plan 
- a lot of interesting stuff there !


Happy holidays,

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


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


Re: [OpenSIPS-Users] opensips 2.1 call_center queue position

2016-12-23 Thread Jonathan Hunter
Hi Bogdan,


That seems to be better, certainly from the count incrementing,  however  a 
couple of issues, I am now seeing this error, and when first call hits opensips 
it doesnt now route to the Agent who is logged in free and available;


: ERROR:b2b_entities:b2b_send_request: Can not send request [INVITE] for entity 
type [0] for dlg[0x7fe3f348a0f8]->[B2B.273.29] in terminated state
Dec 23 15:49:22 HPBXProxy1-beta /usr/local/sbin/opensips[12140]: 
ERROR:b2b_logic:b2bl_bridge: Failed to send INVITE request
Dec 23 15:49:22 HPBXProxy1-beta /usr/local/sbin/opensips[12140]: 
ERROR:call_center:set_call_leg: bridging failed
Dec 23 15:49:22 HPBXProxy1-beta /usr/local/sbin/opensips[12140]: 
ERROR:call_center:b2bl_callback_customer: failed to set new destination for call
Dec 23 15:49:22 HPBXProxy1-beta /usr/local/sbin/opensips[12140]: 
ERROR:b2b_logic:b2b_logic_notify_request: The callback function was unsuccessful




Also the first member in the queue is given value 0, and the second is then 
given value 1, can it start at 1 or is there a reason behind it?



Thanks


Jon



From: Bogdan-Andrei Iancu 
Sent: 23 December 2016 14:14
To: Jonathan Hunter; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] opensips 2.1 call_center queue position

Hi Jonathan,

A Merry Christmas to you too !

I found a small mistake in the original patch I sent you. Please revert that 
one and use this new patch (see attachment). Let me know if it does the trick.

Regards,

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

[http://www.opensips-solutions.com/imgs/slideshow/slide3.jpg]

Home - OpenSIPS Solutions
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is 
more than a SIP proxy/router as it includes application-level functionalities.


On 22.12.2016 13:58, Jonathan Hunter wrote:

Hi Bogdan,


Merry Christmas to you and the mailing list!


I am testing the real queue position, and with one call in progress, and then 2 
subsequent calls, both of which hit the hold music loop, I unfortunately dont 
see the position value increment, it remains at cc_pos=0 for all the calls, 
this is with just one queue defined to keep things very  simple.


Please let me know what debug or information you require, here are some outputs;



opensipsctl fifo cc_list_calls
Call:: 255.0 Ref=2 State=queued Call Time=2 Flow=Cust1
Call:: 884.0 Ref=2 State=queued Call Time=51 Flow=Cust1
Call:: 344.0 Ref=1 State=toagent Call Time=70 Flow=Cust1 Agent=2000

opensipsctl fifo cc_list_agents
Agent:: 2000 Ref=1 Loged in=YES State=incall

opensipsctl fifo cc_list_flows
Flow:: Cust1 Avg Call Duration=199 Processed Calls=3 Logged Agents=1 Ongoing 
Calls=3 Ref=3

opensipsctl fifo cc_list_queue
Call:: 0 Waiting for=114 ETW=0
Flow:: Cust1 Priority=256 Skill=custcare
Call:: 1 Waiting for=65 ETW=199
Flow:: Cust1 Priority=256 Skill=custcare

Many thanks

Jon





From: Bogdan-Andrei Iancu 
Sent: 07 November 2016 20:41
To: Jonathan Hunter; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] opensips 2.1 call_center queue position

Hi Jonathan,

I was not able to test it with a real queue, so let me know if it really does 
the job (in terms of reporting the real position in the queue).

Some questions:
1) currently I add that value only when sending to the queue / MOH - do you 
foresee any need to be added for other announcements like for welcome ?

2) will it be useful to add the ETW (estimate time to wait) ? is it useful ?

Regards,

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







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


Re: [OpenSIPS-Users] rtpproxy 2.0 and extractaudio

2016-12-23 Thread Ovidiu Sas
Here are the steps to extract the audio:
https://voipembedded.wordpress.com/2011/11/15/extracting-audio-from-calls-recorded-with-rtpproxy/

Regards,
Ovidiu Sas


On Dec 23, 2016 09:52, "Denis via Users"  wrote:

Hello, Bogdan!

I mean haw can i extract audio from .rtp file, which was recorded by
rtpproxy.
In documentation to rtpproxy said, that extractaudio utility can do that.
But how do that, i cannot find.

-- 
С уважением, Денис.
Best regards, Denis



23.12.2016, 17:49, "Bogdan-Andrei Iancu" :

Hi Denis,

You mean to record the RTP going through rtpproxy ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

On 23.12.2016 12:22, Denis wrote:

Hello!

I want to ask about extractaudio. Is there any manual for it? How can i use
it?
Has anybody operation experience of this soft?

Thank you.

-- 
С уважением, Денис.
Best regards, Denis





___
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] rtpproxy 2.0 and extractaudio

2016-12-23 Thread Bogdan-Andrei Iancu

Denis,

as I see, this is a tool provided by the rtpproxy project - you should 
dig and ask more on their side.


Regards,

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

On 23.12.2016 16:51, Denis wrote:

Hello, Bogdan!
I mean haw can i extract audio from .rtp file, which was recorded by 
rtpproxy.
In documentation to rtpproxy said, that extractaudio utility can do 
that. But how do that, i cannot find.

--
С уважением, Денис.
Best regards, Denis
23.12.2016, 17:49, "Bogdan-Andrei Iancu" :

Hi Denis,

You mean to record the RTP going through rtpproxy ?

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com 
On 23.12.2016 12:22, Denis wrote:

Hello!
I want to ask about extractaudio. Is there any manual for it? How 
can i use it?

Has anybody operation experience of this soft?
Thank you.
--
С уважением, Денис.
Best regards, Denis
___
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] rtpproxy 2.0 and extractaudio

2016-12-23 Thread Denis via Users
Hello, Bogdan! I mean haw can i extract audio from .rtp file, which was recorded by rtpproxy.In documentation to rtpproxy said, that extractaudio utility can do that. But how do that, i cannot find. -- С уважением, Денис.Best regards, Denis   23.12.2016, 17:49, "Bogdan-Andrei Iancu" :Hi Denis,You mean to record the RTP going through rtpproxy ?Regards,Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.comOn 23.12.2016 12:22, Denis wrote:Hello! I want to ask about extractaudio. Is there any manual for it? How can i use it?Has anybody operation experience of this soft? Thank you. -- С уважением, Денис.Best regards, Denis___
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] rtpproxy 2.0 and extractaudio

2016-12-23 Thread Bogdan-Andrei Iancu

Hi Denis,

You mean to record the RTP going through rtpproxy ?

Regards,

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

On 23.12.2016 12:22, Denis wrote:

Hello!
I want to ask about extractaudio. Is there any manual for it? How can 
i use it?

Has anybody operation experience of this soft?
Thank you.
--
С уважением, Денис.
Best regards, Denis


___
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] Is wildcard supported in opensips config file ?

2016-12-23 Thread Bogdan-Andrei Iancu

Hi Sasmita,

If you need something like this for domain module or for the "alias" 
script param, no, it is not possible.


Never the less, you can do your own domain checks in the script using 
regexp, like " if ($fd=~".*\.domain\.com") " . If you need something 
dynamic, use the dialplan module to recognize your domains based on 
regexp rules.


Regards,

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

On 22.12.2016 14:01, Sasmita Panda wrote:

Hi All ,

   I wanted to define a universal domain in the alias in the 
opensips config file . Something like " *.domain.com 
 " . So that all the request which are alike this 
will get processed . Request will be like " 111.domain.com 
  " or " snap.domain.com 
 " .


  My aim is to process all the domains names like this . How will 
I achieve this  ? Please help me if this is possible . Thanks in advance .



*/Thanks & Regards/*
/Sasmita Panda/
/Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


___
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 2.1 call_center queue position

2016-12-23 Thread Bogdan-Andrei Iancu

Hi Jonathan,

A Merry Christmas to you too !

I found a small mistake in the original patch I sent you. Please revert 
that one and use this new patch (see attachment). Let me know if it does 
the trick.


Regards,

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

On 22.12.2016 13:58, Jonathan Hunter wrote:


Hi Bogdan,


Merry Christmas to you and the mailing list!


I am testing the real queue position, and with one call in progress, 
and then 2 subsequent calls, both of which hit the hold music loop, I 
unfortunately dont see the position value increment, it remains at 
cc_pos=0 for all the calls, this is with just one queue defined to 
keep things very  simple.



Please let me know what debug or information you require, here are 
some outputs;





opensipsctl fifo cc_list_calls
Call:: 255.0 Ref=2 State=queued Call Time=2 Flow=Cust1
Call:: 884.0 Ref=2 State=queued Call Time=51 Flow=Cust1
Call:: 344.0 Ref=1 State=toagent Call Time=70 Flow=Cust1 Agent=2000

opensipsctl fifo cc_list_agents
Agent:: 2000 Ref=1 Loged in=YES State=incall

opensipsctl fifo cc_list_flows
Flow:: Cust1 Avg Call Duration=199 Processed Calls=3 Logged Agents=1 
Ongoing Calls=3 Ref=3


opensipsctl fifo cc_list_queue
Call:: 0 Waiting for=114 ETW=0
Flow:: Cust1 Priority=256 Skill=custcare
Call:: 1 Waiting for=65 ETW=199
Flow:: Cust1 Priority=256 Skill=custcare

Many thanks

Jon





*From:* Bogdan-Andrei Iancu 
*Sent:* 07 November 2016 20:41
*To:* Jonathan Hunter; OpenSIPS users mailling list
*Subject:* Re: [OpenSIPS-Users] opensips 2.1 call_center queue position
Hi Jonathan,

I was not able to test it with a real queue, so let me know if it 
really does the job (in terms of reporting the real position in the 
queue).


Some questions:
1) currently I add that value only when sending to the queue / MOH - 
do you foresee any need to be added for other announcements like for 
welcome ?


2) will it be useful to add the ETW (estimate time to wait) ? is it 
useful ?


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













diff --git a/modules/call_center/cc_data.c b/modules/call_center/cc_data.c
index 45112e8..55af6ec 100755
--- a/modules/call_center/cc_data.c
+++ b/modules/call_center/cc_data.c
@@ -915,7 +915,7 @@ void print_queue(struct cc_data *data)
 }
 
 
-void cc_queue_push_call(struct cc_data *data, struct cc_call *call, int top)
+int cc_queue_push_call(struct cc_data *data, struct cc_call *call, int top)
 {
 	struct cc_call *call_it;
 	int n = 0;
@@ -971,6 +971,8 @@ void cc_queue_push_call(struct cc_data *data, struct cc_call *call, int top)
 
 	if (call->queue_start==0)
 		call->queue_start = get_ticks();
+
+	return data->queue.calls_no-1-n;
 }
 
 
diff --git a/modules/call_center/cc_data.h b/modules/call_center/cc_data.h
index e2cf62c..14ebf37 100755
--- a/modules/call_center/cc_data.h
+++ b/modules/call_center/cc_data.h
@@ -227,7 +227,7 @@ void clean_cc_old_data(struct cc_data *data);
 
 void clean_cc_unref_data(struct cc_data *data);
 
-void cc_queue_push_call(struct cc_data *data, struct cc_call *call, int top);
+int cc_queue_push_call(struct cc_data *data, struct cc_call *call, int top);
 
 struct cc_call *cc_queue_pop_call_for_agent(struct cc_data *data,
 		struct cc_agent *agent);
diff --git a/modules/call_center/cc_queue.c b/modules/call_center/cc_queue.c
index 757bcf3..3956eb4 100644
--- a/modules/call_center/cc_queue.c
+++ b/modules/call_center/cc_queue.c
@@ -24,6 +24,7 @@
  *  2014-03-17 initial version (bogdan)
  */
 
+#include "../../ut.h"
 #include "cc_queue.h"
 
 extern stat_var *stg_terminated_calls;
@@ -40,6 +41,7 @@ int cc_call_state_machine(struct cc_data *data, struct cc_call *call,
 	struct cc_agent *agent;
 	str *out = NULL;
 	int state =0;
+	int pos = -1;
 
 	switch (call->state) {
 		case CC_CALL_NONE:
@@ -81,7 +83,7 @@ int cc_call_state_machine(struct cc_data *data, struct cc_call *call,
 	break;
 }
 /* add it to queue */
-cc_queue_push_call( data, call, 0);
+pos = cc_queue_push_call( data, call, 0);
 			}
 			break;
 		case CC_CALL_TOAGENT:
@@ -94,10 +96,20 @@ int cc_call_state_machine(struct cc_data *data, struct cc_call *call,
 	}
 
 	if (out) {
-		leg->s = (char*)pkg_malloc( out->len );
+		int l=0;
+		char *s;
+		if (pos>=0)
+			s=int2str((unsigned long)pos, &l);
+		leg->s = (char*)pkg_malloc( out->len + ((pos<0)?0:(8+l)) );
 		if (leg->s) {
 			leg->len = out->len;
 			memcpy(leg->s,out->s,out->len);
+			if (pos>=0) {
+memcpy(leg->s+leg->len, ";cc_pos=",8);
+leg->len += 8;
+memcpy(leg->s+leg->len, s, l);
+leg->len += l;
+			}
 			call->prev_state = call->state;
 			call->state = state;
 			return 0;
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] uac_replace_from and top_hiding

2016-12-23 Thread Denis via Users
Ok, thank you. -- С уважением, Денис.Best regards, Denis 23.12.2016, 15:56, "Răzvan Crainea" :Hi, Denis!No, topology_hiding is not meant to change the From and To domains. If you want to change them, you have to do it explicitely in the script using the uac_replace_from/to() functions. There are no incompatibilities between topology_hiding and these functions, they should work just fine.Best regards,Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.comOn 12/23/2016 02:49 PM, Denis via Users wrote:Hello! I wander is there any reason to use uac_replace_from function with top_hiding? Or this will not work?Because top_hiding doesn`t change "From domain" field. -- С уважением, Денис.Best regards, Denis___
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


Re: [OpenSIPS-Users] uac_replace_from and top_hiding

2016-12-23 Thread Răzvan Crainea

Hi, Denis!

No, topology_hiding is not meant to change the From and To domains. If 
you want to change them, you have to do it explicitely in the script 
using the uac_replace_from/to() functions. There are no 
incompatibilities between topology_hiding and these functions, they 
should work just fine.


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 12/23/2016 02:49 PM, Denis via Users wrote:

Hello!
I wander is there any reason to use uac_replace_from function with 
top_hiding? Or this will not work?

Because top_hiding doesn`t change "From domain" field.
--
С уважением, Денис.
Best regards, Denis


___
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] uac_replace_from and top_hiding

2016-12-23 Thread Denis via Users
Hello! I wander is there any reason to use uac_replace_from function with top_hiding? Or this will not work?Because top_hiding doesn`t change "From domain" field. -- С уважением, Денис.Best regards, Denis   

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


[OpenSIPS-Users] rtpproxy 2.0 and extractaudio

2016-12-23 Thread Denis
Hello! I want to ask about extractaudio. Is there any manual for it? How can i use it?Has anybody operation experience of this soft? Thank you. -- С уважением, Денис.Best regards, Denis   

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


Re: [OpenSIPS-Users] Opensips crash

2016-12-23 Thread Denis
I understand, thank you. -- С уважением, Денис.Best regards, Denis 23.12.2016, 13:13, "Răzvan Crainea" :Hi, Denis!It's not OpenSIPS making the core, it's the Operating System. And the answer is "yes", if OpenSIPS crashes again, the "old core" will be replaced by a new one. One idea is to configure the Operating System to write the corefile using the pid of the process in the pattern. To do that, run:# echo core.%p > /proc/sys/kernel/core_patternBest regards,Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.comOn 12/23/2016 11:35 AM, Denis wrote:One question. If in the destination directory of the core file will be located another "core" file, what will be? Would "old core" file be replaced by a new one, or Opensips makes another core file with a fresh data? Thank you. -- С уважением, Денис.Best regards, Denis 23.12.2016, 12:23, "Răzvan Crainea" :Please update to the latest 2.2.2. If you still have problems, try to make sure opensips can generate a corefile[1].[1] http://www.opensips.org/Documentation/TroubleShooting-CrashBest regards,Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.comOn 12/23/2016 11:16 AM, Denis wrote:Hello! Server:: OpenSIPS (2.2.1 (x86_64/linux)) Today i had a crash of Opensips.Everything that i could collect is here https://yadi.sk/i/dyNnXpBr34YJQ3 Unfortunately, i could not find any fresh core file, despite of the fact that Opensips starts with -w /opensipscore option.In opensipscore i found only core file at 29 Nov. Thank you for any help.  -- С уважением, Денис.Best regards, Denis___
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 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] Opensips crash

2016-12-23 Thread Miha

Hey Denis

https://www.opensips.org/Documentation/TroubleShooting-Crash

it will create core.


miha

On 23/12/2016 10:35, Denis wrote:
One question. If in the destination directory of the core file will be 
located another "core" file, what will be? Would "old core" file be 
replaced by a new one, or Opensips makes another core file with a 
fresh data?

Thank you.
--
С уважением, Денис.
Best regards, Denis
23.12.2016, 12:23, "Răzvan Crainea" :
Please update to the latest 2.2.2. If you still have problems, try to 
make sure opensips can generate a corefile[1].


[1] http://www.opensips.org/Documentation/TroubleShooting-Crash

Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com 
On 12/23/2016 11:16 AM, Denis wrote:

Hello!

Server:: OpenSIPS (2.2.1 (x86_64/linux))
Today i had a crash of Opensips.
Everything that i could collect is here 
https://yadi.sk/i/dyNnXpBr34YJQ3
Unfortunately, i could not find any fresh core file, despite of the 
fact that Opensips starts with -w /opensipscore option.

In opensipscore i found only core file at 29 Nov.
Thank you for any help.
--
С уважением, Денис.
Best regards, Denis

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

,

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




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


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


Re: [OpenSIPS-Users] Opensips crash

2016-12-23 Thread Răzvan Crainea

Hi, Denis!

It's not OpenSIPS making the core, it's the Operating System. And the 
answer is "yes", if OpenSIPS crashes again, the "old core" will be 
replaced by a new one. One idea is to configure the Operating System to 
write the corefile using the pid of the process in the pattern. To do 
that, run:

# echo core.%p > /proc/sys/kernel/core_pattern

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 12/23/2016 11:35 AM, Denis wrote:
One question. If in the destination directory of the core file will be 
located another "core" file, what will be? Would "old core" file be 
replaced by a new one, or Opensips makes another core file with a 
fresh data?

Thank you.
--
С уважением, Денис.
Best regards, Denis
23.12.2016, 12:23, "Răzvan Crainea" :
Please update to the latest 2.2.2. If you still have problems, try to 
make sure opensips can generate a corefile[1].


[1] http://www.opensips.org/Documentation/TroubleShooting-Crash

Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com 
On 12/23/2016 11:16 AM, Denis wrote:

Hello!

Server:: OpenSIPS (2.2.1 (x86_64/linux))
Today i had a crash of Opensips.
Everything that i could collect is here 
https://yadi.sk/i/dyNnXpBr34YJQ3
Unfortunately, i could not find any fresh core file, despite of the 
fact that Opensips starts with -w /opensipscore option.

In opensipscore i found only core file at 29 Nov.
Thank you for any help.
--
С уважением, Денис.
Best regards, Denis

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

,

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




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


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


Re: [OpenSIPS-Users] Opensips crash

2016-12-23 Thread Denis
One question. If in the destination directory of the core file will be located another "core" file, what will be? Would "old core" file be replaced by a new one, or Opensips makes another core file with a fresh data? Thank you. -- С уважением, Денис.Best regards, Denis 23.12.2016, 12:23, "Răzvan Crainea" :Please update to the latest 2.2.2. If you still have problems, try to make sure opensips can generate a corefile[1].[1] http://www.opensips.org/Documentation/TroubleShooting-CrashBest regards,Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.comOn 12/23/2016 11:16 AM, Denis wrote:Hello! Server:: OpenSIPS (2.2.1 (x86_64/linux)) Today i had a crash of Opensips.Everything that i could collect is here https://yadi.sk/i/dyNnXpBr34YJQ3 Unfortunately, i could not find any fresh core file, despite of the fact that Opensips starts with -w /opensipscore option.In opensipscore i found only core file at 29 Nov. Thank you for any help.  -- С уважением, Денис.Best regards, Denis___
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


Re: [OpenSIPS-Users] Opensips crash

2016-12-23 Thread Răzvan Crainea
Please update to the latest 2.2.2. If you still have problems, try to 
make sure opensips can generate a corefile[1].


[1] http://www.opensips.org/Documentation/TroubleShooting-Crash

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 12/23/2016 11:16 AM, Denis wrote:

Hello!

Server:: OpenSIPS (2.2.1 (x86_64/linux))
Today i had a crash of Opensips.
Everything that i could collect is here https://yadi.sk/i/dyNnXpBr34YJQ3
Unfortunately, i could not find any fresh core file, despite of the 
fact that Opensips starts with -w /opensipscore option.

In opensipscore i found only core file at 29 Nov.
Thank you for any help.
--
С уважением, Денис.
Best regards, Denis



___
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 crash

2016-12-23 Thread Denis
Hello! Server:: OpenSIPS (2.2.1 (x86_64/linux)) Today i had a crash of Opensips.Everything that i could collect is here https://yadi.sk/i/dyNnXpBr34YJQ3 Unfortunately, i could not find any fresh core file, despite of the fact that Opensips starts with -w /opensipscore option.In opensipscore i found only core file at 29 Nov. Thank you for any help.  -- С уважением, Денис.Best regards, Denis   

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


Re: [OpenSIPS-Users] Using Redis with OpenSIPS 2.1.5 error

2016-12-23 Thread Răzvan Crainea

Hi, Sami!

Did you compile OpenSIPS redis with a different compiler, or with gcc 5.4?
Can you apply this patch[1] and test again?

[1] 
https://github.com/OpenSIPS/opensips/commit/25502536bb2cd03088b83c4997062841a5a238b1.patch


Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 12/22/2016 07:52 PM, Sami Montour wrote:


Hello Everyone,

  I am trying to use Redis with OpenSIPS 2.1.5 but I am getting an 
error (see below) indicating that OpenSIPS is not able to load the 
module (cachedb_redis.so). As you can see from my printout below, the 
module does exist in the module library directory. Below is my 
configuration about Redis, OpenSIPS, and the error.


Any help is very much appreciated. Thanks.



# opensips -c

Dec 21 11:39:04 [15262] ERROR:core:sr_load_module: could not open module

:

/usr/local/opensips/lib64/opensips/modules/cachedb_redis.so: undefined

symbol: get_redis_connection

Dec 21 11:39:04 [15262] ERROR:core:load_module: failed to load module 
Dec 21 11:39:04 [15262] CRITICAL:core:yyerror: parse error in config 
file /usr/local/opensips//etc/opensips/opensips.cfg, line 158, column


13-14: failed to load module cachedb_redis.so

Dec 21 11:39:04 [15262] ERROR:core:set_mod_param_regex: no module 
matching cachedb_redis found Dec 21 11:39:04 [15262] 
CRITICAL:core:yyerror: parse error in config file 
/usr/local/opensips//etc/opensips/opensips.cfg, line 159, column


18-19: Parameter  not found in module  - 
can't set Dec 21 11:39:04 [15262] ERROR:core:main: bad config file (2 
errors)


# ll /usr/local/opensips/lib64/opensips/modules/cachedb_redis.so

-rwxr-xr-x 1 root root 209608 Dec 21 11:16 
/usr/local/opensips/lib64/opensips/modules/cachedb_redis.so




opensips.cfg

 CacheDB Redis module

loadmodule "cachedb_redis.so"

modparam("cachedb_redis","cachedb_url","redis:group1://localhost:6379/")



# dpkg -l | grep redis

ii  libhiredis-dev:amd64 0.13.3-2

amd64

ii  libhiredis0.13:amd64 0.13.3-2

amd64

ii  redis-server 2:3.0.6-1 amd64

ii  redis-tools 2:3.0.6-1 amd64



# opensips -V

version: opensips 2.1.5 (x86_64/linux)

flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
F_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_lt, epoll_et, 
sigio_rt, select.


git revision: e381dd5

main.c compiled on 11:14:40 Dec 21 2016 with gcc 5.4.0



# uname -a

Linux rainier 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC

2016 x86_64 x86_64 x86_64 GNU/Linux



___
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