asterisk callid vs uniqueid

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
MRSAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ron MalmsteadInformation Services ManagerCommented:
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
MRSAuthor Commented:
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
Ron MalmsteadInformation Services ManagerCommented:
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

MRSAuthor Commented:
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
Ron MalmsteadInformation Services ManagerCommented:
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
MRSAuthor Commented:
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
Ron MalmsteadInformation Services ManagerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MRSAuthor Commented:
Thanks for all the info...
0
Gabriel FernandezCommented:
how can i get SIP Header info in Ozeki C# SIP SDK?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Voice Over IP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.