[SR-Users] how to remove a line in sdp

2017-08-08 Thread Sunil More
Hello All,

I have the following SDP coming in from a carrier and would like to remove
the following line. Cant figure how to go about it.

line to remove : *a=cdsc: 1 image udptl t38*
sdp is as below

Content-Type: application/sdp.
Content-Length: 293.
.
v=0.
o=hiQ9200 5859020170708143552 1175715965 IN IP4 X.Y.Z.A.
s=Phone Call via hiQ9200 SIPCA.
c=IN IP4 X.Y.Z.A.
t=0 0.
m=audio 16648 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sqn: 0.
*a=cdsc: 1 image udptl t38.*
a=sendrecv.
a=ptime:20.

This reply comes from a upstream carrier in session progress and 200ok
causing one-way audio for me.


Thanking You,
Sunil More
Ph : 9503338275
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio APP_LUA

2017-08-23 Thread Sunil More
Hello Santosh,

It seems that you have not registered the module for app_lua. You can do
this by adding the below line.
modparam("app_lua", "register", "sqlops")

and try again.

Thanking You,
Sunil More
Ph : 9503338275

On Tue, Aug 22, 2017 at 6:32 PM, santosh gupta <santosh.gupt...@gmail.com>
wrote:

> Hi,
>
> Some more INFO
>
> kamialio.lua
>
> sr.sqlops.query("cb", "select grp from address where id='1'", "result");
> sr.sqlops.column("result", index);
> sr.sqlops.nrows("result");
> sr.sqlops.ncols("result");
>
>
> kamailio.cfg
> modparam("sqlops","sqlcon","cb=>mysql://:@localhost/")
>
>
>
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>  Virus-free.
> www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
> <#m_7524765538298788365_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> On Tue, Aug 22, 2017 at 6:18 PM, santosh gupta <santosh.gupt...@gmail.com>
> wrote:
>
>> Hi Robert,
>>
>> Hope you are doing good.
>> You have helped me in the past.
>>
>> I need to set LCR via app_lua, getting rates and destination from mysql.
>>
>> Link which i am following is
>> https://www.kamailio.org/wiki/embeddedapi/4.0.x/lua
>>
>> The issue is I am not able to get connect via sr commands for example
>>
>> sr.sqlops.query("connection", "query", "result")
>>
>> What should be exactly is "connection", "query", "result"
>>
>> Error I am getting in syslog is
>>
>> /usr/local/kamailio/etc/kamailio/kamailio.lua:1: attempt to index field 
>> 'sqlops' (a nil value)
>>
>>
>> I am using kamailio 5.0.2
>>
>> A little bit of headsup will help me.
>> Thanks a lot again.
>>
>>
>>
>> --
>> Regards
>> Santosh Gupta
>> +91 9323043570
>>
>>
>> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>  Virus-free.
>> www.avg.com
>> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>> <#m_7524765538298788365_m_-6124904187259791916_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>
>
>
> --
> Regards
> Santosh Gupta
> +91 9323043570
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Killing Calls for a Profile

2017-09-13 Thread Sunil More
Hello All,

Is there a method / command to kill calls related to one dialog profile.
Right now i have to find all dialogs for a customer and loop through all
the dialog hashes to run kamcmd dlg.end_dlg till i can kill all calls. Is
there a easier way to do this.


Thanking You,
Sunil More
Ph : 9503338275
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Killing Calls for a Profile

2017-09-13 Thread Sunil More
Hello Daniel ,

Thank you for prompt response.

I set the dialog profile of a customer using
set_dlg_profile("custChannels", "$avp(customer_id)");

my xhttp event block looks like below

event_route[xhttp:request] {

xlog("L_INFO","http request ");

if($hu =~ "^/endcall") {

 $avp(customer_id)=$(hu{s.select,1,?});

 dlg_set_timeout_by_profile("custChannels","$avp(customer_id)","3");

xhttp_reply("200", "OK", "text/html","Ending Calls for
$avp(customer_id) ; ");

 return;

}


The call is answered and running. After I make the http request i get the
following in kamailio logs

WARNING: dialog [dlg_handlers.c:1564]: dlg_ontimeout(): timeout for dlg
with CallID '86896ZGUwYzFjY2YwN2YzNDg0NjQyZjFiMWY3ZDg3NTA2MDg' and tags
'f79f1301' 'gK07db5dbb'

CRITICAL: dialog [dlg_hash.c:933]: dlg_unref_helper(): bogus ref -1 with
cnt 2 for dlg 0x7f50a5938548 [2854:177] with clid
'86896ZGUwYzFjY2YwN2YzNDg0NjQyZjFiMWY3ZDg3NTA2MDg' and tags 'f79f1301'
'gK07db5dbb'

The call is not killed after 3 secs.
the mod params for dialog are as below

loadmodule "dialog.so"

modparam("dialog", "db_url", DBURL)

modparam("dialog", "enable_stats", 1)

modparam("dialog", "dlg_match_mode", 1)

modparam("dialog", "db_mode", 1)

modparam("dialog", "db_update_period", 45)

modparam("dialog", "profiles_with_value",
"endptChannels;custChannels;sharedChannels;dedicatedChannels;carrierChannels;Ichannels;")

modparam("dialog", "dlg_flag", 4)




Thanking You,
Sunil More
Ph : 9503338275

On Wed, Sep 13, 2017 at 3:19 PM, Daniel-Constantin Mierla <mico...@gmail.com
> wrote:

> Hello,
>
> On 13.09.17 08:42, Sunil More wrote:
>
> Hello All,
>
> Is there a method / command to kill calls related to one dialog profile.
> Right now i have to find all dialogs for a customer and loop through all
> the dialog hashes to run kamcmd dlg.end_dlg till i can kill all calls. Is
> there a easier way to do this.
>
> if you don't want to go down the path of adding a RPC command for it
> (which requires C coding), then you can try some workaround leveraging the
> function that sets the timeout by profile:
>
>   - https://www.kamailio.org/docs/modules/stable/modules/dialog.
> html#dialog.f.dlg_set_timeout_by_profile
>
> This is a function to be executed in config, you can trigger it by sending
> a special sip packet with sipsak or sipp. The alternative is to send an
> http request that will be handled via xhttp module, which then executes an
> event route block from config and you call the function there.
>
> Because the function is not terminating the calls immediately, the
> workaround is to use a very short time out, like few seconds.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Query in LCR

2017-09-06 Thread Sunil More
Hello ,

You can run a query to mysql like below to choose random lcr_id and then
input it to load_gws

query : select lcr_id from lcr_table order by rand() limit 1


Thanking You,
Sunil More
Ph : 9503338275

On Thu, Sep 7, 2017 at 9:41 AM, Logeshwaran G <logeshwara...@gmail.com>
wrote:

> Input Please
>
>
>
> Thanks & Kind Regards,
> *Logeshwaran G*
>
> *"Be Hunger, Stay Foolish"*
>
> On Wed, Sep 6, 2017 at 4:07 PM, Logeshwaran G <logeshwara...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I am handling Two Different Account holders and Two Different Gateways
>> with the different lcr_ids:
>>
>> id :1
>> lcr_id:1
>> gw_name:car1
>>  ip_addr  : 1.2.3.4
>>
>> id :2
>> lcr_id:2
>> gw_name:car2
>>  ip_addr  : 1.2.5.3
>>
>> In kamailio config file I am using load_gws(1), Here Comes my doubt, I
>> need to Pass the lcr_id value inside the load_gws(lcr_id) Dynamically, Is
>> it Possible , Please Guide me.
>>
>>
>> Thanks & Kind Regards,
>> *Logeshwaran G*
>>
>> *"Be Hunger, Stay Foolish"*
>>
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Call Transfer Scenario Using Freeswitch

2018-08-20 Thread Sunil More
Hi All,

I am using kamailio and freeswitch in my setup. While all users are
registered on Kamailio, calls are routed to Freeswitch back to kamailio and
then upstream providers.

I can make user to user calls but in cases of transfer I am stuck. I am
using a Polycom IP phone to test this scenario. While I initiate a attended
transfer and click on transfer all the legs hangup.

When I register all users on Freeswitch this works well. I am missing
something on Kamailio side.

Please point me in the right direction.

Thanking You,
Sunil More
Ph : 9503338275
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users