[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

asterisk callid vs uniqueid

Posted on 2014-08-06
9
Medium Priority
?
2,009 Views
Last Modified: 2014-10-01
We have written a softphone in VB.NET that connects to a Asterisk PBX.  In looking at the asterisk database, I see that there is a UNIQUEID for each call.  But SIP seems to use a CALLID field as the key value for calls.

Does anyone know of a way to convert a UNIQUEUID to a CALLID or visa versa?  Or is there a what to have the UNIQUEID passed in the SIP message?  Or CALLID stored in the Asterisk Database?

Thanks in advance
0
Comment
Question by:MRS
  • 4
  • 4
9 Comments
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 40246422
Take a look at SipAddHeader, if you want to place additional info in the sip message.

http://www.voip-info.org/wiki/view/Asterisk+cmd+SipAddHeader
0
 

Author Comment

by:MRS
ID: 40246480
I tried something similar to that, but it doesn't seem to work when you are using SIP connections, only when you are dealing with Asterisk directly..
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 40246618
A SIP channel has a variable.. ${SIPCALLID}
This is the "Call-ID:"  in the Sip Header message.
You can access it in the dialplan to store it in the DB.

Additionally you have the ${UNIQUEID}, which is the current call id.

You could possibly combine these two into the Asterisk DB..
For example..   Set(__ConversationID=${SIPCALLID}-${UNIQUEID}), or place them in seperate columns for query purposes.

Otherwise, SipAddHeader() is the only way I'm aware of to introduce extra information into the Sip Header message.
I believe this only comes accross on the initial INVITE message though.
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 

Author Comment

by:MRS
ID: 40247121
I am not sure I follow.  I am still pretty new to Asterisk.  Is that something I could force into the SIP header so that the UniqueID would be returned?

I am using a 3rd party control (ozeki) to handle the communicate with the PBX via SIP/UDP, so I don't know if the commands that are in the link you sent will work?
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 40247162
In your dialplan.. you would have something like this..

exten => _1XXX,1,SIPAddHeader(X-UNIQUE-ID: ${UNIQUEID})
exten => _1XXX,n,Dial(SIP/${EXTEN})
..then in your sip phone application, you would need to examine the first sip INVITE message.. to get the information.
0
 

Author Comment

by:MRS
ID: 40248743
Thanks for all the info.  How do I modify a dialplan on the Asterisk box.  Would I add those lines to the extensions.conf or something?
0
 
LVL 25

Accepted Solution

by:
Ron Malmstead earned 2000 total points
ID: 40248888
What version/flavor of Asteriskare you running?

..in Asterisk Open Source, yes you would modify your extensions.conf file, save it ..then you would open the Asterisk CLI  by typing "Asterisk -r" in a terminal window..  then issue the command "extensions reload" or "dialplan reload".

Some packaged versions of Asterisk it is a little different method since they have dialplans controlled by a web interface.. for example Trixbox, Asterisk GUI..
0
 

Author Closing Comment

by:MRS
ID: 40279374
Thanks for all the info...
0
 

Expert Comment

by:Gabriel Fernandez
ID: 40355822
how can i get SIP Header info in Ozeki C# SIP SDK?
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why do some people recommend buying business VoIP from an ISP? What are the benefits to my company? What are the costs?
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month20 days, 1 hour left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question