Re: [SR-Users] msilo

2016-11-15 Thread Daniel-Constantin Mierla
Hello,

for me it is fine to add a new parameter to m_store() that takes the
body content.

Are you asking for more details of how can be done?

Cheers,
Daniel

On 13/11/16 07:08, Slava Bendersky wrote:
> Hello Everyone,
> I asking question/request to add improvement for msilo module where
> will have ability set $avp(i:body) in mod params.  That will allow use
> it in m_store() by specifying  body message $avp.  In my case
> registration is on B2BUA so kamailio pass through/proxy  to
> destination. In order to check user status online/offline kamailio
> wait for reply from B2BUA on MESSAGE status if it return error 503
> that mean user offline and m_store(0 should store message in db, but
> the issue that error 503 is in final stage and MESSAGE body is not
> available any more.  The improvement  will allow specify  body $var in
> m_store() so new way will be m_store($tu, $avp(body)). 
>
> Any help thank you.
>
> Slava.
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RTPProxy benchmark

2016-11-15 Thread Daniel-Constantin Mierla
Are you ending the rtp proxy sessions when the call are ended? What
rtpproxy functions are you using in the configuration file?

Cheers,
Daniel


On 14/11/16 18:18, Gholamreza Sabery wrote:
> No not the first time. But over time. I rebooted my system and error
> is gone! It seems that it happens over time.
>
> On Mon, Nov 14, 2016 at 6:12 PM, Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Are you getting the error first time when you reach first 1900
> sessions? Or after a while, after some previous sessions are ended?
>
> Cheers,
> Daniel
>
>
> On 14/11/16 11:19, Gholamreza Sabery wrote:
>> I already set these parameters:
>>
>> rtpproxy -m 5000 -M 65000
>>
>> As well limits for number of open files are set to 100
>> (ulimit -n). When I increased log level of RTPProxy I saw:
>> ERR:create_twinlistener:GENERAL: can't create IPv4 socket: Too
>> many open files in system
>>
>>
>> On Mon, Nov 14, 2016 at 1:46 PM, Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>> wrote:
>>
>> Hello,
>>
>> first thing to look at is the port range. There are some
>> parameter that you can provide to rtpproxy in command line in
>> order to increase the range of port it can use -- see
>> 'rtpproxy -h' or 'man rtpproxy'.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 14/11/16 11:14, Gholamreza Sabery wrote:
>>> Dear Daniel:
>>>
>>> I used a single RTPProxy instance. RTPProxy version =
>>> 20040107. And yes there was traffic for all calls but
>>> traffic is one-way. One leg sends the call and the other
>>> just receives it.
>>>
>>> On Mon, Nov 14, 2016 at 1:40 PM, Daniel-Constantin Mierla
>>> mailto:mico...@gmail.com>> wrote:
>>>
>>> Hello,
>>>
>>> have you used a single rtpproxy instance? Was there RTP
>>> traffic for all 1900 calls? Is this with rtpproxy 1.2 or
>>> 2.0?
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 14/11/16 10:44, Gholamreza Sabery wrote:
 I managed to create about 1900 concurrent calls using a
 single Kamailio and RTPProxy server. But after this
 number RTPProxy returns 0 and the following error is
 shown in the Kamailio log files:

 incorrect port 0 in reply from rtp proxy
 What is the problem here? Also number of file
 descriptors that RTPProxy can use are set to a million.



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users 
 mailing list
 sr-users@lists.sip-router.org
 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
>>>
>>> -- 
>>> Daniel-Constantin Mierla
>>> http://twitter.com/#!/miconda
>>>  - 
>>> http://www.linkedin.com/in/miconda
>>> 
>>> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 
>>> http://www.asipto.com
>>>
>>> ___ SIP
>>> Express Router (SER) and Kamailio (OpenSER) - sr-users
>>> mailing list sr-users@lists.sip-router.org
>>> 
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>> 
>>>
>>>
>> -- 
>> Daniel-Constantin Mierla
>> http://twitter.com/#!/miconda  - 
>> http://www.linkedin.com/in/miconda
>> 
>> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 
>> http://www.asipto.com
>>
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
> 
> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 
> http://www.asipto.com
>
-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"

2016-11-15 Thread Daniel-Constantin Mierla
Hello,


iirc, the dots where used in MI protocol to provide empty values for
parameters. Can you try in json with "" values instead of the dots, or
enclose the dots in double quotes so the json document is valid?


Cheers,
Daniel


On 14/11/16 21:04, Jonathan Hunter wrote:
> Hi Daniel,
>
> I am just trying to put the mi command into jsonrpc_exec and looking
> at the documentation, Im not sure in this instance how to put down
> multiple parameters.
>
> Running this command works in command line;
>
> kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112  . .
> \"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\""
>
> However if I then look to run it, I have tried the following (amongst
> other variations);
>
>
> jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg",
> "INFO",
> "sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}');
>
> I get;
>
> ERROR: jsonrpc-s [jsonrpc-s_mod.c:1129]: jsonrpc_exec_ex(): invalid
> json doc [[{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg",
> "INFO",
> "sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}]]
>
> Can you give me some clues on how to input the params as its not clear
> to me from kamailio or json rpc docs.
>
>
>
> Many thanks
>
> Jon
>
>
>
>
> 
> *From:* Daniel-Constantin Mierla 
> *Sent:* 17 October 2016 09:45
> *To:* Jonathan Hunter; Kamailio SER - Users Mailing List
> *Subject:* Re: [SR-Users] Send SIP Info within a dialog using
> $uac_req(method)="INFO"
>  
>
> Hello,
>
> if you want to run an MI command over RPC, you have to use 'mi' as the
> rpc command and the MI command as the first parameter, followed by the
> rest of the parameters for the command.
>
> Cheers,
> Daniel
>
>
> On 14/10/16 14:23, Jonathan Hunter wrote:
>> Hi Daniel,
>>
>> Also I am trying to fire that command using jsonrpc_exec and I keep
>> getting;
>>
>>
>> jsonrpc_exec_ex(): method callback not found [t_uac_dlg]
>>
>> I have tried with t.uac_dlg and get the same response, can you let me
>> know if this command is support with this module on 4.3 please and if
>> so what am I doing wrong with the syntax?
>>
>> Thanks
>>
>> Jon
>>
>> 
>> From: hunter...@hotmail.com
>> To: mico...@gmail.com; sr-users@lists.sip-router.org
>> Date: Fri, 14 Oct 2016 08:52:25 +
>> Subject: Re: [SR-Users] Send SIP Info within a dialog using
>> $uac_req(method)="INFO"
>>
>> Hi Daniel,
>>
>> Thanks for the response, sorry I must of missed this!
>>
>> I was thinking of using the t_uac_dlg command to generate the INFO
>> message, but will this allow me to do it within an established INVITE
>> dialog?
>>
>> I am just worried that changing the CSEQ value will cause issues, so
>> am I better looking to modify in a B2BUA rather than the proxy, or
>> will the dialog module handle this?
>>
>> Thanks
>>
>> Jon
>>
>>
>> 
>> To: sr-users@lists.sip-router.org
>> From: mico...@gmail.com
>> Date: Thu, 6 Oct 2016 12:41:32 +0200
>> Subject: Re: [SR-Users] Send SIP Info within a dialog using
>> $uac_req(method)="INFO"
>>
>> Hello,
>> uac_req_send() is able to send only initial requests (with follow up
>> on auth challenge). It doesn't expose the ability to send requests
>> within a dialog -- the functions exist in c (tm module), but not
>> availble in config.
>> On the other hand, there should be a mi/rpc command exported by tm
>> module that allows that -- it may be possible to do it from config
>> file via jsonrpc-s module.
>> Cheers,
>> Daniel
>>
>>
>> On 29/09/16 21:41, Jonathan Hunter wrote:
>>
>> Hi Guys,
>>
>> Is it still the case that when using uac_req_send, you cant send withing 
>> a specific dialog?
>>
>> I can modify call-id, but I presume tags may be more of a problem?
>>
>> See old post below from 2015;
>>
>> >/I am familiar with uac_req_send. but how do I send it with in a 
>> />/specific dialog and with data in the INFO req ? /sending a new request 
>> inside a dialog is not possible with
>> uac_req_send(). It is not easy over all because you change the sequence
>> order (CSeq value). Practically, you need to track how many requests you
>> sent from the middle to update (and restore in reply) when caller or
>> callee sends a new request.
>>
>> dialog module can track changes in CSeq for requests sent to callee,
>> being used now for authentication of INVITE to another provider, when
>> Kamailio adds the credentials. But for more you would need to extend the
>> dialog module.
>>
>> I just need to send a SIP info within an established dialog to stop some 
>> function up stream, so wondered if this is still a blocker?
>>
>> Many thanks
>>
>> Jon
>>
>>
>>
>> 

Re: [SR-Users] INVITE timeout timer

2016-11-15 Thread Daniel-Constantin Mierla
Do you have any failure route trying new destinations?

A sip trace (e.g., ngrep output with -t on port 5060) for such case will
help to see what happens.

Also, be sure you have no t_set_fr() that overwrites the value from
parameters.

Not related, but I noticed that the comment doesn't match the behaviour for:

# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 0)

It should be 3 to behave as the comment says.

Cheers,
Daniel

On 15/11/16 02:09, Diogenes Aviles wrote:
> I have changed the following tm parameters in order to have an timeout
> INVITE equal to 20 sec (2 ms).
> # - tm params -
> # auto-discard branches from previous serial forking leg
> modparam("tm", "failure_reply_mode", 0)
> # default retransmission timeout: 20sec
> modparam("tm", "fr_timer", 2)
> # default invite retransmission timeout after 1xx: 120sec
> modparam("tm", "fr_inv_timer", 12)
>
> However, the timeout is ever  3 min (180 sec.)
> In accord to tm module the timeout is defined only by "r_timer"
> Then, I don't know where is the problem.
>
> Thanks a lot for your help.
>
> -- 
> Diogenes
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [CFP] FOSDEM 2017, RTC devroom, speakers, volunteers neeeded

2016-11-15 Thread Daniel-Constantin Mierla
Hello,

a short reminder for those interested in submitting a talk proposal for
FOSDEM 2017 -- see the details in the initial email.

Cheers,
Daniel


On 24/10/16 11:09, FOSDEM RTC Team wrote:
> FOSDEM is one of the world's premier meetings of free software developers,
> with over five thousand people attending each year.  FOSDEM 2017
> takes place 4-5 February 2017 in Brussels, Belgium.  https://fosdem.org
>
> This email contains information about:
> - Real-Time communications dev-room and lounge,
> - speaking opportunities,
> - volunteering in the dev-room and lounge,
> - related events around FOSDEM, including the XMPP summit,
> - social events (the legendary FOSDEM Beer Night and Saturday night dinners
> provide endless networking opportunities),
> - the Planet aggregation sites for RTC blogs
>
> Call for participation - Real Time Communications (RTC)
> ===
>
> The Real-Time dev-room and Real-Time lounge is about all things involving
> real-time communication, including: XMPP, SIP, WebRTC, telephony,
> mobile VoIP, codecs, peer-to-peer, privacy and encryption.  The dev-room
> is a successor to the previous XMPP and telephony dev-rooms.
> We are looking for speakers for the dev-room and volunteers and
> participants for the tables in the Real-Time lounge.
>
> The dev-room is only on Saturday, 4 February 2017.  The lounge will
> be present for both days.
>
> To discuss the dev-room and lounge, please join the FSFE-sponsored
> Free RTC mailing list: https://lists.fsfe.org/mailman/listinfo/free-rtc
>
> To be kept aware of major developments in Free RTC, without being on the
> discussion list, please join the Free-RTC Announce list:
> http://lists.freertc.org/mailman/listinfo/announce
>
> Speaking opportunities
> --
>
> Note: if you used FOSDEM Pentabarf before, please use the same 
> account/username
>
> Real-Time Communications dev-room: deadline 23:59 UTC on 17 November.
> Please use the Pentabarf system to submit a talk proposal for the
> dev-room.  On the "General" tab, please look for the "Track" option and
> choose "Real-Time devroom".  https://penta.fosdem.org/submission/FOSDEM17/
>
> Other dev-rooms and lightning talks: some speakers may find their topic is
> in the scope of more than one dev-room.  It is encouraged to apply to more
> than one dev-room and also consider proposing a lightning talk, but please
> be kind enough to tell us if you do this by filling out the notes in the form.
> You can find the full list of dev-rooms at
>https://www.fosdem.org/2017/schedule/tracks/
> and apply for a lightning talk at https://fosdem.org/submit
>
> Main track: the deadline for main track presentations is 23:59 UTC
> 31 October.  Leading developers in the Real-Time Communications
> field are encouraged to consider submitting a presentation to
> the main track at https://fosdem.org/submit
>
> First-time speaking?
> 
>
> FOSDEM dev-rooms are a welcoming environment for people who have never
> given a talk before.  Please feel free to contact the dev-room administrators
> personally if you would like to ask any questions about it.
>
> Submission guidelines
> -
>
> The Pentabarf system will ask for many of the essential details.  Please
> remember to re-use your account from previous years if you have one.
>
> In the "Submission notes", please tell us about:
> - the purpose of your talk
> - any other talk applications (dev-rooms, lightning talks, main track)
> - availability constraints and special needs
>
> You can use HTML and links in your bio, abstract and description.
>
> If you maintain a blog, please consider providing us with the
> URL of a feed with posts tagged for your RTC-related work.
>
> We will be looking for relevance to the conference and dev-room themes,
> presentations aimed at developers of free and open source software about
> RTC-related topics.
>
> Please feel free to suggest a duration between 20 minutes and 55 minutes
> but note that the final decision on talk durations will be made by the
> dev-room administrators.  As the two previous dev-rooms have been
> combined into one, we may decide to give shorter slots than in previous
> years so that more speakers can participate.
>
> Please note FOSDEM aims to record and live-stream all talks.
> The CC-BY license is used.
>
> Volunteers needed
> =
>
> To make the dev-room and lounge run successfully, we are looking for
> volunteers:
>
> - FOSDEM provides video recording equipment and live streaming,
>   volunteers are needed to assist in this
> - organizing one or more restaurant bookings (dependending upon number of
>   participants) for the evening of Saturday, 4 February
> - participation in the Real-Time lounge
> - helping attract sponsorship funds for the dev-room to pay for the
>   Saturday night dinner and any other expenses
> - circulating this Call for Participation to other mailing lists
>
> See t

[SR-Users] How to get Destination port UDP

2016-11-15 Thread andrzej.ciupek-asterisk.edu.pl

Hello

My point is to log INVITEs in my Network. My SIP Network work on port 
6060.
Im am using HEP to do that, and hep clients that are listening on port 
range 5060-6066 to detect some SIP attack to port 5060 and others.
But when I have attack to port 5060 I don't want to insert that INVITE 
to my "good traffic" table, but place it to "fraud" table.


Some devices like Panasonic PBX send INVITE to port 6060 so it is "good 
traffic" but there is no port 6060 in URI, so I can't detect it in right 
way, because $dp or $rp are 5060 by default.


This kamailio work as capture server as "promiscuous_on", so I can't use 
any "force_rport" etc. because I am only listening. Tcpdump for that SIP 
session show me that client send traffic to 6060, but I can't get that 
information from INVITE header.


Greetings

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RTPProxy benchmark

2016-11-15 Thread Dragos Oancea
Hi

Increase fs.file-max in your /etc/sysctl.conf .
eg: fs.file-max = 5
And then do sysctl -p
Decrease SILENT_TIMEOUT in your rtpengine.conf (eg:SILENT_TIMEOUT=120) -
it's default 1 hour and if some calls don't have media then rtpengine
will just keep the UDP ports in use until this timeout expires.

Regards,
Dragos


On 15/11/2016 09:01, Daniel-Constantin Mierla wrote:
> Are you ending the rtp proxy sessions when the call are ended? What
> rtpproxy functions are you using in the configuration file?
> 
> Cheers,
> Daniel
> 
> 
> On 14/11/16 18:18, Gholamreza Sabery wrote:
>> No not the first time. But over time. I rebooted my system and error
>> is gone! It seems that it happens over time.
>>
>> On Mon, Nov 14, 2016 at 6:12 PM, Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>> wrote:
>>
>> Are you getting the error first time when you reach first 1900
>> sessions? Or after a while, after some previous sessions are ended?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 14/11/16 11:19, Gholamreza Sabery wrote:
>>> I already set these parameters:
>>>
>>> rtpproxy -m 5000 -M 65000
>>>
>>> As well limits for number of open files are set to 100
>>> (ulimit -n). When I increased log level of RTPProxy I saw:
>>> ERR:create_twinlistener:GENERAL: can't create IPv4 socket: Too
>>> many open files in system
>>>
>>>
>>> On Mon, Nov 14, 2016 at 1:46 PM, Daniel-Constantin Mierla
>>> mailto:mico...@gmail.com>> wrote:
>>>
>>> Hello,
>>>
>>> first thing to look at is the port range. There are some
>>> parameter that you can provide to rtpproxy in command line in
>>> order to increase the range of port it can use -- see
>>> 'rtpproxy -h' or 'man rtpproxy'.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 14/11/16 11:14, Gholamreza Sabery wrote:
 Dear Daniel:

 I used a single RTPProxy instance. RTPProxy version =
 20040107. And yes there was traffic for all calls but
 traffic is one-way. One leg sends the call and the other
 just receives it.

 On Mon, Nov 14, 2016 at 1:40 PM, Daniel-Constantin Mierla
 mailto:mico...@gmail.com>> wrote:

 Hello,

 have you used a single rtpproxy instance? Was there RTP
 traffic for all 1900 calls? Is this with rtpproxy 1.2 or
 2.0?

 Cheers,
 Daniel


 On 14/11/16 10:44, Gholamreza Sabery wrote:
> I managed to create about 1900 concurrent calls using a
> single Kamailio and RTPProxy server. But after this
> number RTPProxy returns 0 and the following error is
> shown in the Kamailio log files:
>
> incorrect port 0 in reply from rtp proxy
> What is the problem here? Also number of file
> descriptors that RTPProxy can use are set to a million.
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users 
> mailing list
> sr-users@lists.sip-router.org
> 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
> 

 -- 
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda
  - 
 http://www.linkedin.com/in/miconda
 
 Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 
 http://www.asipto.com

 ___ SIP
 Express Router (SER) and Kamailio (OpenSER) - sr-users
 mailing list sr-users@lists.sip-router.org
 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 


>>> -- 
>>> Daniel-Constantin Mierla
>>> http://twitter.com/#!/miconda  - 
>>> http://www.linkedin.com/in/miconda
>>> 
>>> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 
>>> http://www.asipto.com
>>>
>> -- 
>> Daniel-Constantin Mierla
>> http://twitter.com/#!/miconda  - 
>> http://www.linkedin.com/in/miconda
>> 
>> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 
>> http://www.asipto.com
>>
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda - http://www.linkedin.com/i

Re: [SR-Users] How to get Destination port UDP

2016-11-15 Thread Carsten Bock
Hi,

how about checking $Rp
(http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#rp_-_received_port)?
That would show, on which port the packet was received

Thanks,
Carsten

2016-11-15 8:43 GMT+01:00 andrzej.ciupek-asterisk.edu.pl
:
> Hello
>
> My point is to log INVITEs in my Network. My SIP Network work on port 6060.
> Im am using HEP to do that, and hep clients that are listening on port range
> 5060-6066 to detect some SIP attack to port 5060 and others.
> But when I have attack to port 5060 I don't want to insert that INVITE to my
> "good traffic" table, but place it to "fraud" table.
>
> Some devices like Panasonic PBX send INVITE to port 6060 so it is "good
> traffic" but there is no port 6060 in URI, so I can't detect it in right
> way, because $dp or $rp are 5060 by default.
>
> This kamailio work as capture server as "promiscuous_on", so I can't use any
> "force_rport" etc. because I am only listening. Tcpdump for that SIP session
> show me that client send traffic to 6060, but I can't get that information
> from INVITE header.
>
> Greetings
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



-- 
Carsten Bock
CEO (Geschäftsführer)

ng-voice GmbH
Millerntorplatz 1
20359 Hamburg / Germany

http://www.ng-voice.com
mailto:cars...@ng-voice.com

Office +49 40 5247593-40
Fax +49 40 5247593-99

Sitz der Gesellschaft: Hamburg
Registergericht: Amtsgericht Hamburg, HRB 120189
Geschäftsführer: Carsten Bock
Ust-ID: DE279344284

Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
http://www.ng-voice.com/imprint/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RTPProxy benchmark

2016-11-15 Thread Gholamreza Sabery
Yes. I finish the session at the end of each call. Also I am using
rtpproxy_manage("r"). My configuration regarding RTPProxy is default config
which comes with Kamailio sample config file.

On Tue, Nov 15, 2016 at 11:44 AM, Dragos Oancea 
wrote:

> Hi
>
> Increase fs.file-max in your /etc/sysctl.conf .
> eg: fs.file-max = 5
> And then do sysctl -p
> Decrease SILENT_TIMEOUT in your rtpengine.conf (eg:SILENT_TIMEOUT=120) -
> it's default 1 hour and if some calls don't have media then rtpengine
> will just keep the UDP ports in use until this timeout expires.
>
> Regards,
> Dragos
>
>
> On 15/11/2016 09:01, Daniel-Constantin Mierla wrote:
> > Are you ending the rtp proxy sessions when the call are ended? What
> > rtpproxy functions are you using in the configuration file?
> >
> > Cheers,
> > Daniel
> >
> >
> > On 14/11/16 18:18, Gholamreza Sabery wrote:
> >> No not the first time. But over time. I rebooted my system and error
> >> is gone! It seems that it happens over time.
> >>
> >> On Mon, Nov 14, 2016 at 6:12 PM, Daniel-Constantin Mierla
> >> mailto:mico...@gmail.com>> wrote:
> >>
> >> Are you getting the error first time when you reach first 1900
> >> sessions? Or after a while, after some previous sessions are ended?
> >>
> >> Cheers,
> >> Daniel
> >>
> >>
> >> On 14/11/16 11:19, Gholamreza Sabery wrote:
> >>> I already set these parameters:
> >>>
> >>> rtpproxy -m 5000 -M 65000
> >>>
> >>> As well limits for number of open files are set to 100
> >>> (ulimit -n). When I increased log level of RTPProxy I saw:
> >>> ERR:create_twinlistener:GENERAL: can't create IPv4 socket: Too
> >>> many open files in system
> >>>
> >>>
> >>> On Mon, Nov 14, 2016 at 1:46 PM, Daniel-Constantin Mierla
> >>> mailto:mico...@gmail.com>> wrote:
> >>>
> >>> Hello,
> >>>
> >>> first thing to look at is the port range. There are some
> >>> parameter that you can provide to rtpproxy in command line in
> >>> order to increase the range of port it can use -- see
> >>> 'rtpproxy -h' or 'man rtpproxy'.
> >>>
> >>> Cheers,
> >>> Daniel
> >>>
> >>>
> >>> On 14/11/16 11:14, Gholamreza Sabery wrote:
>  Dear Daniel:
> 
>  I used a single RTPProxy instance. RTPProxy version =
>  20040107. And yes there was traffic for all calls but
>  traffic is one-way. One leg sends the call and the other
>  just receives it.
> 
>  On Mon, Nov 14, 2016 at 1:40 PM, Daniel-Constantin Mierla
>  mailto:mico...@gmail.com>> wrote:
> 
>  Hello,
> 
>  have you used a single rtpproxy instance? Was there RTP
>  traffic for all 1900 calls? Is this with rtpproxy 1.2 or
>  2.0?
> 
>  Cheers,
>  Daniel
> 
> 
>  On 14/11/16 10:44, Gholamreza Sabery wrote:
> > I managed to create about 1900 concurrent calls using a
> > single Kamailio and RTPProxy server. But after this
> > number RTPProxy returns 0 and the following error is
> > shown in the Kamailio log files:
> >
> > incorrect port 0 in reply from rtp proxy
> > What is the problem here? Also number of file
> > descriptors that RTPProxy can use are set to a million.
> >
> >
> >
> > ___
> > SIP Express Router (SER) and Kamailio (OpenSER) -
> sr-users mailing list
> > sr-users@lists.sip-router.org
> > 
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-
> users
> >  cgi-bin/mailman/listinfo/sr-users>
> 
>  --
>  Daniel-Constantin Mierla
>  http://twitter.com/#!/miconda
>   -
> http://www.linkedin.com/in/miconda
>  
>  Kamailio Advanced Training, Berlin, Nov 28-30, 2016 -
> http://www.asipto.com
> 
>  ___ SIP
>  Express Router (SER) and Kamailio (OpenSER) - sr-users
>  mailing list sr-users@lists.sip-router.org
>  
>  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-
> users
>   users>
> 
> 
> >>> --
> >>> Daniel-Constantin Mierla
> >>> http://twitter.com/#!/miconda 
> - http://www.linkedin.com/in/miconda
> >>> 
> >>>

Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"

2016-11-15 Thread Jonathan Hunter
Hi Daniel,


That works in terms of clearing the error, however I just see kamailio send a 
SIP info message to kamailio.org, as apposed to the RURI I provide, I presume 
again this will just be putting the t_uac_dlg parameters in the correct order?


Parameters:

  *   method - request method

  *   RURI - request SIP URI

  *   NEXT HOP - next hop SIP URI (OBP); use “.” if no value.

  *   socket - local socket to be used for sending the request; use “.” if no 
value.

  *   headers - set of additional headers to be added to the request; at least 
“From” and “To” headers must be specify)

  *   body - (optional, may not be present) request body (if present, requires 
the “Content-Type” and “Content-length” headers)

As looks like I am defining things correctly now but its not picking them up, 
again if I run manually it works in command line;


jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", 
"sip:3003@8.8.8.8",".",".","From:sip:1234@2.2.2.2","To:sip:3003@8.8.8.8","Contact:sip:1234@2.2.2.2"]}');

All I see it fire is an INFO message to Request-Line: INFO sip:kamailio.org 
SIP/2.0, with default parameters.



Thanks


Jon


From: Daniel-Constantin Mierla 
Sent: 15 November 2016 08:03
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,


iirc, the dots where used in MI protocol to provide empty values for 
parameters. Can you try in json with "" values instead of the dots, or enclose 
the dots in double quotes so the json document is valid?


Cheers,
Daniel

On 14/11/16 21:04, Jonathan Hunter wrote:
Hi Daniel,

I am just trying to put the mi command into jsonrpc_exec and looking at the 
documentation, Im not sure in this instance how to put down multiple parameters.

Running this command works in command line;

kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112  . . 
\"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\""

However if I then look to run it, I have tried the following (amongst other 
variations);


jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", 
"sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}');

I get;

ERROR: jsonrpc-s [jsonrpc-s_mod.c:1129]: jsonrpc_exec_ex(): invalid json doc 
[[{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", 
"sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}]]

Can you give me some clues on how to input the params as its not clear to me 
from kamailio or json rpc docs.



Many thanks

Jon





From: Daniel-Constantin Mierla 
Sent: 17 October 2016 09:45
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,

if you want to run an MI command over RPC, you have to use 'mi' as the rpc 
command and the MI command as the first parameter, followed by the rest of the 
parameters for the command.

Cheers,
Daniel

On 14/10/16 14:23, Jonathan Hunter wrote:
Hi Daniel,

Also I am trying to fire that command using jsonrpc_exec and I keep getting;


jsonrpc_exec_ex(): method callback not found [t_uac_dlg]

I have tried with t.uac_dlg and get the same response, can you let me know if 
this command is support with this module on 4.3 please and if so what am I 
doing wrong with the syntax?

Thanks

Jon


From: hunter...@hotmail.com
To: mico...@gmail.com; 
sr-users@lists.sip-router.org
Date: Fri, 14 Oct 2016 08:52:25 +
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"

Hi Daniel,

Thanks for the response, sorry I must of missed this!

I was thinking of using the t_uac_dlg command to generate the INFO message, but 
will this allow me to do it within an established INVITE dialog?

I am just worried that changing the CSEQ value will cause issues, so am I 
better looking to modify in a B2BUA rather than the proxy, or will the dialog 
module handle this?

Thanks

Jon



To: sr-users@lists.sip-router.org
From: mico...@gmail.com
Date: Thu, 6 Oct 2016 12:41:32 +0200
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"

Hello,
uac_req_send() is able to send only initial requests (with follow up on auth 
challenge). It doesn't expose the ability to send requests within a dialog -- 
the functions exist in c (tm module), but not availble in config.
On the other hand, there should be a mi/rpc command exported by tm module that 
allows that -- it may be possible to do it from config file via jsonrpc-s 
module.
C

Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"

2016-11-15 Thread Daniel-Constantin Mierla
Hello,


what do you mean by "with default parameters" in your last remark? Are
the To/From not taken from the rpc command?


Cheers,
Daniel


On 15/11/16 11:06, Jonathan Hunter wrote:
>
> Hi Daniel,
>
>
> That works in terms of clearing the error, however I just see kamailio
> send a SIP info message to kamailio.org, as apposed to the RURI I
> provide, I presume again this will just be putting the t_uac_dlg
> parameters in the correct order?
>
>
> Parameters:
>
>  *
>
> /method/ - request method
>
>  *
>
> /RURI/ - request SIP URI
>
>  *
>
> /NEXT HOP/ - next hop SIP URI (OBP); use “.” if no value.
>
>  *
>
> /socket/ - local socket to be used for sending the request;
> use “.” if no value.
>
>  *
>
> /headers/ - set of additional headers to be added to the request;
> at least “From” and “To” headers must be specify)
>
>  *
>
> /body/ - (optional, may not be present) request body (if present,
> requires the “Content-Type” and “Content-length” headers)
>
> As looks like I am defining things correctly now but its not picking
> them up, again if I run manually it works in command line;
>
>
> jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg",
> "INFO",
> "sip:3003@8.8.8.8",".",".","From:sip:1234@2.2.2.2","To:sip:3003@8.8.8.8","Contact:sip:1234@2.2.2.2"]}');
>
> All I see it fire is an INFO message to Request-Line: INFO
> sip:kamailio.org SIP/2.0, with default parameters.
>
>
> Thanks
>
>
> Jon
>
>
> 
> *From:* Daniel-Constantin Mierla 
> *Sent:* 15 November 2016 08:03
> *To:* Jonathan Hunter; Kamailio SER - Users Mailing List
> *Subject:* Re: [SR-Users] Send SIP Info within a dialog using
> $uac_req(method)="INFO"
>  
>
> Hello,
>
>
> iirc, the dots where used in MI protocol to provide empty values for
> parameters. Can you try in json with "" values instead of the dots, or
> enclose the dots in double quotes so the json document is valid?
>
>
> Cheers,
> Daniel
>
>
> On 14/11/16 21:04, Jonathan Hunter wrote:
>> Hi Daniel,
>>
>> I am just trying to put the mi command into jsonrpc_exec and looking
>> at the documentation, Im not sure in this instance how to put down
>> multiple parameters.
>>
>> Running this command works in command line;
>>
>> kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112  . .
>> \"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\""
>>
>> However if I then look to run it, I have tried the following (amongst
>> other variations);
>>
>>
>> jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg",
>> "INFO",
>> "sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}');
>>
>> I get;
>>
>> ERROR: jsonrpc-s [jsonrpc-s_mod.c:1129]: jsonrpc_exec_ex(): invalid
>> json doc [[{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg",
>> "INFO",
>> "sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}]]
>>
>> Can you give me some clues on how to input the params as its not
>> clear to me from kamailio or json rpc docs.
>>
>>
>>
>> Many thanks
>>
>> Jon
>>
>>
>>
>>
>> 
>> *From:* Daniel-Constantin Mierla 
>> *Sent:* 17 October 2016 09:45
>> *To:* Jonathan Hunter; Kamailio SER - Users Mailing List
>> *Subject:* Re: [SR-Users] Send SIP Info within a dialog using
>> $uac_req(method)="INFO"
>>  
>>
>> Hello,
>>
>> if you want to run an MI command over RPC, you have to use 'mi' as
>> the rpc command and the MI command as the first parameter, followed
>> by the rest of the parameters for the command.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 14/10/16 14:23, Jonathan Hunter wrote:
>>> Hi Daniel,
>>>
>>> Also I am trying to fire that command using jsonrpc_exec and I keep
>>> getting;
>>>
>>>
>>> jsonrpc_exec_ex(): method callback not found [t_uac_dlg]
>>>
>>> I have tried with t.uac_dlg and get the same response, can you let
>>> me know if this command is support with this module on 4.3 please
>>> and if so what am I doing wrong with the syntax?
>>>
>>> Thanks
>>>
>>> Jon
>>>
>>> 
>>> From: hunter...@hotmail.com
>>> To: mico...@gmail.com; sr-users@lists.sip-router.org
>>> Date: Fri, 14 Oct 2016 08:52:25 +
>>> Subject: Re: [SR-Users] Send SIP Info within a dialog using
>>> $uac_req(method)="INFO"
>>>
>>> Hi Daniel,
>>>
>>> Thanks for the response, sorry I must of missed this!
>>>
>>> I was thinking of using the t_uac_dlg command to generate the INFO
>>> message, but will this allow me to do it within an established
>>> INVITE dialog?
>>>
>>> I am just worried that changing the CSEQ value will cause issues, so
>>> am I better looking to modify in a B2BUA rather than the proxy, or
>>> will the dialog module handle this?
>>>
>>> Thanks
>>>
>>> Jon
>>>
>>>
>>> --

Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"

2016-11-15 Thread Jonathan Hunter
Hi,


Sorry Daniel, let me be clear.


Correct the To/From are not taken from the rpc command, the INFO is 
triggered/sent but with the To/From of the new request coming in;


Below I dial 07917190438 from ext 209 and this INFO is sent;



INFO sip:kamailio.org SIP/2.0
Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bK63d7.374d4573.0
To: 
From: ;tag=c32652d8e50f480c90e2f8379a0698aa-ea50
CSeq: 10 INFO
Call-ID: YWFhMmVmMzUxM2Q2YzUwMzZhOTFjNDc4OGZlYmM2N2I
Max-Forwards: 70
Content-Length: 0
User-Agent: HA PBX

However this command is triggered to send the INFO and the To/From/Contact are 
not changed/added;

jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", 
"sip:3003@8.8.8.8",".",".","From:sip:1234@2.2.2.2","To:sip:3003@8.8.8.8","Contact:sip:1234@2.2.2.2"]}');


I assumed (possibly incorrectly) you can get the command to overwrite the 
current contents of the headers, so as above the RURI would change to 
sip:3003@8.8.8.8 and the From to sip:1234@2.2.2.2 etc, however they remain 
unchanged.

Does that make sense?

Thanks

Jon







From: Daniel-Constantin Mierla 
Sent: 15 November 2016 10:12
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,


what do you mean by "with default parameters" in your last remark? Are the 
To/From not taken from the rpc command?


Cheers,
Daniel

On 15/11/16 11:06, Jonathan Hunter wrote:

Hi Daniel,


That works in terms of clearing the error, however I just see kamailio send a 
SIP info message to kamailio.org, as apposed to the RURI I provide, I presume 
again this will just be putting the t_uac_dlg parameters in the correct order?


Parameters:

  *   method - request method

  *   RURI - request SIP URI

  *   NEXT HOP - next hop SIP URI (OBP); use “.” if no value.

  *   socket - local socket to be used for sending the request; use “.” if no 
value.

  *   headers - set of additional headers to be added to the request; at least 
“From” and “To” headers must be specify)

  *   body - (optional, may not be present) request body (if present, requires 
the “Content-Type” and “Content-length” headers)

As looks like I am defining things correctly now but its not picking them up, 
again if I run manually it works in command line;


jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", 
"sip:3003@8.8.8.8",".",".","From:sip:1234@2.2.2.2","To:sip:3003@8.8.8.8","Contact:sip:1234@2.2.2.2"]}');

All I see it fire is an INFO message to Request-Line: INFO sip:kamailio.org 
SIP/2.0, with default parameters.



Thanks


Jon


From: Daniel-Constantin Mierla 
Sent: 15 November 2016 08:03
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,


iirc, the dots where used in MI protocol to provide empty values for 
parameters. Can you try in json with "" values instead of the dots, or enclose 
the dots in double quotes so the json document is valid?


Cheers,
Daniel

On 14/11/16 21:04, Jonathan Hunter wrote:
Hi Daniel,

I am just trying to put the mi command into jsonrpc_exec and looking at the 
documentation, Im not sure in this instance how to put down multiple parameters.

Running this command works in command line;

kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112  . . 
\"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\""

However if I then look to run it, I have tried the following (amongst other 
variations);


jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", 
"sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}');

I get;

ERROR: jsonrpc-s [jsonrpc-s_mod.c:1129]: jsonrpc_exec_ex(): invalid json doc 
[[{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", 
"sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}]]

Can you give me some clues on how to input the params as its not clear to me 
from kamailio or json rpc docs.



Many thanks

Jon





From: Daniel-Constantin Mierla 
Sent: 17 October 2016 09:45
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,

if you want to run an MI command over RPC, you have to use 'mi' as the rpc 
command and the MI command as the first parameter, followed by the rest of the 
parameters for the command.

Cheers,
Daniel

On 14/10/16 14:23, Jonathan Hunter wrote:
Hi Daniel,

Also I am trying to fire that command using jsonrpc_

Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"

2016-11-15 Thread Daniel-Constantin Mierla
Hello,


I looked quickly at the code and the mi command should take the values
from the parameters. Can you run with debug=3 and get all the logs
messages to see if we can spot something threre.


Cheers,
Daniel


On 15/11/16 11:27, Jonathan Hunter wrote:
>
> Hi,
>
>
> Sorry Daniel, let me be clear.
>
>
> Correct the To/From are not taken from the rpc command, the INFO is
> triggered/sent but with the To/From of the new request coming in;
>
>
> Below I dial 07917190438 from ext 209 and this INFO is sent;
>
>
>
> INFO sip:kamailio.org SIP/2.0
> Via: SIP/2.0/UDP
> 8.8.8.8;branch=z9hG4bK63d7.374d4573.0
> To: 
> From: ;tag=c32652d8e50f480c90e2f8379a0698aa-ea50
> CSeq: 10 INFO
> Call-ID: YWFhMmVmMzUxM2Q2YzUwMzZhOTFjNDc4OGZlYmM2N2I
> Max-Forwards: 70
> Content-Length: 0
> User-Agent: HA PBX
>
> However this command is triggered to send the INFO and the
> To/From/Contact are not changed/added;
>
>> jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg",
>> "INFO", 
>> "sip:3003@8.8.8.8",".",".","From:sip:1234@2.2.2.2","To:sip:3003@8.8.8.8","Contact:sip:1234@2.2.2.2"]}');
>
>
> I assumed (possibly incorrectly) you can get the command to overwrite
> the current contents of the headers, so as above the RURI would change
> to sip:3003@8.8.8.8 and the From to sip:1234@2.2.2.2 etc, however they
> remain unchanged.
>
> Does that make sense?
>
> Thanks
>
> Jon
>
>
>
>
>
>
> 
> *From:* Daniel-Constantin Mierla 
> *Sent:* 15 November 2016 10:12
> *To:* Jonathan Hunter; Kamailio SER - Users Mailing List
> *Subject:* Re: [SR-Users] Send SIP Info within a dialog using
> $uac_req(method)="INFO"
>  
>
> Hello,
>
>
> what do you mean by "with default parameters" in your last remark? Are
> the To/From not taken from the rpc command?
>
>
> Cheers,
> Daniel
>
>
> On 15/11/16 11:06, Jonathan Hunter wrote:
>>
>> Hi Daniel,
>>
>>
>> That works in terms of clearing the error, however I just see
>> kamailio send a SIP info message to kamailio.org, as apposed to the
>> RURI I provide, I presume again this will just be putting the
>> t_uac_dlg parameters in the correct order?
>>
>>
>> Parameters:
>>
>>  *
>>
>> /method/ - request method
>>
>>  *
>>
>> /RURI/ - request SIP URI
>>
>>  *
>>
>> /NEXT HOP/ - next hop SIP URI (OBP); use “.” if no value.
>>
>>  *
>>
>> /socket/ - local socket to be used for sending the request;
>> use “.” if no value.
>>
>>  *
>>
>> /headers/ - set of additional headers to be added to the request;
>> at least “From” and “To” headers must be specify)
>>
>>  *
>>
>> /body/ - (optional, may not be present) request body (if present,
>> requires the “Content-Type” and “Content-length” headers)
>>
>> As looks like I am defining things correctly now but its not picking
>> them up, again if I run manually it works in command line;
>>
>>
>> jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg",
>> "INFO",
>> "sip:3003@8.8.8.8",".",".","From:sip:1234@2.2.2.2","To:sip:3003@8.8.8.8","Contact:sip:1234@2.2.2.2"]}');
>>
>> All I see it fire is an INFO message to Request-Line: INFO
>> sip:kamailio.org SIP/2.0, with default parameters.
>>
>>
>> Thanks
>>
>>
>> Jon
>>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Htable sht_rm_name_re usage

2016-11-15 Thread Grant Bagdasarian
Hello Community,

We were facing a weird issue in one of our Kamailio servers where custom htable 
entries were removed which did not belong to a particular call.

Background Information:
We use htable to store the call-id and a uuid when an INVITE message is 
received and remove these entries when the call is completed/failed (so on 
CANCEL, BYE, 4XX, 5XX, 6XX, etc).
In this case the function sht_rm_name_re was causing incremented call-id's 
belonging to different calls to be removed from the htable, since the removal 
is based on regex and not the exact key.

On INVITE we do this:
$var(reference) = $uuid(g);
$sht(calls=>$ci) = $ci;
$sht(calls=>$ci::reference) = $var(reference);

On BYE/4XX,5XX,6XX, etc we did this:
sht_rm_name_re("calls=>$ci");
sht_rm_name_re("calls=>$ci::reference");

SIPP generates incremented call-id's, like this: 
1-14875@1.0.0.1.
When you generate enough calls, for instance 30 calls, the 21st call will have 
the call-id 21-14875@1.0.0.1.
If for instance the BYE for the call-id 1-14875@1.0.0.1 
arrives before 21-14875@1.0.0.1 , both htable entries 
will be removed by the sht_rm_name_re function, since it matches based on regex.

To fix this we made sure the function matches on the exact keys by doing this:
$var(callid) = '^' + $ci + '$';
$var(callid_reference) = '^' + $ci + '::reference' + '$';
sht_rm_name_re("calls=>$var(callid)");
sht_rm_name_re("calls=>$var(callid_reference)");

Hope this may help someone in the future facing the same issue.

Regards,

Grant Bagdasarian
CM

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"

2016-11-15 Thread Jonathan Hunter
Hello,


Please see debug output for when I try and send the SIP INFO when I am 
initiating a new call.


I am just testing out the command currently, in practice I will look to inject 
the SIP INFO into an already formed dialog, so is the way I am trying to test 
cause me an issue?


I can see;


Oct  7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: 
t_uac_prepare(): DEBUG:tm:t_uac: next_hop=


Which will be why its sending the sip info to sip:kamailio.org I presume.


See some output from the relevant process below;


Thanks


Jon


ct  7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: 

[SR-Users] How to get Destination port UDP

2016-11-15 Thread andrzej.ciupek-asterisk.edu.pl

Hello

I have tried $Rp before sending this to mailing list, but with $Rp I 
have different values for example 188, 6847, 3163, 9175 for every call 
?!
Don't know where are they come from, because in URI I see :6060, and 
using $rp give my 6060 for examples with $Rp.


Only have problem with UAC Panasonic-MPR12-V004.41009/VSIPGW-V3. 
with doesn't send $rp in URI.


Greetings

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to get Destination port UDP

2016-11-15 Thread Daniel-Constantin Mierla
Hello,

do you receive the packets over UDP on local port 6060 and $Rp is not 6060?

Cheers,
Daniel


On 15/11/16 13:13, andrzej.ciupek-asterisk.edu.pl wrote:
> Hello
>
> I have tried $Rp before sending this to mailing list, but with $Rp I
> have different values for example 188, 6847, 3163, 9175 for every call ?!
> Don't know where are they come from, because in URI I see :6060, and
> using $rp give my 6060 for examples with $Rp.
>
> Only have problem with UAC Panasonic-MPR12-V004.41009/VSIPGW-V3.
> with doesn't send $rp in URI.
>
> Greetings
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to get Destination port UDP

2016-11-15 Thread Carsten Bock
Please note:
"$rp" is not the same as "$Rp", PV's are case-sensitive

Thanks,
Carsten

2016-11-15 14:34 GMT+01:00 Daniel-Constantin Mierla :
> Hello,
>
> do you receive the packets over UDP on local port 6060 and $Rp is not 6060?
>
> Cheers,
> Daniel
>
>
> On 15/11/16 13:13, andrzej.ciupek-asterisk.edu.pl wrote:
>> Hello
>>
>> I have tried $Rp before sending this to mailing list, but with $Rp I
>> have different values for example 188, 6847, 3163, 9175 for every call ?!
>> Don't know where are they come from, because in URI I see :6060, and
>> using $rp give my 6060 for examples with $Rp.
>>
>> Only have problem with UAC Panasonic-MPR12-V004.41009/VSIPGW-V3.
>> with doesn't send $rp in URI.
>>
>> Greetings
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



-- 
Carsten Bock
CEO (Geschäftsführer)

ng-voice GmbH
Millerntorplatz 1
20359 Hamburg / Germany

http://www.ng-voice.com
mailto:cars...@ng-voice.com

Office +49 40 5247593-40
Fax +49 40 5247593-99

Sitz der Gesellschaft: Hamburg
Registergericht: Amtsgericht Hamburg, HRB 120189
Geschäftsführer: Carsten Bock
Ust-ID: DE279344284

Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
http://www.ng-voice.com/imprint/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] msilo

2016-11-15 Thread Slava Bendersky
Hello Daniel, 
I am not programmer, but I want place request if kaamilio devs can complete it 
. 
Thanks 


Slava. 


From: "Daniel-Constantin Mierla"  
To: "sr-users"  
Sent: Tuesday, 15 November, 2016 03:00:19 
Subject: Re: [SR-Users] msilo 



Hello, 

for me it is fine to add a new parameter to m_store() that takes the body 
content. 

Are you asking for more details of how can be done? 
Cheers, 
Daniel 

On 13/11/16 07:08, Slava Bendersky wrote: 



Hello Everyone, 
I asking question/request to add improvement for msilo module where will have 
ability set $avp(i:body) in mod params. That will allow use it in m_store() by 
specifying body message $avp. In my case registration is on B2BUA so kamailio 
pass through/proxy to destination. In order to check user status online/offline 
kamailio wait for reply from B2BUA on MESSAGE status if it return error 503 
that mean user offline and m_store(0 should store message in db, but the issue 
that error 503 is in final stage and MESSAGE body is not available any more. 
The improvement will allow specify body $var in m_store() so new way will be 
m_store($tu, $avp(body)). 

Any help thank you. 

Slava. 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list 
sr-users@lists.sip-router.org 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 



-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.com 

___ 
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list 
sr-users@lists.sip-router.org 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] msilo

2016-11-15 Thread Federico Cabiddu
Hi Slava,
if I understand correctly your scenario,
you could call t_on_failure before relaying the MESSAGE. In this way you
should have access to the original message in the failure route triggered
after receiving a final reply and you should be able to store it with the
regular msilo functions.
Hope this helps.

Cheers,

Federico

On 15 Nov 2016 3:47 pm, "Slava Bendersky"  wrote:

Hello Daniel,
I am not programmer, but I want place request if kaamilio devs can complete
it .
Thanks


Slava.

--
*From: *"Daniel-Constantin Mierla" 
*To: *"sr-users" 
*Sent: *Tuesday, 15 November, 2016 03:00:19
*Subject: *Re: [SR-Users] msilo

Hello,

for me it is fine to add a new parameter to m_store() that takes the body
content.

Are you asking for more details of how can be done?
Cheers,
Daniel

On 13/11/16 07:08, Slava Bendersky wrote:

Hello Everyone,
I asking question/request to add improvement for msilo module where will
have ability set $avp(i:body) in mod params.  That will allow use it in
m_store() by specifying  body message $avp.  In my case registration is on
B2BUA so kamailio pass through/proxy  to destination. In order to check
user status online/offline kamailio wait for reply from B2BUA on MESSAGE
status if it return error 503 that mean user offline and m_store(0 should
store message in db, but the issue that error 503 is in final stage and
MESSAGE body is not available any more.  The improvement  will allow
specify  body $var in m_store() so new way will be m_store($tu,
$avp(body)).

Any help thank you.

Slava.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierlahttp://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Possible memory leak in mysql driver

2016-11-15 Thread Alexandru Covalschi
Hello list,

We’re using dev version of Kamailio:
version: kamailio 5.0.0-dev4 (x86_64/linux) ff63e5
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, 
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, 
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: ff63e5
compiled on 15:46:49 May 31 2016 with gcc 4.9.2

Sometimes we encounter such issue:
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR:  
[db_row.c:114]: db_allocate_row(): no private memory left
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
[km_row.c:57]: db_mysql_convert_row(): could not allocate row
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
[km_res.c:188]: db_mysql_convert_rows(): error while converting row #16
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
[km_res.c:217]: db_mysql_convert_result(): error while converting rows
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
[km_dbase.c:261]: db_mysql_store_result(): error while converting result
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR:  
[db_query.c:139]: db_do_query_internal(): error while storing result
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: permissions 
[trusted.c:91]: reload_trusted_table(): failed to query database
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR:  
[db_row.c:114]: db_allocate_row(): no private memory left
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
[km_row.c:57]: db_mysql_convert_row(): could not allocate row
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
[km_dbase.c:444]: db_mysql_fetch_result(): error while converting row #15
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: htable 
[ht_db.c:234]: ht_db_load_table(): Error while fetching result
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: :  
[mem/q_malloc.c:468]: qm_free(): BUG: qm_free: freeing already freed pointer 
(0x7f5ebda8ae18), called from db_mysql: km_dbase.c: db_mysql_free_result(305), 
first free db_mysql: km_dbase.c: db_mysql_free_result(305) - aborting
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12281]: CRITICAL:  
[pass_fd.c:275]: receive_fd(): EOF on 16
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12268]: ALERT:  
[main.c:739]: handle_sigs(): child process 12276 exited by a signal 6
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12268]: ALERT:  
[main.c:742]: handle_sigs(): core was not generated
Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12268]: INFO:  
[main.c:754]: handle_sigs(): terminating due to SIGCHLD

The thing is we heavily use mysql module, but only to update the in-memory 
tables by kamcmd. Each N minutes a special script updates the trusted,address 
and htable executing kamcmd. Kamailio (and kamcmd as well) talks only with 
localhost mysql server.
What I saw when encountered that issue on a live machine is that issue happens 
only with one of child processes, any other are ok.
Interesting thing is that happens at the same time with machines on the same 
«set», I mean that issue happened simultaneously with two our test machines 
which actually didn’t have any load on them. 
The common thing between those machines is that they are in same subnet and 
local mysql databases are filled by scripts which query same external db.
I can’t confirm if there were or there weren’t any networking issues at that 
time with those machines, but as soon as kamcmd queries localhost that 
shouldn’t be the source of the issue.

So my questions are:
1. Has anyone encountered such thing?
2. Maybe the issue is already localized so it has sense to update? We actually 
use that on production (pls don’t throw too much rocks at me), so maintenance 
should be properly planned and I must be sure update won’t break anything. 
3. If update is proposed - how to do it? I mean - follow the guide 
https://www.kamailio.org/wiki/install/devel/git or there are some other tips? I 
suppose in ideal world I don’t even stop the binary, only restart after make 
all && make install are done, as everything is in-memory. Am I correct?
4. When can we expect stable 5.0 version? (at least tell if it’s months/years)

Thanks in advance!
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] msilo

2016-11-15 Thread Slava Bendersky
Hello Everyone, 
I am trying just forward MESSAGE through kamailio and I reported issue with 
mod_sms in freeswitch https://freeswitch.org/jira/browse/FS-9701. So I was need 
add work around on kamailio side. The issue that my setup MSILO should work in 
intercept mode meaning check when user online of offline and act as m_store() 
or m_dump() without rely on lookup("location");, because registration on B2BUA 
side. If m_store() will have additional parameter to store body this will allow 
check user state and send when need it. 

On reply I put something like this to fix To, as work around and forward 
MESSAGE to client, but when client send MESSAGE kamailio receive on public 
interface and push out of public interface instead RELAY through local 
interface and then to B2BUA. 

route[MESSAGE_FORWARD] { 
xlog("L_INFO", "Incoming new SMS [$rm] from $tU --> $td\n"); 

if(fnmatch("$rs", "202") && fnmatch("$rr", "Accepted") && allow_trusted("$si", 
"$proto")) { 
$avp(from) = $fu; 
$avp(to) = $tu; 
$avp(new_to) = "<" + $avp(to) + ">" + ";messagetype=SMS"; 

xlog("L_INFO", "Message Accepted by B2BUA --> [$rs] with [$rr] from 
[$avp(from)] to [$avp(to)]\n"); 

if(fnmatch("$fU", "offline")) { 
xlog("L_INFO", "OFFLINE SMS: from [$fU] user --> $fU\n"); 
$avp(from) = $(avp(to){uri.user}); 
xlog("L_INFO", "OFFLINE SMS: Searching destination user $avp(oexten)\n"); 
sql_pvquery("cb", "select contact from location where username = 
'$avp(from)'","$avp(dst)"); 
xlog("L_INFO", "OFFLINE SMS: set new destination --> $avp(dst)\n"); 
$avp(new_to) = "<" + $(avp(dst){tobody.uri}) + ">" + ";messagetype=SMS"; 
} 

$sht(a=>to) = $avp(new_to); 
xlog("SMS from --> $fU domain $fd\n"); 
xlog("-\n"); 
xlog("L_INFO", "FROM --> $avp(from)\n"); 
xlog("L_INFO", "OLD_TO --> $avp(to)\n"); 
xlog("L_INFO", "NEW_TO --> $avp(new_to)\n"); 
} 

if(compare_ips("$td", "10.18.130.27")) { 
xlog("L_INFO", "Message from B2BUA contain domain --> $td . Updating...\n"); 
$avp(new_dst) = $(hdr(Route){param.value,received}); 
xlog("L_INFO", "New destination --> $avp(new_dst)\n"); 
$avp(new_to) = "<" + $avp(new_dst) + ">" + ";messagetype=SMS"; 
$sht(a=>to) = $avp(new_to); 
remove_hf("To"); 
insert_hf("To: $sht(a=>to)\r\n", "To"); 
$du = $sht(a=>to); 
} 
} 

From: "Federico Cabiddu"  
To: "sr-users"  
Sent: Tuesday, 15 November, 2016 11:07:44 
Subject: Re: [SR-Users] msilo 



Hi Slava, 
if I understand correctly your scenario, 
you could call t_on_failure before relaying the MESSAGE. In this way you should 
have access to the original message in the failure route triggered after 
receiving a final reply and you should be able to store it with the regular 
msilo functions. 
Hope this helps. 

Cheers, 

Federico 

On 15 Nov 2016 3:47 pm, "Slava Bendersky" < volga...@skillsearch.ca > wrote: 



Hello Daniel, 
I am not programmer, but I want place request if kaamilio devs can complete it 
. 
Thanks 


Slava. 


From: "Daniel-Constantin Mierla" < mico...@gmail.com > 
To: "sr-users" < sr-users@lists.sip-router.org > 
Sent: Tuesday, 15 November, 2016 03:00:19 
Subject: Re: [SR-Users] msilo 



Hello, 

for me it is fine to add a new parameter to m_store() that takes the body 
content. 

Are you asking for more details of how can be done? 
Cheers, 
Daniel 

On 13/11/16 07:08, Slava Bendersky wrote: 

BQ_BEGIN

Hello Everyone, 
I asking question/request to add improvement for msilo module where will have 
ability set $avp(i:body) in mod params. That will allow use it in m_store() by 
specifying body message $avp. In my case registration is on B2BUA so kamailio 
pass through/proxy to destination. In order to check user status online/offline 
kamailio wait for reply from B2BUA on MESSAGE status if it return error 503 
that mean user offline and m_store(0 should store message in db, but the issue 
that error 503 is in final stage and MESSAGE body is not available any more. 
The improvement will allow specify body $var in m_store() so new way will be 
m_store($tu, $avp(body)). 

Any help thank you. 

Slava. 


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list 
sr-users@lists.sip-router.org 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 



-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.com 

___ 
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list 
sr-users@lists.sip-router.org 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 

___ 
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list 
sr-users@lists.sip-router.org 
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users 


BQ_END



___ 
SIP Express Router (SER) and Kamailio (OpenSER) - sr-user