[ previous ] [ next ] [ threads ]
 To :  "Yate mailing list" <yate@v...>
 From :  "Ganapathi Chidambaram" <ganapathi.rj@g...>
 Subject :  [ YATE 6.0 ] Routing call using PgSQL Stored function
 Date :  Sat, 30 Sep 2017 12:43:46 +0000
Hi
As i used pgsql stored function to route a call to user/group. Whereas i am getting result properly but even though calls are not routing to the user .
find the below mentioned configuration for the same.
register.conf
query=SELECT * FROM route_master('${billid}','${called}','${trace}');
result=location

Output of PgSQL:
field value
trace 4444407
callto.1 sip/sip:4444407@1...:5060
dtmfpass false
location fork
pbxassist true
copyparams pbxassist,dtmfpass
tonedetect_out true
callto.1.secure yes
Logs :
 Query for 'db.1' returned 8 rows, 8 affected [0xcbd510]
Returned true 'database' delay=0.230988
  thread=0x7f6e54002c10 'Call Router'
  data=0x7f6e4c006200
  retval='(null)'
  param['account'] = 'technobureau_db'
  param['query'] = 'SELECT * FROM route_master('1506767265-8','4444407','');'
  param['results'] = 'true'
  param['handlers'] = 'pgsqldb:100'
  param['columns'] = '2'
  param['rows'] = '8'
  param['affected'] = '8'
  param['dbtype'] = 'pgsqldb'
2017-09-30_17:34:43.806147  Skipping void route #2
2017-09-30_17:34:43.806158  Skipping void route #3
2017-09-30_17:34:43.806172  Skipping void route #4
2017-09-30_17:34:43.806182  Skipping void route #5
2017-09-30_17:34:43.806192  Skipping void route #6
2017-09-30_17:34:43.806202  Skipping void route #7
2017-09-30_17:34:43.806211  Skipping void route #8
Call.cdr :
Status :hangup
Reason : Offline

But actually user logged-in.
Kindly help me out.
Regards,
Ganapathi



Hi

As i used pgsql stored function to route a call to user/group. Whereas i am getting result properly but even though calls are not routing to the user .

find the below mentioned configuration for the same.

register.conf

query=SELECT * FROM route_master('${billid}','${called}','${trace}');
result=location

Output of PgSQL:

field value
trace 4444407
callto.1 sip/sip:4444407@1...:5060
dtmfpass false
location fork
pbxassist true
copyparams pbxassist,dtmfpass
tonedetect_out true
callto.1.secure yes

Logs :

<pgsqldb:ALL> Query for 'db.1' returned 8 rows, 8 affected [0xcbd510]
Returned true 'database' delay=0.230988
  thread=0x7f6e54002c10 'Call Router'
  data=0x7f6e4c006200
  retval='(null)'
  param['account'] = 'technobureau_db'
  param['query'] = 'SELECT * FROM route_master('1506767265-8','4444407','');'
  param['results'] = 'true'
  param['handlers'] = 'pgsqldb:100'
  param['columns'] = '2'
  param['rows'] = '8'
  param['affected'] = '8'
  param['dbtype'] = 'pgsqldb'
2017-09-30_17:34:43.806147 <register:WARN> Skipping void route #2
2017-09-30_17:34:43.806158 <register:WARN> Skipping void route #3
2017-09-30_17:34:43.806172 <register:WARN> Skipping void route #4
2017-09-30_17:34:43.806182 <register:WARN> Skipping void route #5
2017-09-30_17:34:43.806192 <register:WARN> Skipping void route #6
2017-09-30_17:34:43.806202 <register:WARN> Skipping void route #7
2017-09-30_17:34:43.806211 <register:WARN> Skipping void route #8

Call.cdr :

Status :hangup
Reason : Offline

But actually user logged-in.

Kindly help me out.

Regards,
Ganapathi