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

Pages: [1] 2 3
Linux / Re: upgrade yate
« on: February 05, 2017, 06:43:50 AM »
You can upgrade. Check the changelog to see what has changed, but normally it sould be possible without any implications.

You receive 0-N call.cdr messages, because yate emits a new message every  time something in the call state has changed.
Therefore you should register a handler for call.cdr, but check the field 'operation' which is "initialize" (once), "update" (several times) or "finalize" (once the call has ended).
When receiving the operation=finalize message, you can do your tale updates.

Moreover, in case you use connection pooling, the cdr initialize/update/finalize messages do NOT come in order. There might be a finalize message appearing before an update message or even before the 'initialize' message. That is because yate queues the messages before sending them to the sql server but sends them in the best order regarding performance.
So in your SQL-Query you should make sure only to update the database records when you receive the 'finalize' message and if the call already has ended (record if ended=true in database and check on each initialize or update if it already ended) do not touch it anymore.
See bottom example implementation of a cdr initialize/update/finalize sql procedure.

I dont understand what you are trying to do.

Do you want the script to update ALL cdrs or just the one for the current channel the script is working on?
If you want to update a cdr record only if the call has finished, then wait until the cdr.finalize message is sent. If you receive this, you can flag the call as ended and perform post operations (run an sql or something like that) on the database record.

SIP to H.323 proxy / Re: custom H323 header
« on: February 05, 2017, 06:28:04 AM »
How did you try it?

Sending a custom SIP header is done via 'osip_' prefix. E.g. if you want to send a field called 'userdata', then in sip it would be osip_userdata=theactualdata.
I am not sure for h323, but you can look into the yate source of the h323 module (maybe this: or give oh323_userdata=<...> a try.

« on: February 05, 2017, 06:24:23 AM »
A quick google search reveals:

collecting cdr information: (code at the bottom)


There is no billing module that does all the work.
You need to do the routing and configure yate to record the cdrs (see above). Based on the cdr information you can do the billing, but you need to develope your own software/scripts to do the calculations.

Yate users hangout place / Re: Call logs empty?
« on: February 05, 2017, 06:20:06 AM »
enable logging and logging level in the configs or just start yate with parameter '-v'. the more 'v's you add, the more detailed the log will become, e.g. yate -vvvvvvvvvvvvvvv

Yate users hangout place / Re: YATE DOCUMENTATION
« on: February 05, 2017, 06:18:46 AM »
Always depends on what you are doing.
There are plenty of information in the news group (just google) and you can ask here in the forum or in IRC (freenode, #yate).

Moreover yate ships with several scripts (php, python, etc.) and freesentral, you can look into the source and learn from it or adapt the scripts to your needs.

Yate users hangout place / Re: Play the file after the call
« on: June 04, 2015, 04:32:21 AM »
Thank you very much for your help.
Figured out how it should work.

parti3an, please provide your solution here so that others can benefit as well, thanks.

YateBTS / Re: Error !! Could not open for writing on NIB (Regexp)
« on: March 22, 2015, 04:24:42 AM »

You can run as root:
chmod a+rw /usr/local/etc/yate/

No, don't do that. If you need the yate-user and the apache-user to access this file, create a new group e.g. apacheyate, put both users in that group and give that group permission to change the file. if you use a+rw then everybody can modify the file and you don't want that e.g. if you have several users who can access the server or your server gets hacked.

Should work like this:
Code: [Select]
// add group
addgroup  apacheyate

// add existing users for apache and yate to that group
useradd -G apacheyate apache
useradd -G apacheyate yate

// give group access to the file
chgrp apacheyate /usr/local/etc/yate where subscribers.conf

// give group permission on the file
chmod g+rw /usr/local/etc/yate where subscribers.conf

// remove write for all other users that are not owner of or in same group as file
chmod a-wx /usr/local/etc/yate where subscribers.conf

Yate based projects / Re: CDRs in STP mode
« on: February 16, 2015, 01:39:58 AM »
Don't know about STP but do you mean extmodule and connect with a TCP client to that with a listener for CDR messages?

Other Yate server issues / Re: CallerID setup
« on: January 15, 2015, 04:12:06 AM »
Just out of curiosity:
Which yate version did you install?
I think the ubuntu sources do not provide the latest yate version.

You can find updated packages here:

Yate users hangout place / Re: incoming Registration send in roundrobin
« on: January 15, 2015, 03:17:46 AM »
So, what did you do to solve your problem? Maybe that is interesting for others as well, please share.

Yate users hangout place / Re: cdr not working
« on: August 17, 2014, 02:13:58 AM »
You can for example introduce a custom SIP header field in call.route like osip_OriginalID=${billid} which then is put into the SIP Header as sip_OriginalID.

Moreover, take care when using connection pooling! Sometimes the finalize-statement hits the database server before initialize-statement, read:  (upsert)

Other Yate server issues / Re: Yate tuning How to?
« on: April 21, 2014, 11:23:07 PM »
What is your expected workload?
Yate performs very well with default settings.

Features requests / Re: WebSocket
« on: February 15, 2014, 07:22:41 AM »
+1 for this thread
cc08: yes, indeed.

Pages: [1] 2 3