Author |
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: January 18 2006 at 12:25pm | IP Logged
|
|
|
Hi, Support,
One of our customers configured their registration server to authenticate both user name and password, we tried several softphones in the market which can send username and password and they all registered fine. But in Lanscape Engine the API "EnableSipRegisterServer" only accept "NamesToRegister" as a parameter, I could not find related info about the password. is it like to put username and password in a formated string and pass it as "NamesToRegister" to "EnableSipRegisterServer" ?
thanks,
will
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 18 2006 at 4:03pm | IP Logged
|
|
|
Hi Will,
To allow the media engine to fulfill authentication challenge requests, your app can call the following API proc:
TELEPHONY_RETURN_VALUE AddAuthorizationCredentials(
SIPHANDLE hStateMachine,
char *pUserName,
char *pPassword,
char *pRealm
);
Look it up in the developer's reference. Once you call this API proc using the required username, password and authentication realm (usually your VOIP domain name), the authentication process will be handled automatically when your application receives a challenge response.
Repost as required.
Support
|
Back to Top |
|
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: January 18 2006 at 5:38pm | IP Logged
|
|
|
Hi, support,
thanks to the reply.
my another question is after calling "AddAuthorizationCredentials" with username and password, do we still need to call "EnableSipRegisterServer", and BTW, is the return value of "AddAuthorizationCredentials" the same set as
the retun value of "EnableSipRegisterServer"? because we need the retun value to see if the call has been made successfully or not.
regards,
will
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 18 2006 at 6:30pm | IP Logged
|
|
|
Hi Will,
If you want to REGISTER with a SIP registrar, then yes you will still have to call the EnableSipRegisterServer API proc.
Note: Be sure to call the AddAuthorizationCredentials() API proc before you do anything that transmits a SIP message to another end point (like registering or making a phone call).
You>>>
Is the return value of "AddAuthorizationCredentials" the same set as the retun value of "EnableSipRegisterServer"?
<<< Support
Well the data types are the same but the return values are different because they are different functions. Think of it this way: the AddAuthorizationCredentials proc basically allows you to add challenge authorization credentials to an internal list the media engine maintains. If you perform a REGISER operation that is challenged by the far end SIP registrar, then the media engine will attempt to fulfill the challenge response using auth credentials you added to the internal list. If the REGISTER operation fails, then your app will get the return value of "SipRegisterAuthorizationError" from the engine. Take a look at the return values for the EnableSipRegisterServer API proc. Also see the SipRegisterAuthorizationError event in the help file.
Repost as needed.
Support
|
Back to Top |
|
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: January 19 2006 at 2:02pm | IP Logged
|
|
|
Hi, Support,
it does not work, I decribe the senario as follows:
the sequence of calling the apis to do registration is:
1: call "AddAuthorizationCredentials" with the username, password and their server's IP address.
2. call "EnableSipDomain"
3. call "EnableSipProxyServer"
4. call "EnableSipRegisterServer"
so far everything works fine, no errro msg is returned, but when we make a call, it says "caller experienced fata error" which I traced in the code, shoule be "FarEndError()". But we can make call by using SJphone with same configuration.
I notice there are sth about "SetChallengeAuthenticationState" and "VerifyChallengeResponse" in the apis, shall we also call sth like them to set the authentication mode to "www or proxy"?
I am sending the sip msg log to you by email and also give you the account info which we used SJ phone to make call, if you are interested, you could try.
thanks,
will
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 19 2006 at 5:00pm | IP Logged
|
|
|
Hi Will,
We looked at your log file. Thanks for sending that.
We configured a lanscape soft phone built with the media engine and called extension 55505 with no problems. when we called, we heard an asnwering machine like voice and then hung up.
Here is what we found by looking at your log file:
Your app is registering ok with the OpenSer server. It registers as user agent 600.
The call however is getting the error code 403 returned. See your sip log file. Here is the response from your log file:
<<<< RxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRxRx (203 Ms, From: 213.173.161.60:5060) <<<<
SIP/2.0 403 Use From=ID
Via: SIP/2.0/UDP 207.81.158.209:5060
From: VocalScape <sip:VocalScape@213.173.161.60>;tag=4e299e6
To: <sip:55505@213.173.161.60>;tag=b586b9ac23a097c952f2041 06372aa78.c147
Call-Id: 93bc1537-4a21-453d-a42d-41d710d4a005@207.81.158.209
CSeq: 81963140 INVITE
Server: OpenSer (1.0.0 (i386/linux))
Content-Length: 0
Warning: 392 213.173.161.60:5060 "Noisy feedback tells: pid=26165
req_src_ip=207.81.158.209 req_src_port=5060 in_uri=sip:55505@213.173.161.60
out_uri=sip:55505@213.173.161.60 via_cnt==1"
Look at the line "SIP/2.0 403 Use From=ID". This information is very important. If you look up error code 403 in the SIP protocol RFC, you will see that it is returned when you attempt a "forbidden" SIP operation. The OpenSer server actually goes a step farther to try to tell us the source of the error. It does not like your "From=ID". If you look at the user name in your SIP INVITE's "From:" header, you will see that you have configured your app to use the "phone name "Vocalscape". That's no good. You are registered as user "600" but when you make a call, you are telling OpenSer that the call is coming from user "Vocalscape". that's what seems to be causing the error.
To fix this, change the string you specify in the START_SIP_TELEPHONY_PARAMS structure that you pass to the StartSipTelephony API proc. Make sure the pPhoneName parameter points to a string that is the same as the name you are registering ("600").
If you change the name of your phone, you should be ok.
For comparison, here is the INVITE message your app sent and here in the INVITE message our soft phone sends:
Vocalscape:
----------------------------------------------------
INVITE sip:55505@213.173.161.60 SIP/2.0
Via: SIP/2.0/UDP 207.81.158.209:5060
From: VocalScape <sip:VocalScape@213.173.161.60>;tag=4e299e6
To: <sip:55505@213.173.161.60>
Contact: <sip:VocalScape@213.173.161.60:5060>
Call-Id: 93bc1537-4a21-453d-a42d-41d710d4a005@207.81.158.209
CSeq: 81963140 INVITE
Max-Forwards: 70
Organization: AE3D67E5-07EA-4F2C-9C0F-A0C849842367
Proxy-Authorization: Digest algorithm=md5,
nonce="43cff82fa28653f39bd010362876f11d051944b3", realm="213.173.161.60",
response="f70d7c1e8ff259f5c2c512dcacac5bac", uri="sip:55505@213.173.161.60",
username="600"
Content-Length: 209
User-Agent: LanScape VOIP Media Engine/5.10.0100 (www.LanScapeCorp.com)
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
v=0
o=VocalScape 81947093 81947093 IN IP4 207.81.158.209
s=LanScape
c=IN IP4 207.81.158.209
t=0 0
m=audio 16306 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-15
LanScape:
----------------------------------------------------
INVITE sip:55505@213.173.161.60 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.2:10000
From: 600 <sip:600@213.173.161.60>;tag=1f8016e;x-UaId=xxxxx-yyyy -zzzzzz
To: <sip:55505@213.173.161.60>
Contact: <sip:600@213.173.161.60:5060>;x-inst=VGVzdCBDYWxsIERhd GEgZnJvbSB0aGUgVlBob25lIGFwcC4=
Call-Id: 6401f1a2-2f9d-40e0-b136-a00dbda1e343-00000f9c@70.92.187.124
CSeq: 33013065 INVITE
Max-Forwards: 70
Organization: 1D05B88F-516D-483E-B5A1-E22654099440
Proxy-Authorization: Digest algorithm=md5, nonce="43d028b90bca3213f18994add13247e36e66c648", realm="213.173.161.60", response="36c28f798aa9ae2923d640b21925dac9", uri="sip:55505@213.173.161.60", username="600"
Content-Length: 200
User-Agent: LanScape VOIP Media Engine/5.11.0205 (www.LanScapeCorp.com)
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
v=0
o=600 33012906 33012906 IN IP4 70.92.187.124
s=LanScape
c=IN IP4 70.92.187.124
t=0 0
m=audio 19004 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-15
We will send you a complete log file from our phone call.
By the way, when we terminated the call, the OpenSer server sent us a "300 Redirect" response. Note that the media engine does not process a redirection response as of yet. If you would, get a short description of how the customer is using the redirect response and send it to us so we can include this functionality in a later revision.
Support
|
Back to Top |
|
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: January 19 2006 at 5:54pm | IP Logged
|
|
|
Hi, support,
thank you so much for your effort,
we are changing code now and let you know the result,
as to the "redirect response", we will contact the customer and let you know,
will
|
Back to Top |
|
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: January 19 2006 at 6:26pm | IP Logged
|
|
|
hi, support,
thanks again, it is working now.. and I will let you know the "redirect response" shortly after
regards,
will
|
Back to Top |
|
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: January 23 2006 at 6:41pm | IP Logged
|
|
|
Hi, support,
Sorry, I think I made a confusion, I said it worked, because we tried to call that number and heard the voice message(nobody picked upthe phone) from the other side, no real talking. And the next day another guy used the softphone to make a real talk to another side, then the problem comes: the far end could hear him but he could not hear the far end, although he could also hear the voice message if the far end did not pick up the phone.
You can also try it with the number I gave you.
But when we configure the SJPhone to use G7.11, the SJPhone works fine with the far end. Could it be the codecs problem on the far end? Why it does not have any problem with SJPhone.
thanks,
will
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 24 2006 at 9:06am | IP Logged
|
|
|
Will,
When "one way audio" is the problem, it is an indication that something is not configured properly. You should compare SIP logs from your media engine based application and the SJPhone. Sounds to me like the far end of the call is not sending his voice media to the proper source caller IP address. If you look at the logs, you will find the answer.
Support
|
Back to Top |
|
|
|
|