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.


Topics - ganapathi

Pages: [1] 2
1
Yate users hangout place / YATE SIP Trunk without registration
« on: March 19, 2021, 11:49:30 PM »
Hi

I am trying to create a SIP trunk on yate without a registration method. But however the same configuration is working fine accfile.conf but
it's not working with the register module.

accfile.conf

Code: [Select]
[test_sip]
enabled=yes
protocol=sip
username=me
outbound=192.168.3.102:5060


accfile trunk log:

Code: [Select]
Sniffed 'user.login' time=1616218494.937736^M
  thread=0x149d430 'Engine Worker'^M
  data=(nil)^M
  retval='(null)'^M
  param['enabled'] = 'yes'^M
  param['protocol'] = 'sip'^M
  param['username'] = 'me'^M
  param['outbound'] = '192.168.3.102:5060'^M
  param['account'] = 'test_sip'^M
  param['operation'] = 'login'
2021-03-20_05:34:54.948098 <sip:INFO> YateSIPLine::YateSIPLine('test_sip') [0x7fb2e8003d70]
2021-03-20_05:34:54.948117 <sip:INFO> YateSIPLine::update() 'test_sip' [0x7fb2e8003d70]
2021-03-20_05:34:54.948147 <sip:INFO> YateSIPLine(test_sip) setValid(0,(null)) current=0 [0x7fb2e8003d70]
2021-03-20_05:34:54.948171 <sip:INFO> YateSIPLine(test_sip) setValid(0,(null)) current=0 [0x7fb2e8003d70]
2021-03-20_05:34:54.948180 <sip:INFO> YateSIPLine(test_sip) setValid(0,(null)) current=0 [0x7fb2e8003d70]
2021-03-20_05:34:54.948190 <sip:ALL> YateSIPPartyHolder::buildParty(UDP,(null),0,192.168.3.102,5060) force=1 [0x7fb2e8003ea0]
2021-03-20_05:34:54.948304 <sip:ALL> YateUDPParty local '192.168.2.52:45060' party '192.168.3.102:5060' transport=0x1490130 [0x7fb2e8001080]
2021-03-20_05:34:54.948329 <sip:ALL> YateSIPPartyHolder set party (0x7fb2e8001080) local=192.168.2.52:45060 remote=192.168.3.102:5060 trans=(0x1490130) [0x7fb2e8003ea0]
2021-03-20_05:34:54.948342 <sip:ALL> Set party trans_name=(null) proto=UDP local=:0 remote=192.168.3.102:5060 [0x7fb2f6e0bf10]
2021-03-20_05:34:54.948352 <sip:INFO> YateSIPLine(test_sip) setValid(0,(null)) current=0 [0x7fb2e8003d70]
2021-03-20_05:34:54.948361 <sip:INFO> YateSIPLine(test_sip) setValid(1,(null)) current=0 [0x7fb2e8003d70]
Returned true 'user.login' delay=0.010637^M
  thread=0x149d430 'Engine Worker'^M
  data=(nil)^M
  retval='(null)'^M
  param['enabled'] = 'yes'^M
  param['protocol'] = 'sip'^M
  param['username'] = 'me'^M
  param['outbound'] = '192.168.3.102:5060'^M
  param['account'] = 'test_sip'^M
  param['operation'] = 'login'^M
  param['handlers'] = 'sip:150'


register.conf

Code: [Select]

initquery=SELECT 'yes' as enabled,'sip' as protocol,username,username as description,outbound,account,(CASE WHEN _state IS FALSE THEN 'logout' ELSE 'login' END) AS operation FROM conf_trunk WHERE _state IS TRUE


register SIP trunk log:

Code: [Select]
Sniffed 'user.login' time=1616218496.011641^M
  thread=0x149d430 'Engine Worker'^M
  data=(nil)^M
  retval='(null)'^M
  param['enabled'] = 'yes'^M
  param['protocol'] = 'sip'^M
  param['username'] = 'TRUNK5'^M
  param['description'] = 'TRUNK5'^M
  param['outbound'] = '192.168.3.202:5060'^M
  param['account'] = 'TRUNK5'^M
  param['operation'] = 'login'
2021-03-20_05:34:56.013702 <sip:INFO> YateSIPLine::YateSIPLine('TRUNK5') [0x7fb2e8009170]
2021-03-20_05:34:56.013712 <sip:INFO> YateSIPLine::update() 'TRUNK5' [0x7fb2e8009170]
2021-03-20_05:34:56.013734 <sip:INFO> YateSIPLine(TRUNK5) setValid(0,(null)) current=0 [0x7fb2e8009170]
2021-03-20_05:34:56.013747 <sip:INFO> YateSIPLine(TRUNK5) setValid(0,(null)) current=0 [0x7fb2e8009170]
2021-03-20_05:34:56.013753 <sip:INFO> YateSIPLine(TRUNK5) setValid(0,(null)) current=0 [0x7fb2e8009170]
2021-03-20_05:34:56.013906 <sip:INFO> YateSIPLine(TRUNK5) setValid(0,(null)) current=0 [0x7fb2e8009170]
2021-03-20_05:34:56.013915 <sip:INFO> YateSIPLine(TRUNK5) setValid(1,(null)) current=0 [0x7fb2e8009170]
Returned true 'user.login' delay=0.002283^M
  thread=0x149d430 'Engine Worker'^M
  data=(nil)^M
  retval='(null)'^M
  param['enabled'] = 'yes'^M
  param['protocol'] = 'sip'^M
  param['username'] = 'TRUNK5'^M
  param['description'] = 'TRUNK5'^M
  param['outbound'] = '192.168.3.202:5060'^M
  param['account'] = 'TRUNK5'^M
  param['operation'] = 'login'^M
  param['handlers'] = 'sip:150'



2
Yate users hangout place / Check SIP Status
« on: August 09, 2020, 12:32:37 PM »
Hi,

As i want every SIP Client to request registration forcefully once after yate service restarted. Where i'm maintaining sip registration status on database and able to configure to get those using init_query on register module.

But technically which sip method or any other way to request SIP client to renew their Registrations.

3
Yate users hangout place / Call Alerting(CW) - ISDN
« on: October 03, 2019, 03:18:56 AM »
Hi,

Anybody please help me to enable the call waiting tone on yate through call routing module.

Where while call routing i would verify whether user is available to receive incoming calls or not, then send a call to SIP agent on both case. If user already on call they will get notifies on their second line. But however want to notifies the ISDN caller as well as User was busy on another call without using any custom music file play on their channel.

Version :
Yate - 6.0.1
Technology ; SIP
Trunk : ISDN E1 PRI
Card : Digium E1 PRI Card.

Methods are described here :
https://www.etsi.org/deliver/etsi_en/300001_300099/30005801/01.02.04_60/en_30005801v010204p.pdf

4
Yate users hangout place / Help me on Mutex Problem
« on: August 11, 2019, 06:32:56 AM »
Hi,

As i am trying to create the connection through http to SIP for webrtc connection. But while making a call , am getting this error.

<FAIL> Thread 'YSIP Worker' could not lock mutex 'SslSocket' owned by 'HTTPServer connection' waited by 0 others for 10000000 usec!

How do i solve this. help me on this.

5
Yate users hangout place / WebSocket Handler
« on: July 06, 2019, 11:52:56 PM »
As i need to listen the websocket data which is running on particular port(ws or wss) through yate module. Any hint to start listen the data and use it.

Websocket required login authentication (port,username,password).

Ex: Asterisk ARI running on 8088 & 8089 port and need to put handler to handle channel event and process through yate messaging system through cpp module.

As i noticed socket binding and websocket module from yate-extra(https://github.com/vir/yate-extra) but don't have any clue to bind and run the loop continuously to handle the message.

Kindly help me out with possibility with any sample if possible.

6
Yate users hangout place / Drop SIP Channel if RTP failed
« on: January 16, 2019, 03:36:23 AM »
Hi,

As i experienced issue as in-between middle of the SIP call there was an network issue and yate shows this error log and my calls was disconnected. But channels are not cleared until restarting of yate service.

ErrorLog :
2019-01-10_07:44:18.353790 <NOTE> RTP send failed (local=192.168.1.254:30522 remote=192.168.1.189:4016): 22 Invalid argument
2019-01-10_07:44:19.000387 <sip:WARN> Transport(general) Socket send error: Network is unreachable (101) [0x25845c0]
2019-01-10_07:44:19.957242 <NOTE> RTCP send failed (local=192.168.1.254:19815 remote=192.168.1.78:10121): 22 Invalid argument
2019-01-10_07:44:20.079785 <NOTE> RTCP send failed (local=192.168.1.254:21143 remote=192.168.1.91:10053): 22 Invalid argument
2019-01-10_07:44:22.745151 <NOTE> RTCP send failed (local=192.168.1.254:30523 remote=192.168.1.189:4017): 22 Invalid argument

So i wish to drop those channel by handling the messages or any other way to do by altering ysipchan.cpp.

Kindly point me to proper function alter this because i didn't noticed any message to put handler and do drop channel action.

7
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.

8
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.

9
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 .




10
Yate users hangout place / No Ringtone Custom Queue In Handle
« on: October 22, 2018, 01:30:31 AM »
Hi

As am using custom handling for Queue Incoming module. But unable to playback the ringtone or custom music to the customer end.

Here you can find the code : https://paste.linux.community/view/7d30f87c

Also tried to attach once channel connected as well with mentioned below code.

Code: [Select]
Message* m = new Message("chan.attach");
m->copyParam(msg, "id");
m->addParam("source", "tone/ring");

But there is no ringtone on customer end.

11
Yate users hangout place / Call Queue Dropping automatically
« on: October 09, 2018, 06:52:00 AM »
Hi

As i just configured queue module but as i seen operator side, calls  ringing and immediately disconnected with single beep every time instead of constant ringing if maxcall was not mentioned or mentioned very lower seconds.

If i mentioned as 20 sec for maxcall then it's keep ringing even if customer call disconnected earlier.

So how do i overcome this.

Log are available at : https://paste.linux.community/view/9be878d9 

12
Yate users hangout place / Global Parameters for All Messages on yate
« on: September 30, 2018, 02:19:57 PM »
Hi

Is tht any possibilities to configure set of parameters globally and assign values initially/between on processing and use it every yate messages for entire call ?.

Example :
Assign parameters and value on call.execute and access it call.cdr ,chan.startup,call.answered, chan.dtmf, chan.hangup,chan.connected etc..?.

It would be great if yate to apply handler on those message and process it without gathering value from database everytime for each handler from custom scripts.

13
Yate users hangout place / Audio files as Loop Instead of call ringing
« on: September 28, 2018, 12:53:04 AM »
Hi

How do  i play audio files (file1,file2..) to customer who called in inbound as a loop until sip user answered.

Scenario :
  • Customer called as inbound.
  • call.route checking users
  •   call.execute with fork  calling list of users.
  • It's ringing when called in inbound. If system generated call to customer then while using chan.masquerade with call.execute then no ringing.it's been silent
In these both cases how do i play audio instead of ringing/silent as a loop until call answered by sip user.

As i seen mail list to play audio to the caller like mentioned below.
m = new Message("chan.masquerade")
m->addparam("message","chan.attach");
m->addparam("id",peerid of call.execute);
m->addparam("source","wave/play/fullpath/audio.au");

But as i guess it won't work as loop/instead of ringing.

Kindly help me on this.

14
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 !

15
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

Pages: [1] 2