Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ganapathi

Pages: 1 2 3 [4] 5 6
46
Yate users hangout place / Re: Channel Message Direction Modification
« on: September 24, 2018, 02:36:41 AM »
Hi

As i added one new custom parameters in cdrbuild.conf as

custom_direction = true

And added custom_direction field into copyparams of both leg. And assigned different value on each leg. But values are overridden on each leg.

As i need to maintain different value in custom_direction on each leg with same name to identify the call leg.

How do i that. Please help me !

47
Yate users hangout place / Re: Channel Message Direction Modification
« on: September 18, 2018, 08:34:06 AM »
Ok

48
Yate users hangout place / Re: Channel Message Direction Modification
« on: September 18, 2018, 08:03:54 AM »
Thanks a lot  for reply !!

So it means nothing wrong on direction and handling of leg.

I am not using cdrcombine module nowadays. but only if i use custom parameters then it won't copy into both outbound cdr leg right. ?. As i seen some of parameters are copied on both leg at long back.

And yes for outgoing calls am using target channel ID to dispatch new local leg .

But for some reason i didn't disabled cdrcombine , so in that case any possiblities to remove cdrcombine entry forcefully by sending message?

49
Yate users hangout place / Channel Message Direction Modification
« on: September 06, 2018, 01:03:16 PM »
Hi

Help me on direction for channel message alteration because in my cases both leg are considered as outgoing, so i need to modify one leg  as incoming for proper clearance on CDR and other related information.

Steps Followed :
  • Enqueue the call.execute using dumb with billid. And dumb channel are considered as incoming but cdrtrack is set as false where-as it's not necessary.
  • Sig Channel generated from call.execute for ISDN call. CDR initialized with direction as outgoing.
  • Once ISDN call answered then dispatching call.route to find the routing part. Handler installed for call.answered message.
  • Check the result call.route and Enqueue chan.masquerade with message of call.execute with id = Sig Channel(sig/1) / id of call.answered message
  • So this call.execute also executing with direction as incoming.

 My both leg are considered as outgoing under cdrtracking scheme. And there is no incoming, so cdrcombine is not finalized and my other CDR logging also difficult to find the both leg due to both are as incoming leg.

So clarify me few things.
  • Is it Normal Behavior ?
  • Is there any wrong handled the message by this logic ?
  • Changing direction is good idea ?.If then point me the direction out !
  • Some extra logic need to apply to find each leg on this call is the proper solution on this cases ?.
  • Extra logic need to track this Sig ISDN call for hangup to clean-up blank entry with billid on cdrcombine and how to clean entry ?

Yate Version :6.0.1
Calling Medium : PRI with Zaptel module


Kindly help me out !

50
Yate users hangout place / Copy All Parameters from Handled message
« on: September 03, 2018, 08:07:43 AM »
Hi

i just want to copy all the parameters from dispatched message into new message, so that i can emit this message without missing any parameters.

 Message* m = new Message("call.route");
 m->copyParam(msg,"billid");
 m->copyParam(msg,"peerid");
 if (Engine::dispatch(m))
 {
  Message* notify = new Message("chan.masquerade");
  notify->addParam("id", msg.getParam(YSTRING("id"))->c_str());
  notify->addParam("message", "call.execute");
  notify->copyParams(m,notify); // Like this i need to copy all the paramaters from dispatched message to new message.
 }

By any loop or any default function available. ?

Kindly help me out

51
YateBTS / Re: record wave
« on: August 09, 2018, 04:23:36 AM »
Am not sure it would work on YateBTS. It would work on Yate. So i think basic operation may be same.

[extra]
call.cdr=120,operation

[call.cdr]
;Using CDR Opertation for to record a Call once answered
update=if ${status}^answered$=if ${direction}^incoming$=enqueue chan.masquerade;\
message=chan.record;id=${chan};\
both=wave/record//var/spool/yate/tmp/${caller}_${called}_${billid}.gsm;\
format=2*slin

52
Yate users hangout place / Re: Call.Route after call answered
« on: August 09, 2018, 03:33:43 AM »
this would works ?

b=CDRBuilder::find(id);
b->custom_header->c_str();

53
Yate users hangout place / Re: SIP Authentication Multi-Request
« on: August 06, 2018, 06:40:43 AM »
not possible to do on cpp module modification as well?.

Let me try to find out the place of generation and put some check to avoid.

54
Yate users hangout place / Re: Call.Route after call answered
« on: August 06, 2018, 04:28:56 AM »
call.route is for one leg is fine or both leg it's required. ?.

For Initial Outbound call am using dumb module.

Code: [Select]
"direct" : "sig/9500000";
"callto" : "dumb/";
"target" : "95000000"

So it would do the call.route and executing call.execute and calls are initiating properly.

To handle the result for this i need CDR Data as well. Is it possible to get CDR data by using billid /ID ?.

And for testing am using call.answered for result handling as call got answered or not then trying to send call.execute like below.


Code: [Select]
                                        Message* notify = new Message("chan.masquerade");
                                        notify->addParam("id", msg.getParam(YSTRING("id"))->c_str());
                                        notify->addParam("message", "call.execute");
                                        notify->copyParam(msg, "status");
                                        notify->addParam("direction","incoming");
                                        notify->addParam("callto.1","sip/sip:7007@192.168.1.41:5896");
                                        notify->addParam("callto.1.secure","no");
                                        notify->addParam("callto.1.oconnection_id","general");

55
Yate users hangout place / Re: SIP Authentication Multi-Request
« on: August 06, 2018, 04:17:50 AM »
Is it possible to avoid Sip Channel(sip/1) & BillID(121412122-1) generation for those unauthorized request at first.?

56
Yate users hangout place / Re: SIP Authentication Multi-Request
« on: August 05, 2018, 03:34:18 PM »
Somewhat restricted user.auth and cdr related query execution are prevented by mentioned below configuration

regexroute.conf

[extras]
user.auth=50
chan.startup=40
call.preroute=40

[user.auth]
; blacklist any private 10.0.x.y IP address
${ip_host}^10\.0\.=-;error=forbidden;reason=Your IP range is blacklisted
; don't waste resources querying the database if no credentials are provided
${username}^$=-;error=noauth;auth_register=false

[chan.startup]
; If this is an unauthenticated call then don't emit a call.cdr
${username}^$=if ${module}^sip$=if ${direction}^incoming$=-;error=noauth;cdrcreate=false

[call.preroute]
; If this is an unauthenticated call then don't emit a call.cdr
${username}^$=if ${module}^sip$=if ${direction}^incoming$=-;error=noauth;cdrcreate=false


But i noticed that Sip Channel(sip/1) & BillID(121412122-1) also generating for those unauthorized call. Feel to prevent those creation as well.

Anyone please help me on this

57
Yate users hangout place / SIP Authentication Multi-Request
« on: August 05, 2018, 12:41:41 PM »
Hi ,

As i seen the sip log for user.auth message, everytime yate unauthorized for first SIP REGISTER message and then it's SIP Client re-sending request then it's accepting the authentication.

It's not possible to do the necessary configuration to do it on first attempt..?

Even when SIP client places a new call then also same. SIP Client doesn't sending along with username at first attempt eventhough SIP client configured with authname properly.

Is it the problem with SIP client or SIP server ?.

Due to this resource is used extra for double initiation for every authentication and call if system allowed only for authenticated call .

Database Queries are running two times as per register configuration. Is there any way to avoid multiple Queries execution by putting some condition to execute SQL queries on register conf or force SIP client to send along with username for every request.

Log :

2018-08-05_23:52:12.256689 <sip:INFO> 'udp:0.0.0.0:5060' received 526 bytes SIP message from 192.168.1.87:5799 [0x23c3b00]
------
REGISTER sip:192.168.1.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.87:5799;branch=z9hG4bK2234544112399619815;rport
From: 7020 <sip:7020@192.168.1.254:5060>;tag=1994220662
To: 7020 <sip:7020@192.168.1.254:5060>
Call-ID: 13640258646285-1436943169562@192.168.1.87
CSeq: 334 REGISTER
Contact: <sip:7020@192.168.1.87:5799>
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: Fanvil X3S 2.4.0.5487 0c383e194a04
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0

Returned true 'database' delay=0.000463
  thread=0x7f32b0002950 'YSIP Register'
  data=(nil)
  retval='(null)'
  param['account'] = 'technobureau_db'
  param['query'] = 'SELECT password FROM users WHERE username = '' AND state IS TRUE AND  password IS NOT NULL AND password<>'''
  param['results'] = 'true'
  param['handlers'] = 'pgsqldb:100'
  param['rows'] = '0'
  param['affected'] = '0'
  param['dbtype'] = 'pgsqldb'
2018-08-05_23:52:12.310487 <sip:INFO> 'udp:0.0.0.0:5060' sending code 401 0x7f32b400e380 to 192.168.1.87:5799 [0x23c3b00]
------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.87:5799;branch=z9hG4bK2234544112399619815;rport=5799;received=192.168.1.87
From: 7020 <sip:7020@192.168.1.254:5060>;tag=1994220662
To: 7020 <sip:7020@192.168.1.254:5060>;tag=92709314
Call-ID: 13640258646285-1436943169562@192.168.1.87
CSeq: 334 REGISTER
WWW-Authenticate: Digest realm="Yate", nonce="ca2c0bc506831e31eafca851c019e1c7.1533493332", stale=FALSE, algorithm=MD5
Server: YATE/6.0.1
Allow: ACK, INVITE, BYE, CANCEL, MESSAGE, REGISTER, REFER, OPTIONS, INFO, SUBSCRIBE, SECRET, NOTIFY
Content-Length: 0

------
2018-08-05_23:52:12.316263 <sip:INFO> 'udp:0.0.0.0:5060' received 717 bytes SIP message from 192.168.1.87:5799 [0x23c3b00]
------
REGISTER sip:192.168.1.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.87:5799;branch=z9hG4bK9097321992589110910;rport
From: 7020 <sip:7020@192.168.1.254:5060>;tag=1994220662
To: 7020 <sip:7020@192.168.1.254:5060>
Call-ID: 13640258646285-1436943169562@192.168.1.87
CSeq: 335 REGISTER
Contact: <sip:7020@192.168.1.87:5799>
Authorization: Digest username="7020", realm="Yate", nonce="ca2c0bc506831e31eafca851c019e1c7.1533493332", uri="sip:192.168.1.254", response="166d4c0999c9b4bf93010709d998fe80", algorithm=MD5
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: Fanvil X3S 2.4.0.5487 0c383e194a04
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0

------
Returned true 'database' delay=0.000348
  thread=0x7f32b0002bc0 'YSIP Register'
  data=0x7f32b4010b80
  retval='(null)'
  param['account'] = 'technobureau_db'
  param['query'] = 'SELECT password FROM users WHERE username = '7020' AND state IS TRUE AND  password IS NOT NULL AND password<>'''
  param['results'] = 'true'
  param['handlers'] = 'pgsqldb:100'
  param['columns'] = '1'
  param['rows'] = '1'
  param['affected'] = '1'
  param['dbtype'] = 'pgsqldb'
------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.87:5799;branch=z9hG4bK9097321992589110910;rport=5799;received=192.168.1.87
From: 7020 <sip:7020@192.168.1.254:5060>;tag=1994220662
To: 7020 <sip:7020@192.168.1.254:5060>;tag=757183696
Call-ID: 13640258646285-1436943169562@192.168.1.87
CSeq: 335 REGISTER
Expires: 3600
Contact: <sip:7020@192.168.1.87:5799>;expires=3600
Server: YATE/6.0.1
Allow: ACK, INVITE, BYE, CANCEL, MESSAGE, REGISTER, REFER, OPTIONS, INFO, SUBSCRIBE, SECRET, NOTIFY
Content-Length: 0


58
Yate users hangout place / Call.Route after call answered
« on: August 03, 2018, 01:30:02 AM »
Hi

As am initiating a outbound call through background system and i need to call sip user by using call.route method moment call got answered.

Is it possible.

Initiating Outbound :

Message* notify = new Message("call.execute");
      copyParams2(*notify, a, i);
      notify->addParam("copyparams", "cdrtrack,link");
      notify->addParam("cdrtrack", "false");
      Engine::enqueue(notify);

Call.cdr Message Handler :

if (msg.getParam(YSTRING("operation"))->c_str() == YSTRING("update") &&
         msg.getParam(YSTRING("status"))->c_str() == YSTRING("answered")) {
         Message* notify = new Message("call.route");
                        notify->copyParam(msg,"billid");
                        notify->copyParam(msg,"caller");
                        notify->copyParam(msg,"called");
      }

59
Yate users hangout place / Re: copy a call to a conference
« on: July 17, 2018, 07:26:03 AM »
Hi xyswitchz,

Will you please share sample configuration to do this.

60
Sorry. Still i couldn't understand the issue, even i tried to read the log , didn't get any clue until.

Anyway you says it's known issue,let me wait for the issue to be solve.

And am more into cdrcombine as of now.  Let me modify my logic with cdrbuild itself until it's get resolved.

Pages: 1 2 3 [4] 5 6