Register Message SIP

gianfranco

Member
Licensed User
Longtime User
The register string message is not correct.
Please che the string message:

Call-ID: [email protected]
CSeq: 3212 REGISTER
From: "105" <sip:[email protected]>;tag=2356888699
To: "105" <sip:[email protected]>
Via: SIP/2.0/UDP 10.0.0.204:36111;branch=z9hG4bK430777a3ead9b2e4f51 b39f7f569ddb63438;rport
Max-Forwards: 70
User-Agent: SIPAUA/0.1.001
Contact: *
Expires: 0
Content-Length: 0

Contact=* (incorrect )
Expires=0 (It not can be 0 , 0= Remove Binding)

Gianfranco
 

gianfranco

Member
Licensed User
Longtime User
This is scenarious:
1 - SDK send registation
2 - Server respond with Authenticate request
3 - SDK re send registation with autenticate, but expired time is "0" value
4 - When server receive "Expires: 0" it must remove binding.

This is a normal sequence in Sip protocoll,
Another problem is in the source port:
If I set "5060" port value, it must use 5060 to send and receive packet, not source port in random mode.

All the response are in RFC 3261 Session Initiation Protocol.

Gianfranco
 

gianfranco

Member
Licensed User
Longtime User
If this is Sip of android it is most poor.
All the best Sip function aren't include.

Hold call
Transfer call
Parking call
DND
Capture call
....


If your UDP socket are stable I try to write a library for complete Sip message.

Can I fired with your library only RTP audio?

Regards
Gianfranco
 

timwil

Active Member
Licensed User
Longtime User
I found that the SIP library does not register with my SIP Server (I am running Brekeke on my own server) although it does allow me to call another user on that server!

So I decided to write my own in B4A. I have the REGISTER portion working properly in an activity. I will be moving it to a service and add Keep Alive packets as it is going thru UDP. As soon as I get the INVITE working I will post the code.
 

gianfranco

Member
Licensed User
Longtime User
I have write code to register, it work, but the socket are not stable, it aren't strong for elevate traffi.
The problem is android not library.

SIP not is for android.


Regards
Gianfranco
 

timwil

Active Member
Licensed User
Longtime User
I have the REGISTER working with no problem on 2.3.7 cyanogen running on a LG GT540 also on an 2.2 FroYo running on a Elonex eTouch 10" Tablet. I can unREGISTER it by setting the expires flag to 0.

I can also INVITE a session consistently and BYE to close it off.

I am just having an issue with User A calls User B. If User A wants to end the call no problem. If User B wants to end it - there is a problem. I know it is something small (and stupid :) )

As soon as I get this bug resolved then I will post what I have and maybe it would be of some assistance.

The SIP section is running as a service callable from the Activity as a CallSub()

Note that this is the SIP portion ONLY! This will allow the two clients to see each other and obtain each others actual IP address and Port but WILL NOT transfer any audio at this time!

Note also that it is using UDP so there are some error checking that will have to be implemented - time outs and such.

Not bad for a week's work hey? :)

B4A is simply the very best !:sign0098:
 

timwil

Active Member
Licensed User
Longtime User
OK I am tired and probably missing something small and right in my face :(

This code runs on Android 2.2 tablet and 2.3 phone

It REGISTERs (at least with my own server)

it unREGISTERS (expires = 0)

it INVITEs to the two softphones I have been testing with (open source peers and a demo of VaxSIPUser)

there is NO audio back and forth

if you call another User Agent Client (UAC) it will answer and make the connection
if you say BYE from a call that you have made it will hang up properly
if the other side says BYE it will hang up properly

it will answer a call from another UAC but if you do you cannot end the call - they have to end the call

hopefully this will be useful to someone out there - it will certainly be for me :)

EDIT:

You will need the following libraries:
encryption (1.10) - for the MD5 digest in authorization
byte conversion (1.10) - for the MD5
network (1.11) - for the UDP sockets
StringUtils (1.02) - for string-y goodness :)
 

Attachments

  • tawsip.zip
    10.4 KB · Views: 281
Last edited:

gianfranco

Member
Licensed User
Longtime User
Try with lullaby client and see if you have problem.
Make this test:
-Android make a call
-Lullaby accept
-Lullaby send hold and transfer to new client
Android speak with and listen with new client
In Lullaby or Lullaby SDK you try alla sip message Features


http://80.67.112.24/Lullaby.zip

Regards
Gianfranco
 
Top