[ previous ] [ next ] [ threads ]
 To :  Ganapathi Chidambaram <ganapathi.rj@g...>, yate@v...
 From :  Jamie Gordon <jamie@d...>
 Subject :  Re: Re :Re: [yate] [ YATE 6.0 ] Routing call using PgSQL Storedfunction
 Date :  Sat, 30 Sep 2017 15:51:14 +0100
I don't think it can be done that way, not easily.

I was going to refer you to my forum post, but it looks like you've 
already read it !

http://forum.yate.ro/index.php?topic=1545.0

Monica recommended doing forking to multiple endpoints using an external 
script.

Is that what you're trying to do or a single location ?




On 30/09/2017 15:46, Ganapathi Chidambaram wrote:
> As i am trying to do by forking method only. Please help me to do 
> return for forking method.
>
>
> Regards,
> Ganapathi
>
>
>
> From : Jamie Gordon 
> TO : Ganapathi Chidambaram 
> Sent : Sat, Sep 30, 2017 08:12 PM,
> Subject: Re: [yate] [ YATE 6.0 ] Routing call using PgSQL Stored function
>
> Hi Ganapathi,
> At a quick glance  ...
> 1) You only want to return 1 row for routing.
>
> 2) You don't appear to be doing any forking, please correct me is 
> wrong, so set location to eg 'sip/sip:4444407@1...:5060 
> ', instead of using callto. 
> ( Forking is easier in an external module )
>
> 3) Make sure route is enabled in register.conf file
>
> Hope this helps!
>
> Regards
> Jamie
>
>
>
> On 30/09/2017 13:43, Ganapathi Chidambaram wrote:
>> 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:
>>
>> *fieldvalue*
>> trace4444407
>> callto.1sip/sip:4444407@1...:5060 
>> 
>> dtmfpassfalse
>> locationfork
>> pbxassisttrue
>> copyparamspbxassist,dtmfpass
>> tonedetect_outtrue
>> callto.1.secureyes
>>
>> 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
>>
>>
>
> -- 
>
>
> Jamie Gordon
>
> Office: +44 (0)330 3310810
> Mobile: +44 (0)781 7639737
> http://www.digitallines.net
>
>
>
> Digital Lines Limited's registered office is Snappers, Church Road, Rudgeway, Bristol BS35 3SH. Registered in England, number 05293518
>
> ***************************************************************************************************************
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify the system manager.

-- 


Jamie Gordon

Office: +44 (0)330 3310810
Mobile: +44 (0)781 7639737
http://www.digitallines.net



Digital Lines Limited's registered office is Snappers, Church Road, Rudgeway, Bristol BS35 3SH. Registered in England, number 05293518

***************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify the system manager.





  
    
  
  
    

I don't think it can be done that way, not easily.

I was going to refer you to my forum post, but it looks like you've already read it !

http://forum.yate.ro/index.php?topic=1545.0

Monica recommended doing forking to multiple endpoints using an external script.

Is that what you're trying to do or a single location ?




On 30/09/2017 15:46, Ganapathi Chidambaram wrote:
As i am trying to do by forking method only. Please help me to do return for forking method.


Regards,
Ganapathi



From : Jamie Gordon <jamie@d...>
TO : Ganapathi Chidambaram <ganapathi.rj@g...>
Sent : Sat, Sep 30, 2017 08:12 PM,
Subject: Re: [yate] [ YATE 6.0 ] Routing call using PgSQL Stored function

Hi Ganapathi,
At a quick glance  ...
1) You only want to return 1 row for routing.

2) You don't appear to be doing any forking, please correct me is wrong, so set location to eg 'sip/sip:4444407@1...:5060', instead of using callto. ( Forking is easier in an external module )

3) Make sure route is enabled in register.conf file

Hope this helps!

Regards
Jamie



On 30/09/2017 13:43, Ganapathi Chidambaram wrote:
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
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



-- 


Jamie Gordon

Office: +44 (0)330 3310810
Mobile: +44 (0)781 7639737
http://www.digitallines.net



Digital Lines Limited's registered office is Snappers, Church Road, Rudgeway, Bristol BS35 3SH. Registered in England, number 05293518

***************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify the system manager.

-- 


Jamie Gordon

Office: +44 (0)330 3310810
Mobile: +44 (0)781 7639737
http://www.digitallines.net



Digital Lines Limited's registered office is Snappers, Church Road, Rudgeway, Bristol BS35 3SH. Registered in England, number 05293518

***************************************************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify the system manager.