summaryrefslogtreecommitdiffstats
path: root/callagent
AgeCommit message (Collapse)AuthorFilesLines
2015-07-24rand: 1^N == 1 all the time..Holger Hans Peter Freyther1-1/+1
2015-07-24test: Remember the right collectionHolger Hans Peter Freyther3-3/+9
When executing multiple tests we might not have the collection we want anymore. Some tests don't stop all the timers so we have a retransmit and this would cause an exception and log spam.
2015-07-24cseq: Make the testcases work with different cseq as wellHolger Hans Peter Freyther1-36/+39
2015-07-24pharo: Allow converting the authorization message as wellHolger Hans Peter Freyther1-0/+4
We need >>#do: as nextPutAllOn: is not called/doesn't exist in this dialect.
2015-07-24tests: Modernize and use >>#assert:equalsHolger Hans Peter Freyther2-24/+24
Modernize the tests to use the >>#assert:equals: protocol as this allows creating/finding failing tests earlier.
2015-07-24base64: Remove method we don't useHolger Hans Peter Freyther1-13/+0
Avoid porting issue with the MIMERWStream and just kill the method
2015-07-24cseq: Fix the log message and print old and new cseqHolger Hans Peter Freyther1-1/+1
2015-07-24cseq: Use asString for portability with pharoHolger Hans Peter Freyther2-6/+6
2015-07-23pharo: Update the conversion codeHolger Hans Peter Freyther1-0/+4
PetitParser has a PPContext in newer versions but the GST code is older and doesn't have it. Provide an alternative impl. Provide >>#do: for the SIPVia for Pharo to print the data Avoid importing MIMERWStream as it is dead in Pharo
2015-03-20use an IPv4 address instead of localhostHolger Hans Peter Freyther1-1/+1
Depending on the host OS localhost might resolve to something we can't handle properly. In a FreeBSD jail this started to behave oddly. There is no point to force AF_INET6 for this test. open("/etc/hosts",O_CLOEXEC,0666) = 3 (0x3) fstat(3,{ mode=-rw-r--r-- ,inode=12621,size=1138,blksize=4096 }) = 0 (0x0) read(3,"# $FreeBSD: src/etc/hosts,v 1.16"...,4096) = 1138 (0x472) read(3,0x80282e000,4096) = 0 (0x0) close(3) = 0 (0x0) __sysctl(0x7fffffffaff0,0x4,0x0,0x7fffffffb070,0x0,0x0) = 0 (0x0) __sysctl(0x7fffffffaff0,0x4,0x82b0aa300,0x7fffffffb070,0x0,0x0) = 0 (0x0) socket(PF_INET6,0x10000002,17) = 3 (0x3) connect(3,{ AF_INET6 [::1]:1 },28) = 0 (0x0) getsockname(3,{ AF_INET6 [2a01:4f8:150:70c4::5:2]:55378 },0x7fffffffafec) = 0 (0x0) ioctl(3,SIOCGIFAFLAG_IN6,0xffffaec8) ERR#6 'Device not configured' close(3) = 0 (0x0) socket(PF_INET6,0x10000002,17) = 3 (0x3) connect(3,{ AF_INET6 [::1]:1 },28) = 0 (0x0) getsockname(3,{ AF_INET6 [2a01:4f8:150:70c4::5:2]:14967 },0x7fffffffafec) = 0 (0x0) ioctl(3,SIOCGIFAFLAG_IN6,0xffffaec8) ERR#6 'Device not configured' close(3) = 0 (0x0) socket(PF_INET6,0x10000002,17) = 3 (0x3) connect(3,{ AF_INET6 [::1]:1 },28) = 0 (0x0) getsockname(3,{ AF_INET6 [2a01:4f8:150:70c4::5:2]:39503 },0x7fffffffafec) = 0 (0x0) ioctl(3,SIOCGIFAFLAG_IN6,0xffffaec8) ERR#6 'Device not configured' close(3) = 0 (0x0)
2014-09-05grammar: Speed-up quoted string parsingHolger Hans Peter Freyther2-9/+3
On the sysmoBTS (ARM7TDMI) the parsing of a simple response with quoted string takes up to 200ms. Parsing the single digest line takes 40ms itself. Create a custom parser to speed things up to avoid the backtracking between three optional parsers that are combined in a choice.
2014-09-05misc: Use separatedBy: for the beauty of reading it, no big winHolger Hans Peter Freyther1-4/+4
2014-08-29call: Handle CANCEL and verify that the right messages are returnedHolger Hans Peter Freyther3-6/+91
The code does not verify that sessionFailed is called but it does verify that the dialogue is scheduled for removal and that 487/200 is returned.
2014-08-29perf: Various changes to speed up various operationsHolger Hans Peter Freyther7-33/+79
* Do not use >>#instVarNamed:put: but add selectors * Pre-allocate some arrays with a default string to avoid re-allocations at the start * Share same parser trees to avoid construction costs * Remove some lazy allocation and always allocate it
2014-08-10callagent: Do not mix From/To in the response we generateHolger Hans Peter Freyther2-2/+3
In the SIPDialog we need to switch from/to to send messages from the right "From" but for a response we musn't do that. YATE doesn't like if we respond with From/To mixed to their BYE request.
2014-08-10misc: Re-use the parser for a great speed-up during the testsHolger Hans Peter Freyther3-32/+32
Creating a PetitParser is expensive due the usage of >>#become: so let us re-use the one from the SIPCallAgent.
2014-08-10transaction: ACK the 401 Unauthorized message before we changeHolger Hans Peter Freyther3-6/+30
So this code acks the 401 Unauthorized message. It is possible that this message is lost on the way we will not be able to respond to the 401 again. The right thing would be to "fork" off the transaction to deal with re-transmissions.
2014-08-10call: Deal with both ends hanging up at the same timeHolger Hans Peter Freyther1-0/+1
2014-07-24misc: Make code more portable by using "self basicNew initialize"Holger Hans Peter Freyther2-6/+2
2014-07-04call: For a re-invite we need to handle the ACKHolger Hans Peter Freyther1-0/+6
In case the remote will do a re-invite to verify that we are still aware of the call we need to handle >>#sessionAcked:dialog: This probably got introduced when I introduced the incoming call support that will send a 200 and receive the ACK. The incoming call will print a warning that session->session is not a valid state transition but nothing bad will happen.
2014-06-20proxy: And once more.Holger Hans Peter Freyther1-1/+1
2014-06-20auth: qop is not included by sipgate as well..Holger Hans Peter Freyther1-1/+1
2014-06-20proxy: Add the same default handling for md5Holger Hans Peter Freyther1-1/+1
2014-06-20call: Fix typo in the selector nameHolger Hans Peter Freyther1-0/+5
2014-06-20auth: Sipgate doesn't send the algorithm. assume it is md5Holger Hans Peter Freyther1-1/+1
2014-06-16call: Document the "sessionAcked" thinko and deal with it laterHolger Hans Peter Freyther1-0/+1
2014-06-05call: End the session at any hangup resultHolger Hans Peter Freyther1-0/+3
E.g. the hangup could have failed due the other side already having hung up but at some point we need to stop caring about it.
2014-06-05response: Provide a Content-Type/Content-Length as wellHolger Hans Peter Freyther2-4/+10
2014-06-05invite: Extend the testcase to actually ask for hanging upHolger Hans Peter Freyther2-0/+7
2014-06-02parser/grammar: Be able to parse domain used by Yate.Holger Hans Peter Freyther2-0/+27
It looks like "domain" is not proper in yate. Just parse it as numbers and words.
2014-06-02callagent: Avoid running into the EndOfStream exceptionHolger Hans Peter Freyther2-6/+33
2014-06-02call: Provide access to the remote SDP fileHolger Hans Peter Freyther1-0/+4
2014-05-28invite: Verify we have a remoteSDP file and it is matchingHolger Hans Peter Freyther3-8/+17
This way we can fully handle a session once the sessionNew selector is called by the code.
2014-05-28invite: Debug/test the re-transmit handling and fix itHolger Hans Peter Freyther2-2/+56
2014-05-28invite: Add code to get all the way to an ACKed sessionHolger Hans Peter Freyther3-9/+133
What is probably missing is to start a timer in case something is not acked to have a call timedout and to send a failure message to the other side.
2014-05-28invite: Deal with re-transmit of a rejected callHolger Hans Peter Freyther4-8/+37
In case our reject does not arrive and is re-transmitted we should reject it too. * Modify SIPDialog>>#checkCompatible. We have to accept that the remote does not know the tag we assigned. Be more forgiving * Send the INVITE again and count our rejects.
2014-05-28invite: First shot at handling the SIP InviteHolger Hans Peter Freyther5-7/+153
Create a SIPIncomingCall and register the dialog. The "Via" and remote handling is broken. The "respond with" is broken too. The whole dialog/request passing to the UserAgent is broken and needs to be fixed.
2014-05-27invite: Create a base class for the "call"Holger Hans Peter Freyther2-108/+138
I nee to differentiate between incoming and outgoing calls. At the same time a lot of logic can be shared. Specially at the time the call is established the hangup will work the same on both sides.
2014-05-27session: Fix a typo/grammar in the commentHolger Hans Peter Freyther1-1/+1
2014-05-27invite: Begin to handle the incoming INVITE from the networkHolger Hans Peter Freyther3-0/+97
Add a new test, inject a SIP Invite. Verify that the SIPUserAgent rejects the invite.
2014-05-27parser: Be aple to parse From/To with display_name in itHolger Hans Peter Freyther1-3/+5
A rule like "ANY star / quoted_string" will only parse the ANY rules for '0' times. Change the order to avoid this and add a small test that we properly parse the From address now.
2014-05-27parser: Fix the grammar and update the example messageHolger Hans Peter Freyther1-1/+1
token requires the presence of at least one match. The usage of star has been wrong and is corrected now. This was seen due not being able to parse a From address that included a diplay name. Remove the trailing ";" to fix the parsing bug.
2014-04-22identity: Remove use the "contact" and userString from SIPIdentityHolger Hans Peter Freyther3-60/+4
The code allows (and that looks like a good thing) to have a different from and username in the authorization. The userString was not really right as it was missing the URL part (sip/sips) and the splitting was broken as well.
2014-04-22identity: Fix the identity string for the fromHolger Hans Peter Freyther1-1/+1
2014-04-22identity: Move the identity into the SIPDialogHolger Hans Peter Freyther6-40/+37
This way the one that creates a dialog needs to decide which identity will be used.
2014-04-03identity: Make the SIPSession work based on identityHolger Hans Peter Freyther4-6/+75
2014-04-02identity: Remove direct usage of of useragent usernameHolger Hans Peter Freyther4-26/+23
In preparation of introducing multiple identities we need to remove usage of SIPUserAgent>>#username. The next step is to actually be able to pass a different identity.
2014-04-02identity: Make it possible to have a separate proxy username/passwordHolger Hans Peter Freyther2-2/+10
Make it possible that the proxy username and password is different to the identity of the user.
2014-04-02identity: Introduce the concept of an identity to the useragentHolger Hans Peter Freyther2-5/+63
The Transport to UserAgent relationship is a one to one. E.g. we need this to generate unique branch and call-ids to make sure the dialogues are different. To be able to use multiple identities I introduce a SIPIdentity class. Currently the user agent has one main identity but this could change over time.
2014-03-25test: Add test for remote-hangup handlingHolger Hans Peter Freyther1-1/+42
The whole response handling code was broken. Make sure to increase the test coverage of the system.