MRS
asked on
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
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
ASKER
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..
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=${SIP CALLID}-${ 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.
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=${SIP
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.
ASKER
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?
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?
In your dialplan.. you would have something like this..
exten => _1XXX,1,SIPAddHeader(X-UNI QUE-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.
exten => _1XXX,1,SIPAddHeader(X-UNI
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.
ASKER
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for all the info...
how can i get SIP Header info in Ozeki C# SIP SDK?
http://www.voip-info.org/wiki/view/Asterisk+cmd+SipAddHeader