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 ... 6
16
Yate users hangout place / Re: Custom API - NamedList
« on: December 09, 2018, 11:48:43 AM »
Can you point me best way to store associated parameters on the single module but various class. Define a variable under namespace instead of class would give access I think but need to keep different set of list for each call.

declare variable;

Call 1: Active
variable = { "key1" => "value1" , "key2" = "value2" } // Kind of List with named key.
Call 2: Active
variable = { "key3" => "value3" , "key2" = "value4" } // Kind of List with named key.

But at the same time module should keep multiple list for each call. Means each list need to track by billid.

I just read ObjList as well but don't know how named pair of value append and retrieval from there.

17
Yate users hangout place / Re: Custom API - NamedList
« on: December 05, 2018, 05:00:35 AM »
As i am trying to keep track of call leg by using separate module but don't have clue to keep track where every handler is look like new call for module.

http://dpaste.com/2VE4YBQ


18
Yate users hangout place / Re: Custom API - NamedList
« on: November 29, 2018, 06:07:53 AM »
Yes. Am trying to do the same job what cdrbuild module doing now. But there is no API available on CDR module as you said earlier. If API available then may be easy to do.

Also trying to use Channel API for this but channel API is only able to call with userData. everytime need to use chan.locate to get that.
that's why trying on other common API which may be if available.


19
Yate users hangout place / Re: Custom API - NamedList
« on: November 29, 2018, 05:03:59 AM »
Module : Qout
Channel : qout/1
Caller channel: sig/1

QueueOutDriver::msgExecute()
{
..
Assign value1,value2,value3.etc.
..
}
QueueOutHandler::received(Message& msg)
{
..
..
Access value1,value2,value3 on every message(chan.connected/chan.notify or other message handler which is installed.
}

Module : Vmail
Channel : vmail/1
Caller channel: sig/1

VmailHandler::received(Message& msg)
{
..
Access value1,value2,value3 which I assigned from QueueOutHandler.
}

Like this I need to access variable. What would be right way if NamedList is not helpful. Or any other to use namedlist to get this done.

20
Yate users hangout place / Re: Custom API - NamedList
« on: November 29, 2018, 02:31:37 AM »
It's look like assign on message then handle the same message on handler side ?. am I right.

if I assign on chan.attach then I cant access through chan.notify also .

So what would be the right way to access the values from through out the messages for the particular channel . Even am expecting through out all the related channel for the single call. Like for sig/1 if I created then qin/1, qout/1 ,vmail/1 then need to access those necessary information all the channels is my main point. or atleast on each channel with API calling. bcs need to push common value on every important message to database.

21
Yate users hangout place / Re: Custom API - NamedList
« on: November 29, 2018, 02:19:45 AM »
QueueOutDriver::msgExecute()
{
..
Here I will catch source,greeting, caller,called value then emit chan.attach with source with notify parameter.
..
}
QueueOutHandler::received(Message& msg)
{
..
..
If Message is chan.notify then emit message with greeting. Also I need to emit some extra message need to dispatch. here I need to use some parameter value which I used on preroute/route. Or I will assign the value on my module whatever I want.
Here also I need to assign some value then access it on another Handler such as MailHandler::received.
}

22
Yate users hangout place / Re: Custom API - NamedList
« on: November 29, 2018, 02:11:42 AM »
As I want to store some value . For example need to assign  caller,called, queuename,source, greeting etc like some parameter value from CustomDriver in one of the module. And need to access these value from MessageHandler section from same module or from different module.

And I thought by using NamedList we can create one variable with list of value with key=>value basis.

Simply by adding custom handler on call.execute/call.preroute/route etc. then gather values and inserting to my variable then access it whenever I required by calling API function.

23
Yate users hangout place / Custom API - NamedList
« on: November 25, 2018, 12:44:22 PM »
Hi,

As i am working on to develop custom API through cpp module.

Plan :
  • Create Custom NamedList Variable through-out the call regardless of channel
  • Store set of value through some module like CustomDriver,CustomChannel, miscellaneous module.May be each module would push some value into customnamed list variable
  • Access through Custom module or copy parameters to new message to dispatch.

Because some module like chan.notify /call.answered doesn't have much information to process next message but at the same time need some message other than common value like billid,caller,called etc.

So in this cases in which class header( Whether YATE_API NamedList public section?) i need to define or initialize the named list . So that assign and access through out module.

NamedList Creation:

Code: [Select]
NamedList* customdataList = new NamedList("");

CustomDriver NamedList Assign:
Code: [Select]
CustomDriver::msgExecute(Message& msg)
customdataList->addparam("customheader","customvalue");


CustomChannelHandler Function :
Here have doubt on access the NamedList out of these two.
Code: [Select]
customdataList->getValue("customheader");

or
NamedList* tmp = YOBJECT(NamedList,"customdataList");
tmp ->getValue("customheader");

or
NamedPointer* ss = new NamedPointer("customdataList");
NamedList* tmp = YOBJECT(NamedList,ss);
tmp ->getValue("customheader");


I know i mis-understand some functionalities.  Second parameter of YOBJECT required pointer, but i don't know how to create pointer with specific string.I tried exact string, YSTRING but everything gives me error as well or no output.

24
Yate users hangout place / Re: ISDN Delayed Delivery of Outbound Call
« on: November 21, 2018, 06:34:35 AM »
Attached Dump of DAHDI.

z2-isdn.pcap - Manual Dial using SIP Phone. Alert taken 11 sec to get Alert information.

z2-auto.pcap - Autodial call from Yate. There is no manual dial/SIP protocol involved here. This one takes 5 sec only to get the Alert information from ISDN.

25
Yate users hangout place / ISDN Delayed Delivery of Outbound Call
« on: November 21, 2018, 04:00:42 AM »
Hi ,

As am using E1 PRI Card with PRI for outbound calling but almost every call delivered from server takes minimum of 10 sec, sometimes it's even greater than 15+ sec for outbound call. And mainly it's happen when dialed from SIP Phone/IP Phone using by SIP protocol.

Hardware : Digium TE420 PRI Card
Software : Yate 6.1.1
Dahdi : 2.10.2

ysigchan.conf :
[general]
debuglevel=10
debuglevel_engine=10
maxlock=-1
debugname=YSig
debuglevel=10
[trunk1]
type=isdn-pri-cpe
sig=zaptel1
voice=zaptel1
[trunk2]
type=isdn-pri-cpe
sig=zaptel2
voice=zaptel2
print-messages=yes
extended-debug=yes
[trunk3]
type=isdn-pri-cpe
sig=zaptel3
voice=zaptel3

zapcard.conf :

[general]
[zaptel1]
type=E1
offset=0
[zaptel2]
type=E1
offset=31
[zaptel3]
type=E1
offset=62
[zaptel4]
type=E1
offset=93

And logs shows like this.

2018-11-21_09:52:53.575246 <sig/17:ALL> Trying to call on trunk 'trunk2' [0x7f1060002b00]
2018-11-21_09:52:53.575255 <trunk2/Q931:ALL> Call(1,3) direction=outgoing TEI=0 [0x7f1060003110]
2018-11-21_09:52:53.575291 <trunk2/B:ALL> ZapCircuit(31). IOCTL(SetLinear) failed on channel 62 (param=0). 22: Invalid argument [0x180cf40]
2018-11-21_09:52:53.575297 <trunk2/B:NOTE> ZapCircuit(31). IOCTL(SetToneDetect) failed on channel 62 (param=3). 38: Function not implemented [0x180cf40]
2018-11-21_09:52:53.575618 <trunk2/Q931:ALL> Call(1,3). State 'Null' --> 'CallInitiated' [0x7f1060003110]
2018-11-21_09:52:53.575678 <trunk2/Q931:INFO> Sending message (0x7f1060003a70)
2018-11-21_09:52:53.575697 <sig/17:CALL> Outgoing call from=49781807 to=09500197700 trunk=trunk2 sigcall=0x7f1060003110 [0x7f1060002b00]
2018-11-21_09:52:53.681968 <trunk2/Q931:INFO> Received message (0x7f108c0009e0)
2018-11-21_09:52:53.686517 <trunk2/Q931:INFO> Sending message (0x7f107c00c8b0)
2018-11-21_09:52:53.786993 <trunk2/Q931:INFO> Received message (0x7f108c0009e0)
2018-11-21_09:52:53.788298 <trunk2/Q931:ALL> Call(1,3). State 'CallInitiated' --> 'OutgoingProceeding' [0x7f1060003110]
2018-11-21_09:53:04.751260 <trunk2/Q931:INFO> Received message (0x7f108c0009e0)
2018-11-21_09:53:04.751775 <trunk2/Q931:ALL> Call(1,3). State 'OutgoingProceeding' --> 'CallDelivered' [0x7f1060003110]

complete log file are attached here as well.

26
Yate users hangout place / Re: JSON Parser help
« on: November 02, 2018, 02:03:06 AM »
Yes. I already linked module with libyatescript and trying with javascript reference but don't know how to access it.

Code: [Select]
ObjList* stack;
GenObject* context;
ExpOperation* op = JsParser::parseJSON(text,mutex(),&stack,context);

//May be if empty then empty JSON object
if (!op)
    op = new ExpWrapper(0,"JSON");
ExpEvaluator::pushOne(stack,op);


Above one to parse and create object i think. but didn't find to access json value.

27
Yate users hangout place / Re: No Ringtone Custom Queue In Handle
« on: November 02, 2018, 01:46:33 AM »
So this is fine ?

Code: [Select]
Message m("chan.attach");
m->addParam("id",c->id());
m->addparam("source","tone/ring");
Engine::dispatch(m);

How do i push channel in message's user data ?? - Setting peerid & targetid to current channel id rgt ?.

28
Yate users hangout place / Re: No Ringtone Custom Queue In Handle
« on: November 01, 2018, 12:32:59 PM »

To play ring you must use chan.attach to set tone source in desired call leg (in queue chan).

QueueInChannel* c = new QueueInChannel(dest,msg,false);
c->initChan();
DO_SETUP (attach tone source) ...


Like this ?.

Code: [Select]
Message m("chan.attach");
m->addParam("id",c->id());
m->addparam("source","tone/ring");
Engine::dispatch(m);

or

Code: [Select]
Message m("chan.masquerde");
m->addParam("message","chan.attach");
m->addParam("id",c->id());
m->addparam("source","tone/ring");
Engine::dispatch(m);

or any other way. Mentioned both looks not working for me..

29
Yate users hangout place / JSON Parser help
« on: October 31, 2018, 03:20:05 PM »
Hi,

Can you please help me with the JSON Parser default cpp function to utilize in modules.

Where i want to format JSON String to JSON Object and add/remove key/value on object .




30
Yate users hangout place / Re: No Ringtone Custom Queue In Handle
« on: October 24, 2018, 06:12:09 AM »
Thanks a lot.  Got it

Pages: 1 [2] 3 4 ... 6